|
| 1 | +### OpenAPI Schema Generation Enhancements |
| 2 | + |
| 3 | +#### Model nullable types using oneOf in OpenAPI schema |
| 4 | + |
| 5 | +OpenAPI schema generation for nullable types was improved by using the `oneOf` pattern instead of the nullable property for complex types and collections. The implementation: |
| 6 | + |
| 7 | +- Uses `oneOf` with `null` and the actual type schema for nullable complex types in request and response schemas. |
| 8 | +- Detects nullability for parameters, properties, and return types using reflection and `NullabilityInfoContext`. |
| 9 | +- Removes null types from componentized schemas to avoid duplication. |
| 10 | + |
| 11 | +#### Fixes and improvements to schema reference resolution |
| 12 | + |
| 13 | +This release improves the handling of JSON schemas for OpenAPI document generation by properly resolving relative JSON schema references (`$ref`) in the root schema document. |
| 14 | + |
| 15 | +#### Include property descriptions as siblings of $ref in OpenAPI schema |
| 16 | + |
| 17 | +Prior to .NET 10, ASP.NET Core discarded descriptions on properties defined with `$ref` in the generated OpenAPI document because OpenAPI v3.0 didn't allow sibling properties alongside `$ref` in schema definitions. OpenAPI 3.1 now lets you include descriptions alongside `$ref`. RC1 adds support for including property descriptions as siblings of `$ref` in the generated OpenAPI schema. |
| 18 | + |
| 19 | +This was a community contribution. Thanks @desjoerd! |
| 20 | + |
| 21 | +#### Add metadata from XML comments on `[AsParameters]` types to OpenAPI schema |
| 22 | + |
| 23 | +OpenAPI schema generation now processes XML comments on properties of `[AsParameters]` parameter classes to extract metadata for documentation. |
| 24 | + |
| 25 | +#### Exclude unknown HTTP methods from OpenAPI |
| 26 | + |
| 27 | +OpenAPI schema generation now excludes unknown HTTP methods from the generated OpenAPI document. Query methods, which are standard HTTP methods but not recognized by OpenAPI, are now gracefully excluded from the generated OpenAPI document. |
| 28 | + |
| 29 | +This was a community contribution. Thanks @martincostello! |
| 30 | + |
| 31 | +#### Improve the description of JSON Patch request bodies |
| 32 | + |
| 33 | +The OpenAPI schema generation for JSON Patch operations now correctly applies the `application/json-patch+json` media type to request bodies that use JSON Patch. This ensures that the generated OpenAPI document accurately reflects the expected media type for JSON Patch operations. In addition, the JSON Patch request body has a detailed schema that describes the structure of the JSON Patch document, including the operations that can be performed. |
| 34 | + |
| 35 | +This was a community contribution. Thanks @martincostello! |
| 36 | + |
| 37 | +#### Use invariant culture for OpenAPI document generation |
| 38 | + |
| 39 | +OpenAPI document generation now uses invariant culture for formatting numbers and dates in the generated OpenAPI document. This ensures that the generated document is consistent and does not vary based on the server's culture settings. |
| 40 | + |
| 41 | +This was a community contribution. Thanks @martincostello! |
0 commit comments