Skip to content

Upgrading Swashbuckle.AspNetCore 2 to 3

Breaking2.5.0 → 3.0.0Breaking2New1Changed1

BreakingUpgrade verdict

2 breaking changes.

  • If you use Swagger annotations like SwaggerOperation or SwaggerResponse, you now need to install a separate package and turn it on.
  • Marking a parameter or property with Required or BindRequired now always makes it required in the generated Swagger, even if it is not nullable.
2 items need code or config changes
Breaking2
Swagger-specific annotations move to the new Swashbuckle.AspNetCore.Annotations package, which must be installed and enabled explicitly.
Swashbuckle.AspNetCore.AnnotationsSwaggerGenAnnotationsSwaggerOperationSwaggerResponse
Required and BindRequired attributes are now honored on all parameters and model properties, not only nullable ones.
RequiredBindRequired