Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trouble using API with docker-compose version #322

Open
sjb351 opened this issue Jul 2, 2024 · 5 comments
Open

Trouble using API with docker-compose version #322

sjb351 opened this issue Jul 2, 2024 · 5 comments
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed question Further information is requested

Comments

@sjb351
Copy link

sjb351 commented Jul 2, 2024

Thank you for all the great work!

I successfully set up a server on AWS (and locally) with an aasx file. The user interface seems to work well but I can't get all the API's to work. APIs like GET /submodels return:

{
  "errors": {
    "level": [
      "The level field is required."
    ],
    "extent": [
      "The extent field is required."
    ]
  },
  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.1",
  "title": "One or more validation errors occurred.",
  "status": 400,
  "traceId": "00-bf7c0aa3d6c1cd7179b0e3bb83c4c304-fbed7fa5290d1d33-00"
}

The docker compose file is below and the server URL is http://ec2-13-42-56-55.eu-west-2.compute.amazonaws.com/

services:
  aasx-server:
    container_name: aasx-server
    image: docker.io/adminshellio/aasx-server-blazor-for-demo:main
    ports:
      - 80:5001
    environment:
      - Kestrel__Endpoints__Http__Url=http://*:5001
    volumes:
      - ./aasxs:/AasxServerBlazor/aasxs
    command: --no-security --external-blazor

Can you suggest anything to change? I think it might be a mistake in way I am using the API or the docker set up

@sjb351 sjb351 added help wanted Extra attention is needed question Further information is requested labels Jul 2, 2024
@Freezor
Copy link
Contributor

Freezor commented Jul 3, 2024

Hi @sjb351,
this has nothing to do with the docker compose, but currently there are some bugs with endpoint parameter nullables.
I try to provide a fix as soon as possible. In the meantime you can check, if you can provide all parameters for each endpoint.
This issue was caused by the upgrade to dotnet8.0

@Freezor Freezor added the bug Something isn't working label Jul 3, 2024
@Freezor Freezor self-assigned this Jul 3, 2024
@Freezor
Copy link
Contributor

Freezor commented Jul 4, 2024

HI @sjb351 there is a new version v0.3.1.67-aasV3-alpha-latest, which should solve this issue. Can you try this out and give us feedback?

@sjb351
Copy link
Author

sjb351 commented Jul 4, 2024

Hi @Freezor , Thanks for the help. Lots of the APIs seem to be working now.

There are a couple of the APIs GEt APIs that get the same error message but most seem no to now. The two I have noticed that still get the error are:

GET calls for "URL/packages" and "URL/submodels". Unless I need to add Params to call this. The response is slightly different:


{
    "Messages": [
        {
            "Code": "Forbidden",
            "CorrelationId": null,
            "MessageType": "Error",
            "Text": "Cannot proceed as reqSemanticId is null",
            "Timestamp": "07/04/2024 15:47:54"
        }
    ]
}

@Freezor
Copy link
Contributor

Freezor commented Jul 4, 2024

Can you get me the excact request you're sending and potentially the aasx file you're using. That issue now thrown when the semantic Id cannot be extracted

@sjb351
Copy link
Author

sjb351 commented Jul 10, 2024

Hi Oliver,

I used GET with [URL/submodels] to get all the submodels.

But I got this as a response:

{

    "Messages": [
        {
            "Code": "Forbidden",
            "CorrelationId": null,
            "MessageType": "Error",
            "Text": "Cannot proceed as decodedAasIdentifier is null",
            "Timestamp": "07/10/2024 14:08:50"
        }
    ]
}

I have attached an example of the submodel we are working with.
GearBox2.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants