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
I use minimal api and I need to add tags with description. There is an example in your documentation. I don't like this implementation because I need to store the tag name and its description outside of my API configuration.
Having examined your code, I found that the Apply method of IDocumentFilter has an OpenApiDocument parameter containing an OpenApiOperation array. OpenApiOperation has an array of OpenApiTag objects, which only has the name filled in. Is it possible to assign a description to an OpenApiTag using metadata?
If it is possible to implement this, in your example we could not create OpenApiTag manually, but based on the OpenApiOperation array, collect existing unique OpenApiTags
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello!
I use minimal api and I need to add tags with description. There is an example in your documentation. I don't like this implementation because I need to store the tag name and its description outside of my API configuration.
Having examined your code, I found that the
Apply
method ofIDocumentFilter
has anOpenApiDocument
parameter containing anOpenApiOperation
array.OpenApiOperation
has an array ofOpenApiTag
objects, which only has the name filled in. Is it possible to assign a description to anOpenApiTag
using metadata?If it is possible to implement this, in your example we could not create
OpenApiTag
manually, but based on theOpenApiOperation
array, collect existing uniqueOpenApiTags
Beta Was this translation helpful? Give feedback.
All reactions