Skip to content

Fix SpecificAssetId JSON for SelfManagedEntity - #1060

Closed
sankalpsthakur wants to merge 1 commit into
eclipse-basyx:mainfrom
sankalpsthakur:fix/933-specific-asset-ids
Closed

sankalpsthakur wants to merge 1 commit into
eclipse-basyx:mainfrom
sankalpsthakur:fix/933-specific-asset-ids

Conversation

@sankalpsthakur

@sankalpsthakur sankalpsthakur commented Sep 5, 2026 •

Copy link
Copy Markdown

Description of Changes

SelfManagedEntity specificAssetIds loaded from XML were empty objects, so GET /submodels/{id}/submodel-elements/{path} returned [{}] instead of name, value, semanticId, and externalSubjectId.

AAS4J's Entity XML mixin does not declare the specificAssetId item wrapper that AssetInformation already has. BaSyx now applies that mixin when loading XML/AASX, and registers a JSON mixin so those fields serialize on the HTTP ObjectMapper.

Related Issue

Fixes #933

BaSyx Configuration for Testing

No special configuration. Covered by unit tests:

  • TestEntitySpecificAssetIdJsonSerialization — HTTP ObjectMapper, SelfManagedEntity with one SpecificAssetId does not emit {}
  • TestEntitySpecificAssetIdsXmlLoad — XML environment load keeps name/value/semanticId and JSON-serializes them

AAS Files Used for Testing

self_managed_entity_specific_asset_ids.xml — minimal SelfManagedEntity with one SpecificAssetId (name, value, semanticId), matching the issue repro.

Additional Information

I have signed the Eclipse Contributor Agreement. The commit includes Signed-off-by: Sankalp Thakur <sankalphimself@gmail.com>.

AI/LLM disclosure

  • AI coding tools (including Grok and/or Codex agent-assisted editing) were used to help draft or modify code and this PR description.
  • I reviewed the complete change, understand the reasoning, and ran the reported local tests before submitting.
  • This submission is original work of authorship under the project CLA / contributor terms; AI output was not pasted unreviewed.

AAS4J's Entity XML mixin does not declare the specificAssetId item
wrapper used by AssetInformation. XML-loaded Entity specificAssetIds
were empty objects, so GET responses serialized as [{}].

Apply that wrapper mixin when loading XML/AASX, and expose
SpecificAssetId name/value/semanticId/externalSubjectId on the HTTP
ObjectMapper.

Fixes eclipse-basyx#933

Signed-off-by: Sankalp Thakur <sankalphimself@gmail.com>
@aaronzi

aaronzi commented Sep 7, 2026

Copy link
Copy Markdown
Member

Thanks for trying to fix this problem. I still have to reject this PR since it's only a workaround for the actual problem. The fix needs to be done in AAS4J. More details can be found in the issue that is referenced in this PR.

@aaronzi aaronzi closed this Sep 7, 2026
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.

[BUG]SpecificAssetId not displayed in SelfManagedEntity response – returns blank object

2 participants