mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-05-12 12:40:53 +00:00
[aspnetcore] Fix openapi.json location rename (#56)
Swashbuckle generation was missing the configuration to rename from default swagger.json to openapi.json (expected by change in SwaggerUI's configuration for the endpoint). This generates to the appropriate location and updates the sample to load the Swagger UI properly on run.
This commit is contained in:
parent
de5260a7ce
commit
9a8183ab05
@ -93,7 +93,10 @@ namespace {{packageName}}
|
||||
.UseMvc()
|
||||
.UseDefaultFiles()
|
||||
.UseStaticFiles()
|
||||
.UseSwagger()
|
||||
.UseSwagger(c =>
|
||||
{
|
||||
c.RouteTemplate = "swagger/{documentName}/openapi.json";
|
||||
})
|
||||
.UseSwaggerUI(c =>
|
||||
{
|
||||
//TODO: Either use the SwaggerGen generated Swagger contract (generated from C# classes)
|
||||
|
@ -100,7 +100,10 @@ namespace Org.OpenAPITools
|
||||
.UseMvc()
|
||||
.UseDefaultFiles()
|
||||
.UseStaticFiles()
|
||||
.UseSwagger()
|
||||
.UseSwagger(c =>
|
||||
{
|
||||
c.RouteTemplate = "swagger/{documentName}/openapi.json";
|
||||
})
|
||||
.UseSwaggerUI(c =>
|
||||
{
|
||||
//TODO: Either use the SwaggerGen generated Swagger contract (generated from C# classes)
|
||||
|
Loading…
x
Reference in New Issue
Block a user