nswag openapi add a global return type for a specific response code
Hey, I have an API that has routes which are defined like below; but I return some 401s and others via middleware, is there a way to say that all routes could return a specific response type using openAPI?
4 Replies
You make a filter
It can look at the middlewares
A schema filter
I made a filter, but how does it register in the openapi document?
look for docs
I don't remember
you probably just add it to their options in the di
I guess yeah