In this method, no 409 conflict is returned (or an exception thrown) when adding a submodel reference if the reference already exists. However, the OpenAPI description specifies this error code. When removing, only the first occurrence of the reference is removed. So if the reference is added multiple times, we should probably remove all references.
Based on the OpenAPI description, I would assume that multiple references are not intended to be allowed, as the status code 409 suggests that duplicate entries should not be permitted.
To Reproduce
Deploy the reference multiple times
Get the shell and check for the submodels.
Expected behavior
In my opinion, the expected behavior would be to return 409
BaSyx (please complete the following information):
BaSyx Version [v2.0]
BaSyx SDK [Java]
AAS Version [DotAAS V3]
Screenshots
Used Asset Administration files (.aasx/.json/.xml)
Describe the bug
In this method, no 409 conflict is returned (or an exception thrown) when adding a submodel reference if the reference already exists. However, the OpenAPI description specifies this error code. When removing, only the first occurrence of the reference is removed. So if the reference is added multiple times, we should probably remove all references.
Based on the OpenAPI description, I would assume that multiple references are not intended to be allowed, as the status code 409 suggests that duplicate entries should not be permitted.
To Reproduce
Expected behavior
BaSyx (please complete the following information):
Screenshots
Used Asset Administration files (.aasx/.json/.xml)
Shell:
Additional submodel reference (already existing):
System (please complete the following information):