Skip to content

v4.0.0

Compare
Choose a tag to compare
@domaindrivendev domaindrivendev released this 06 Nov 12:50
· 1182 commits to master since this release

Release Summary

This release makese an explicit jump to ASP.NET Core 2.0 and the netstandard2.0 library contract. As a result, Swashbuckle can simplify it's implementation by leveraging some of the newer ASP.NET Core features. However, it also means applications need to upgrade their ASP.NET Core stack to 2.0 or above before they can use this version or subsequent versions of Swashbuckle.

It also includes a significant refactor to the way in which Swashbuckle middleware and services are configured, adhering more closely to the ASP.NET Core Options Pattern. This allows for the Swashbuckle components to be configured via appSettings.json if desired.

The other notable change with this release is out-of-the-box support for parameters of type IFormFile. That is, the generator will automatically detect these and generate the correct Swagger to describe parameters that are passed in formData. If you have a workaround in place (e.g. using Operation Filters), you should remove it as part of the upgrade.

Breaking Changes

  • Requires ASP.NET Core 2.0 and netstandard2.0 or above:
    Applications need to upgrade their ASP.NET Core stack to 2.0 or above before they can use this version or subsequent versions of Swashbuckle.

  • Strongly typed options for SwaggerUI and ReDoc middleware:
    May need to update middleware configuration (e.g. in Startup.cs) to compile

  • Explicit OperationIds now required:
    As per the Swagger spec, operationIds MUST be unique and SHOULD follow common programming conventions. In previous versions, Swashbuckle attempted to generate these values but this has proved increasingly problematic. As a result, this behavior has been removed and the action name or (optionally) the route name is used instead. So, API developers are now responsible to ensure the uniqueness of these values. See the readme topic for more details.

Issues Addressed

See https://github.com/domaindrivendev/Swashbuckle.AspNetCore/milestone/6?closed=1