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
Currently the only way to add a description to the tags is to include them manually as "openapi_extra" at the NinjaAPI constructor like so:
api=NinjaAPI(openapi_extra={"tags": [{
"name": "Account",
"description": "An Account can have users",
}]})
It would be ideal to be able to add the description to a Router. Something like this maybe:
router=Router(tag="Account", description="An Account can have users")
Or also support externalDocs:
accountTag=Tag("Account", description="An Account can have users", externalDocs_url="http://somewhere", externalDocs_description="A description")
router=Router(tags=[accountTag])
Yes, the feature request is to have a "nicer"? way to do it. Or maybe just document how it's done?
The docs make it sound like using openapi_extra would be to add "weird" stuff. I wasn't that familiar with the spec to know that that was the spot to define tag descriptions.
Currently the only way to add a description to the tags is to include them manually as "openapi_extra" at the NinjaAPI constructor like so:
It would be ideal to be able to add the description to a Router. Something like this maybe:
Or also support externalDocs:
Reference:
https://swagger.io/docs/specification/grouping-operations-with-tags/
The text was updated successfully, but these errors were encountered: