Includes two significant changes in addition to a handful of bug fixes and minor enhancements. The generator will now honor the
Required attributes on ALL parameters (top-level or property-based) and model properties, flagging the corresponding elements as
required in the generated Swagger. Also, the Swagger-specific annotations (
SwaggerResponse etc.) have been enhanced, but also extracted from the core functionality into a separate package that consumers need to explicitly install and enable.
- Updates to annotations: To continue using the swagger-specific annotations, you'll need to explicitly install and enable the new
Swashbuckle.AspNetCore.Annotationspackage as described here. Furthermore, the attributes have moved from the
SwaggerGennamespace to the
Annotationsnamespace, and the ordering of some constructor parameters has changed. So, you'll need to update and test your use of these attributes.
- Handling of
BindRequiredattributes: Previously, parameters and properties had to be decorated with these attributes AND be nullable to be flagged as
requiredin the generated Swagger. This has changed and now those attributes will be honored on ALL parameters and model properties.
Issues Addressed See https://github.com/domaindrivendev/Swashbuckle.AspNetCore/milestone/5?closed=1