Skip to content

[FEATURE] Provide an additional annotation for error responses #176

Description

@paulchen5

Description

Provide an additional annotation for error responses for CRUD operations on entities as well as custom functions and actions. This would allow the developer to specify when an operation would throw a 409 for example and explain in in the documentation.

Suggested Solution

Add an additonal annotation to entity which supports a style like

@Errors:[
  {
    Operation: READ | CREATE | UPDATE | DELETE | customAction | customFunction,
    HTTPStatusCode: 409,
    Message: "ABAP",
    Reason: "I send a 409 because I like ABAP"
  },
  ....
]
entity Foo as projection on Bar;

Alternatives

No response

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions