You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Documentation strings added to the TypeSpec model or attributes of the response are not reflected in the generated OpenAPI responses description. Instead, the descriptions added by the emitter are some standard ones.
@doc("How to replace standard description with this one?")
model NotAuthenticatedError extends Errors.Error {
@doc("Or maybe with this other?")
@statusCode
_: 401
}
Generates:
'401':
description: Access is unauthorized.
content:
application/json:
schema:
$ref: '#/components/schemas/NotAuthenticatedError'
AngelEVargas
changed the title
[Bug]: There is no way to set the description for OpenAPI responses
[Bug]: There is no way to set the description for OpenAPI responses openapi-emitter [emitter:openapi3]
Aug 22, 2024
Describe the bug
Documentation strings added to the TypeSpec model or attributes of the response are not reflected in the generated OpenAPI responses description. Instead, the descriptions added by the emitter are some standard ones.
Generates:
cc @mario-guerra
Reproduction
Playground
Checklist
The text was updated successfully, but these errors were encountered: