Reputation: 8065
I am using routing-controllers-openapi to document an API and I am facing a problem to show the body from a request as parameter in the Swagger UI.
The controller is implemented this way:
@HttpCode(201)
@OpenAPI({
description: 'Create a new user'
})
@Post('/')
async newUserAccess(@Body() user: UserAccessDto): Promise<void> {
await this.service.newUserAccess(user);
}
}
The Swagger UI shows the UserAccessDto in the example from the parameters but not in the parameter, as de body:
I am trying to achieve something like this, in the Pet Store Swagger UI:
Anyone knows if this is possible?
Upvotes: 1
Views: 1064