Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can Swashbuckle generate OpenAPI 3.0?

Using Swashbuckle in ASP.NET core 2.2 generates Swagger specification version 2, but now a change to version 3 specification is required (OpenAPI 3.0)

Where should a code specification be added to make it happen? And, is this supported?

like image 767
TrustworthySystems Avatar asked Nov 24 '25 13:11

TrustworthySystems


1 Answers

EDIT

Now the Version 5 is out of prerelease it is no longer mandatory to install the 5.0.0 release candidate version of Swashbuckle. Simply running

Install-Package Swashbuckle.AspNetCore

Will be enough to ensure you are using the latest version of Swashbuckle with OpenApi 3.0 support.

Previous Answer

Version 5 of Swashbuckle supports OpenApi 3.0. This is currently in prerelease at the moment, but you can obtain it from the nuget package https://www.nuget.org/packages/Swashbuckle.AspNetCore/5.0.0-rc2

Just run the following command in your package manager console

Install-Package Swashbuckle.AspNetCore -Version 5.0.0-rc2
like image 145
DCCoder Avatar answered Nov 26 '25 03:11

DCCoder



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!