Skip to content

Inconstancy between Interface Definitions for PUT / PATCH and OpenAPI Description #261

Description

@sebbader-sap

What happens?

The Interface Operations for Post, Put, and Patch , e.g. PutAssetAdministrationShellById, have the output parameter payload as mandatory/cardinality=1.
However, the OpenAPI operation describe the response with 204 (No Content) for Patch and Puts, while Posts, return a 201 AND the whole object.

Why is this wrong?

This is inconsistent with the Interface Operation pattern: Either all API Operations return the object, or the cardinality in the Interface operations is wrong.

How should it be fixed?

Option 1: Change the payload to "optional" (mandatory=false) in the Interface Operations.
Option 2: Change OpenAPI from 204 (No Content) to 200 (OK) and return the objects in the response.
Option 3: Introduce a new design decision in Chapter 12 explaining that Put and Patch have a different behaviour than the one defined in the Interface Operations.

  • I have signed the required Developer Certificate of Origin (DCO) already.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions