Breaking changes:
- Use versioned API Explorer when available (#1622)
- Optional/required parameters: Use RequireParametersWithoutDefault fallback setting and API Explorer (#1606)
- We are now using the correct behavior for required parameters (provided by API Explorer). This might break some users, to enable the old behavior enable the RequireParametersWithoutDefault settings
- In ASP.NET Core, set MvcOptions.AllowEmptyInputInBodyModelBinding to true to allow null as body params
- Use the [BindRequire] attribute to make a parameter required, otherwise they are optional by default (before they were optional when they had a default value)
- Fix document template handling
- Breaking change: If a template is defined then the title, description and version settings are ignored
- OpenAPI 3 generation is greatly improved and may change the generated code
- When using latest code generators the output should be stable
- Inheritance handling has improved so that all schemas are in allOf (may be a breaking change with 3rd party tools)
- See #1435 and RicoSuter/NJsonSchema#783
- Deprecated reflection based middlewares (UseSwagger*()) and Swagger UI v2 (UseSwaggerUi())
- Updated to NJsonSchema v9.11, see https://github.com/RSuter/NJsonSchema/releases/tag/NSwag-Build-1849
New features:
- Added more Swagger UI 3 display settings (#1621)
- C# Client: Enhance exception message with status and response (#1612)
- Use ReDoc v2 (#1619)
- Use latest version of Swagger UI 3
- Added AllowNullableBodyParameters setting
- Ingored when MvcOptions.AllowEmptyInputInBodyModelBinding is available (ASP.NET Core 2+)
- If enabled, use
[FromBody, NotNull] Pet pet
to mark a parameter as not nullable - The NotNullAttribute can be implemented anywhere or use this one:
Bug fixes and patches: