What happens?
Incorrect API semantics
The endpoint
POST /lookup/shells/{aasIdentifier} in the BasicDiscovery specification is described as "replace or create".
Why is this wrong?
Replace semantics are typically implemented with PUT, not POST.
Using POST for replace operations contradicts the design used in the rest of the API.
How should it be fixed?
A possible solution would be:
- Remove the "replace" behavior from the POST endpoint
POST /lookup/shells/{aasIdentifier} should only perform create operations.
- Introduce a dedicated PUT endpoint for replace
Replace operations should follow the existing API pattern and be implemented using a PUT method, e.g.:
What happens?
Incorrect API semantics
The endpoint
POST /lookup/shells/{aasIdentifier}in the BasicDiscovery specification is described as "replace or create".Why is this wrong?
Replace semantics are typically implemented with PUT, not POST.
Using POST for replace operations contradicts the design used in the rest of the API.
How should it be fixed?
A possible solution would be:
POST /lookup/shells/{aasIdentifier}should only perform create operations.Replace operations should follow the existing API pattern and be implemented using a PUT method, e.g.: