swagger-ui
swagger-ui copied to clipboard
Methods request schema dropbox has no type name when using UseAllOfToExtendReferenceSchemas
Q&A (please complete the following information)
- Browser: Chrome
- Version: 94
- Swagger-UI version: 6.22
- Swagger/OpenAPI version: 6.2.2
Content & configuration
Create default ASP NET Core 3.1 WebAPI weatheforecast project. with ConfigureServices() ... services.AddSwaggerGen(c => { c.UseAllOfToExtendReferenceSchemas(); });
and Configure() ... app.UseSwagger(); app.UseSwaggerUI();
Add POST method to WeatherForecastController [HttpPost] public WeatherForecast Post(WeatherForecast req) { return new WeatherForecast(); } Start APP and go to swagger page.
Steps to reproduce the behavior:
- Expand POST method
- Click on "Schema"
- Expect to be "WeatherForecast >" dropbox, but it is only ">"
In Responses.Schema dropbox is correct, with typename before arrow.
UseAllOfToExtendReferenceSchemas is a Swashbuckle config. Open an issue with Swashbuckle here:
https://github.com/domaindrivendev/Swashbuckle.AspNetCore/issues