eclipse-basyx / basyx-java-server-sdk

MIT License
60 stars 47 forks source link

[BUG] "Failed to read request" PATCH method for endpoint /submodels/{submodelIdentifier}/$value #482

Closed LinhPhan210 closed 1 month ago

LinhPhan210 commented 1 month ago

Hi all,

Describe the bug It seems that the PATCH method for the endpoint "/submodels/{submodelIdentifier}/$value" is not working at the moment. I have tried using various submodels, copied the response body from the GET request to the request body of the PATCH request, but I always receive a 400 error.

To Reproduce On Postman or similar app

  1. make a GET request to any submodels: "/submodels/{submodelIdentifier}/$value"
  2. copy the response of it
  3. paste to the request of PATCH method: "/submodels/{submodelIdentifier}/$value"
  4. make the request
  5. See error

Expected behavior It should return status 204

Error { "type": "about:blank", "title": "Bad Request", "status": 400, "detail": "Failed to read request", "instance": "/submodels/aHR0cHM6Ly9tdXJyZWxla3Ryb25pay5jb20vaWRzL05ldHdvcmtDb25maWd1cmF0aW9uLzIyMTJfOTA3Ml85MDMyXzQ3NDQ=/$value" }

Basyx Basyx Image: eclipsebasyx/aas-environment:2.0.0-SNAPSHOT

Best Regard

Linh

aaronzi commented 1 month ago

Hi @LinhPhan210,

please have a look at the answers here.

LinhPhan210 commented 1 month ago

Hi @aaronzi,

i have read the API Spec here:

As in the specification, the schema of response body from GET request same as the schema of request body from PATCH. Isn't that mean, that it should work when use the response of GET as request body for PATCH? but it returns error