Description
Is your feature request related to a problem? Please describe.
As I'm transitioning from FastAPI to Zenstack, I'm used to have the generated Swagger UI with authentication built-in. For endpoints requiring auth, there is a padlock to identify them. I would love to have the same within Zenstack.
Describe the solution you'd like
Ideally, I would like an automatic addition of an empty security field in the generated schema when the model/operation (endpoint) doesn't require any authentication (e.g. for a model with the @@allow('create', true)
attribute).
Describe alternatives you've considered
Add manually a security field in @@openapi.meta
attribute.
E.g:
@@openapi.meta({
description: 'A user of the pet store',
create: {
description: 'I would like to disable Swagger UI authentication for this operation',
security: [] <--- here
},
})
Additional context
- When I add this in the generated specification :
Working example : https://github.com/Azzerty23/petstore-openapi-zenstack