Repository navigation
Conversation
Previously two endpoints of the discovery API deviated from the specification.
- `GET /lookup/shells/{aasIdentifier}` returned `200` with an empty list if no asset links were stored for the AAS, although the Open API file lists `404` for `GetAllAssetLinksById`. (Part 2: https://industrialdigitaltwin.io/aas-specifications/IDTA-01002/v3.1.1/specification/interfaces.html#_operation_getallassetlinksbyid, Open API: https://app.swaggerhub.com/apis/Plattform_i40/DiscoveryServiceSpecification/V3.1.1_SSP-001#/Asset%20Administration%20Shell%20Basic%20Discovery%20API/GetAllAssetLinksById)
- `POST /lookup/shells/{aasIdentifier}` returned an object mapping the AAS identifier to its asset links, although the Open API file defines the `201` body of `PostAllAssetLinksById` as a plain array of `SpecificAssetId`. (Part 2: https://industrialdigitaltwin.io/aas-specifications/IDTA-01002/v3.1.1/specification/interfaces.html#_operation_postallassetlinksbyid, Open API: https://app.swaggerhub.com/apis/Plattform_i40/DiscoveryServiceSpecification/V3.1.1_SSP-001#/Asset%20Administration%20Shell%20Basic%20Discovery%20API/PostAllAssetLinksById). The Part 2 specification defines the output `payload` with cardinality `1`, while the Open API file defines an array. This change follows the latter, because `POST` accepts and replaces a list of asset links, so the response lists all of them.
The tests were adapted accordingly.
Fixes eclipse-basyx#690
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously two endpoints of the discovery API deviated from the
specification:
GET /lookup/shells/{aasIdentifier}returned200with an emptylist if no asset links were stored for the AAS, although the
OpenAPI file of GetAllAssetLinksById lists
404(see alsoPart 2: GetAllAssetLinksById).
POST /lookup/shells/{aasIdentifier}returned an object mapping theAAS identifier to its asset links, although the
OpenAPI file of PostAllAssetLinksById defines the
201body as aplain array of
SpecificAssetId. Part 2: PostAllAssetLinksByIddefines the output
payloadwith cardinality1instead. Thischange follows the OpenAPI file, because
POSTaccepts and replacesa list of asset links, so the response lists all of them.
Now,
GETresponds with404andPOSTreturns the plain array.The tests were adapted accordingly.
Note: The output cardinality
1..*ofGetAllAssetLinksByIdisdiscussed in admin-shell-io/aas-specs-api#83. It is used for more than
only this list operation, with some variance in occurrence. The list
endpoints of the registry and repository currently keep returning
200with an empty list. Depending on the outcome of #83, thisendpoint and the others might require changes in the future.
This change was made with the help of Claude Opus 5.5 (test adjustments).
Fixes #690