Repository navigation
Fix SpecificAssetId JSON for SelfManagedEntity - #1060
Closed
sankalpsthakur wants to merge 1 commit into
Closed
sankalpsthakur wants to merge 1 commit into
sankalpsthakur wants to merge 1 commit into
Conversation
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>
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. |
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.
Description of Changes
SelfManagedEntity
specificAssetIdsloaded 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
specificAssetIditem 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 themAAS 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