Skip to content

Any 2xx response should satisfy the response requirements for openapi requests #424

Description

@pmajumdarKS

Version information
v0.2.24

Describe the bug
In HTTP, 200 is a response code which normally comes with a body.

Response code 204 means that the response doesn't have any content. This is often the most appropriate response code for the HTTP DELETE requests.

Similarly 201 is a more appropriate response for POST requests.

Forcing to add a 200 response code for all requests doesn't make sense. Any 2xx should suffice.

To Reproduce
Add a path and a delete operation any openapi.yaml. Define a 204 response but not a 200 response. This is pretty normal. See it not to work.

Expected behavior
Any 2xx response should be enough to go through the validation.

Additional context
None

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationspecImpacts API Spec

    Type

    No type

    Projects

    Status
    Backlog

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions