Search code examples
swaggeropenapiswashbuckle

Generate Swagger OpenApi Spec 3.0 using Swashbuckle in Asp.Net Framework WebApi


Swashbuckle version="5.6.0" targetFramework="net451" generates "swagger": "2.0" spec.Is there any way to generate 3.0 spec?

In Asp.Net Core we can generate 3.0, what about in Asp.Net Framework WebApi?


Solution

  • Unlike Swashbukle.AspNetCore, Swashbuckle for WebAPI does not support OpenAPI 3.0.

    As a workaround, you can use Swashbuckle to generate a swagger: '2.0' definition and convert the generated file to OpenAPI 3.0 separately.