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
I am trying to setup Swagger UI so as to use the OpenAPI included in the .NET 9 project templates.
I essentially added this:
app.UseSwaggerUI(static options => { options.SwaggerEndpoint("/openapi/v1.json", "My API V1"); });
The /openapi/v1.json file is accessible, however, Swagger UI always complaints about a missing version attribute:
Unable to render this definition
The provided definition does not specify a valid version field.
Please indicate a valid Swagger or OpenAPI version field. Supported version fields are swagger: "2.0" and those that match openapi: 3.x.y (for example, openapi: 3.1.0).
However, inspecting the JSON document, I can see it's there:
What am I missing? Using the latest versions of all of the packages.
I understand this may be related to #10247. Is there any way to fix this before this issue gets merged?
Thanks!
The text was updated successfully, but these errors were encountered:
I am trying to setup Swagger UI so as to use the OpenAPI included in the .NET 9 project templates.
I essentially added this:
app.UseSwaggerUI(static options => { options.SwaggerEndpoint("/openapi/v1.json", "My API V1"); });
The /openapi/v1.json file is accessible, however, Swagger UI always complaints about a missing version attribute:
However, inspecting the JSON document, I can see it's there:
{ "openapi": "3.0.4", "info": { "title": "WebApi | v1", "version": "1.0.0" },
What am I missing? Using the latest versions of all of the packages.
I understand this may be related to #10247. Is there any way to fix this before this issue gets merged?
Thanks!
The text was updated successfully, but these errors were encountered: