Swashbuckle.AspNetCore
Swashbuckle.AspNetCore copied to clipboard
Group Name(s) with Api Versioning via Route
I was redirected from: https://github.com/swagger-api/swagger-ui/issues/7237
Please see attached minimal repro Visual Studio .Net Web Api project using ApiVersioning. There are 2 controllers: WeatherForecastV1Controller & WeatherForecastV2Controller. Both controllers have the ApiVersion attribute set to "1.0" & "2.0" respectively. Both controllers have the "Name" property specified in the Route attribute.
Q&A (please complete the following information) OS: [e.g. macOS] --> Windows 10 Browser: [e.g. chrome, safari] --> Edge Version: [e.g. 22] --> 90.0.818.49 Method of installation: [e.g. npm, dist assets] --> Nuget Swagger-UI version: [e.g. 3.10.0] --> 6.1.4 Swagger/OpenAPI version: [e.g. Swagger 2.0, OpenAPI 3.0] --> Swagger 2.0, OpenAPI 3.0 Content & configuration See attached minimal repro Visual Studio .Net Web Api project
Swagger-UI configuration options: See Startup.cs in attached minimal repro Visual Studio .Net Web Api project.
Describe the bug you're encountering The "Group Name" does not completely remove the version. The "V" remains at the end of the group name. Even though the "Name" property is supplied in the controller Route attribute.
To reproduce... Steps to reproduce the behavior:
File New Project --> Web Api .Net 5.0 Core Add Swagger via Nuget Add supporting IDocument classes Wire up Swagger in Startup.cs --> See Startup.cs in attached minimal repro Visual Studio .Net Web Api project Expected behavior Completely remove the version from the Group name including the 'V' and/or use the supplied "Name" property supplied in the controller Route attribute.
Screenshots