What is the issue?
According to the specification there are the following API calls ralted to PUT a submodel:
For AAS it follows the same pattern
In the OpenAPI documentation for the complete API are following mappings of these operations:
For AAS it follows mostly the same pattern but there are some minor differences
Why is this wrong?
The OpenAPI definition is inconsistent in two ways
- The two submodel calls behave differently although they are, to my understanding, essentially the same call, at least in the
SubmodelRepository interface because there no longer is a seperate /submodel call because of superpaths.
- Inconsistent mapping to REST - same definition in spec is mapped differently to REST API (inconsistent return codes and payloads).
How should it be fixed?
Make all calls support update and create and return 201 with body or 204.
What is the issue?
According to the specification there are the following API calls ralted to PUT a submodel:
PutSubmodel"Replaces the Submodel" , optionally returning the Submodel (cardinality=1, mandatory=false)PutSubmodelById"Creates a new or replaces an existing Submodel", optionally returning the Submodel (cardinality=1, mandatory=false)For AAS it follows the same pattern
PutAssetAdministrationShell"Replaces the Asset Administration Shell", optionally returning the AssetAdministrationShell (cardinality=1, mandatory=false)PutAssetAdministrationShellById"Creates or replaces an existing Asset Administration Shell", optionally returning the AssetAdministrationShell (cardinality=1, mandatory=false)In the OpenAPI documentation for the complete API are following mappings of these operations:
PUT /submodelreturns204 No ContentPUT /submodels/{submodelIdentifier}returns201 Createdwith the submodel as body or204 No ContentFor AAS it follows mostly the same pattern but there are some minor differences
PUT /aasreturns201 Createdwithout the submodel as body or204 No ContentPUT /shells/{aasIdentifier}returns201 Createdwith the AAS as body or204 No ContentWhy is this wrong?
The OpenAPI definition is inconsistent in two ways
SubmodelRepositoryinterface because there no longer is a seperate/submodelcall because of superpaths.How should it be fixed?
Make all calls support update and create and return
201with body or204.