admin-shell-io / aas-specs-api

Repository of the Asset Administration Shell Specification DTA-01002 API
https://admin-shell-io.github.io/aas-specs-antora/index/home/index.html
Creative Commons Attribution 4.0 International
12 stars 5 forks source link

New Profile - Asset Administration Shell Repository Service Spec without submodel repository "write" superpath APIs #260

Open DenisBiondic opened 8 months ago

DenisBiondic commented 8 months ago

What is missing?

We need a profile for the AAS Repository without the submodel repository "write" superpath methods, so that our API is compliant with the spec and the idea behind the /description interface.

How should it be fixed?

Either a new profile should be created, or perhaps the existing AAS Repository Service Profile should be changed and the submodel repository superpaths should be dropped.

Reasoning

Asset Administration Shell and Submodel "entities" are in a natural many to many relation, so providing write operations as a superpath under a shell resource brings more confusion than value.

For example, given a DELETE shells/{shell_id}/submodels/{submodel_id}, there is no behaviour that is reasonably explainable to the API consumers:

Example above is only on one of many write operations available. I think in general, write operations on nested RESTful resource which are in many-many relation are not a good idea (IMHO).

The core idea behind the superpath is perfectly reasonable and understandable - it is to provide convenience - best of which is the avoidance of the calling the registry in the case of a monolithic AAS / Submodel repository. I think this is achievable by simply dropping the "write" superpath methods, and keeping the "read" methods.

image

DenisBiondic commented 8 months ago

Related:

https://github.com/eclipse-basyx/basyx-java-server-sdk/issues/241 https://github.com/admin-shell-io/aas-specs-api/issues/210 https://github.com/admin-shell-io/aas-specs-api/issues/115 https://github.com/admin-shell-io/aas-specs-api/issues/113