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.
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.