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.
- API for submodels (one call returns
204 and the other 201) is different than for AAS (both calls can return both 201 and 204)
How should it be fixed?
Apply the pattern used for AAS also for submodels, i.e., change PUT /submodel and PUT /submodels/{submodelIdentifier} to both support create and update and therefore return 201 resp. 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 Createdand the submodel as bodyFor AAS it follows mostly the same pattern but there are some minor differences
PUT /aasreturns204 No Contentor201 Createdwith AAS as bodyPUT /shells/{aasIdentifier}returns201 Createdand 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.204and the other201) is different than for AAS (both calls can return both201and204)How should it be fixed?
Apply the pattern used for AAS also for submodels, i.e., change
PUT /submodelandPUT /submodels/{submodelIdentifier}to both support create and update and therefore return201resp.204.