Skip to content

Adjust discovery status codes to align with specification - #641

Open
JAB1305 wants to merge 1 commit into
eclipse-basyx:developfrom
rwth-iat:fix/discovery-status-codes
Open

JAB1305 wants to merge 1 commit into
eclipse-basyx:developfrom
rwth-iat:fix/discovery-status-codes

Conversation

@JAB1305

@JAB1305 JAB1305 commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

Previous status code were not in agreement with the respective specification.

This change adjusts the HTTP status codes.

Fixes #625

Previous status code were not in agreement with the respective specification.

This adjust HTTP status codes returned to align.
@zrgt zrgt linked an issue Sep 24, 2026 that may be closed by this pull request
@s-heppner

Copy link
Copy Markdown
Member

This needs to be adapted when #627 is merged.

@zrgt zrgt left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The spec defines PostAllAssetLinksById as "Creates or replaces all asset links associated to the Asset Administration Shell" (spec). The endpoint currently merges the posted links into the existing ones, and test_post_is_additive asserts that, see #669.

Since this PR already aligns this endpoint with the spec, could it also replace the links instead of merging them, and flip test_post_is_additive?

@zrgt

zrgt commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Related to the requested change for #669: both handlers in this PR also maintain the reverse index (asset_id_to_aas_ids) themselves, via the private _add_aas_id_to_specific_asset_id() and a loop over the store's dict that leaves empty sets behind. Moving that into add_specific_asset_ids_to_aas() / delete_specific_asset_ids_by_aas_id() would make the replace logic a single place to change, see #669 (comment).

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.

server: Discovery endpoints status code mismatch

3 participants