Skip to content

server: Align endpoints with specification - #693

Open
JAB1305 wants to merge 1 commit into
eclipse-basyx:developfrom
rwth-iat:fix/align-discovery-responses-with-spec
Open

JAB1305 wants to merge 1 commit into
eclipse-basyx:developfrom
rwth-iat:fix/align-discovery-responses-with-spec

Conversation

@JAB1305

@JAB1305 JAB1305 commented Nov 21, 2026

Copy link
Copy Markdown
Contributor

Previously two endpoints of the discovery API deviated from the
specification:

Now, GET responds with 404 and POST returns the plain array.
The tests were adapted accordingly.

Note: The output cardinality 1..* of GetAllAssetLinksById is
discussed 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
200 with an empty list. Depending on the outcome of #83, this
endpoint 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

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant