Skip to content

OpenApi: handle endpoint response codes #41

Description

@antoniogiordano

OpenApi and swagger show all the responses an endpoint can give in terms of StatusCodes. A good idea could be to create a regex that parses the handler.ts code, and look for all the JSON responses, get the status codes, and automatically creates this list.
A cli command could trigger this, like "restlessness generate-endpoints-codes".
And they could be written inside the endpoints config file.
The CLI command can also be triggered automatically inside DEV:locale command, in order to have Swagger UI updated.

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

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions