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
Node Version: v20.16.0 Nitro Version: v2.10.4
https://stackblitz.com/edit/github-bwupnk?file=README.md
Route file:
defineRouteMeta({ openAPI: { tags: ['/auth'], description: 'Authentication using login/email', requestBody: { required: true, content: { 'application/json': { schema: { type: 'object', properties: { login: { type: 'string', description: 'Login/email of user', }, password: { type: 'string', description: 'Password of user', }, }, required: ['login', 'password'], }, }, }, }, responses: { '200 (OK)': { description: 'Successful', content: { 'application/json': { schema: { type: 'object', properties: { ok: { type: 'boolean', default: true, }, result: { type: 'object', properties: { accessToken: { type: 'string', description: 'JWT Access token (1 day)', }, refreshToken: { type: 'string', description: 'JWT Refresh token (14 days)', }, }, }, }, }, }, }, }, '4xx, 5xx': ErrorResponse, }, }, })
ErrorResponse file:
import { ReferenceObject, ResponseObject } from 'openapi-typescript' const response: ResponseObject | ReferenceObject = { description: 'Error', content: { 'application/json': { schema: { type: 'object', properties: { ok: { type: 'boolean', default: false, }, error: { type: 'object', properties: { message: { type: 'string', description: 'Message with error', }, }, }, }, }, }, }, } export default response
4xx, 5xx response will not be shown in the openapi specification, but 200 will be
No response
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Environment
Node Version: v20.16.0
Nitro Version: v2.10.4
Reproduction
https://stackblitz.com/edit/github-bwupnk?file=README.md
Route file:
ErrorResponse file:
Describe the bug
4xx, 5xx response will not be shown in the openapi specification, but 200 will be
Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: