We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Currently is not possible to define a default response block because the "response" decorator accepts an argument with type IResponses:
export interface IResponses { [name: number]: any; }
So is not possible to assign a string as key.
The desiderata woud be to allow the following:
@responses({ 200: { description: "success", "default": {description: "default error"} })
The resulting json must have the following structure:
responses: 200: description: Success schema: $ref: '#/definitions/User' # Definition of all error statuses default: description: Unexpected error schema: $ref: '#/definitions/Error'
The text was updated successfully, but these errors were encountered:
A possible workaround could be:
const DEFAULT_ERROR_KEY: number = "default" as unknown as number @responses({ 200: { description: "success", [DEFAULT_ERROR_KEY]: {description: "default error"} })
Sorry, something went wrong.
No branches or pull requests
Currently is not possible to define a default response block because the "response" decorator accepts an argument with type IResponses:
So is not possible to assign a string as key.
The desiderata woud be to allow the following:
The resulting json must have the following structure:
The text was updated successfully, but these errors were encountered: