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
Then in an OperationFilter I get that custom attribute for apiDescription.ActionDescription and modify the RelativePath property with the value set in the action controller.
The issue is at the first load of Swagger documentation (no matter if it is the json doc or the ui) because, despite the RelativePath property is being set properly, it does not change until the second load and following ones.
I am not totally sure if it is a bug or I am making something wrong or even If there is any workaround to fix this issue.
The text was updated successfully, but these errors were encountered:
The purpose of an IOperationFilter is to modify the provided "Operation" not the ApiDescription. The corresponding ApiDescription is just passed for additional context. A typical implementation would modify the operation according to information inferred from the provided ApiDescription. Modifying the ApiDescription will have no impact on the generated Swagger.
If you really need to modify the paths (although I'm not quite sure why this would be necessary), then you'll need to create an IDocumentFilter and adjust SwaggerDocument.paths accordinly.
I need to set a custom relative path for my action controller, for that purpose I created a new attribute and use it in the action controller
Then in an OperationFilter I get that custom attribute for apiDescription.ActionDescription and modify the RelativePath property with the value set in the action controller.
The issue is at the first load of Swagger documentation (no matter if it is the json doc or the ui) because, despite the RelativePath property is being set properly, it does not change until the second load and following ones.
I am not totally sure if it is a bug or I am making something wrong or even If there is any workaround to fix this issue.
The text was updated successfully, but these errors were encountered: