server: Implement the /serialization route - #622
Open
thammel wants to merge 1 commit into
Open
Conversation
Previously, `GET /serialization` was not implemented yet. The route now serves JSON, XML or an AASX package, as requested via the `Accept` header. The serialization itself is left to the adapters of the `basyx-python-sdk`, so no rules are duplicated here. The specification leaves the semantics of the query parameters open in some regards, which are resolved as follows: - `aasIds` and `submodelIds` are optional filters, so that a plain `GET` on the route yields a complete export of the repository. - The requested objects are returned as they are, i.e. an AAS does not drag in the Submodels it references. Otherwise a client could not request an AAS on its own. - `includeConceptDescriptions` yields all ConceptDescriptions if no filter is given, so that such an export can be read back without losing objects. For a filtered request, only the ones referenced by the semanticIds of the requested objects are added, as unrelated ones would bloat the export. - Unknown or mistyped identifiers result in `404 Not Found`, as on all other routes taking identifiers. Since content negotiation happens before the route is matched, the AASX media type has to be accepted on all routes, which respond with JSON instead of `406 Not Acceptable`. Error responses stay JSON in either case. Fixes eclipse-basyx#491
thammel
force-pushed
the
feature/491-serialization-endpoint
branch
from
August 31, 2026 15:16
a2b0da1 to
48bd058
Compare
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,
GET /serializationwas not implemented yet.The route now serves JSON, XML or an AASX package, as requested via the
Acceptheader. The serialization itself is left to the adapters of thebasyx-python-sdk, so no rules are duplicated here.The specification leaves the semantics of the query parameters open in some regards, which are resolved as follows:
aasIdsandsubmodelIdsare optional filters, so that a plainGETon the route yields a complete export of the repository.includeConceptDescriptionsyields all ConceptDescriptions if no filter is given, so that such an export can be read back without losing objects. For a filtered request, only the ones referenced by the semanticIds of the requested objects are added, as unrelated ones would bloat the export.404 Not Found, as on all other routes taking identifiers.Since content negotiation happens before the route is matched, the AASX media type has to be accepted on all routes, which respond with JSON instead of
406 Not Acceptable. Error responses stay JSON in either case.https://app.swaggerhub.com/apis/Plattform_i40/AssetAdministrationShellRepositoryServiceSpecification/V3.0.1_SSP-001#/Serialization%20API/GenerateSerializationByIds
Fixes #491