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
An idea for filtering build methods, that filter requests by simply using app or web pages or other specific clients.
In .NET Server like this, add a new attribute
.NET
Controller
[AttrName]publicasync Task Post(stringurl){
...}
SwaggerFilter
publicclassSwaggerFilterHelper:IOperationFilter{publicvoidApply(OpenApiOperationoperation,OperationFilterContextcontext){varaction= context.ApiDescription.ActionDescriptor as ControllerActionDescriptor;
operation.OperationId = action.ActionName;varattr= context.ApiDescription.CustomAttributes().OfType<YourAttrName>().FirstOrDefault();if(attr!=null){
operation.Extensions.Add("x-tag","YourAttrName");}}
The text was updated successfully, but these errors were encountered:
Manweill
changed the title
An idea for filtering build methods. that filter requests by simply using app or web pages or other specific clients
An idea for filtering request method
Jan 27, 2020
The include option is ok for me. I am not sure if we need to do something extra. I have only one Tag in my API which is the service name.
I know some people might have more tags and they want to filter by them. I think we can think about it if there are really some requests from users.
An idea for filtering build methods, that filter requests by simply using app or web pages or other specific clients.
In .NET Server like this, add a new attribute
.NET
Controller
SwaggerFilter
Swagger Spec
The text was updated successfully, but these errors were encountered: