Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions upgrading/v3.0-to-v3.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ While this version change may appear minor, OpenAPI 3.1 does introduce some brea

## JSON Schema Alignment

OpenAPI 3.1 achieves full compatibility with JSON Schema Draft 2020-12. Previously, OpenAPI used a modified subset of JSON Schema that added some features while removing others, creating confusion in the community.
OpenAPI 3.1 achieves full compatibility with [JSON Schema Draft 2020-12](https://www.ietf.org/archive/id/draft-bhutton-json-schema-01.html). Previously, OpenAPI used a modified subset of JSON Schema that added some features while removing others, creating confusion in the community.

### Background

Expand Down Expand Up @@ -182,7 +182,7 @@ The `contentEncoding` keyword supports all encodings defined in [RFC4648](https:

### $schema declarations

OpenAPI 3.1 supports the `$schema` keyword, which explicitly declares the JSON Schema dialect in use. This prevents ambiguity for tools processing multiple schema versions.
OpenAPI 3.1 supports the `$schema` keyword within [Schema Objects](https://spec.openapis.org/oas/v3.1.html#schema-object), which explicitly declares the JSON Schema dialect in use. This prevents ambiguity for tools processing multiple schema versions.

```json
{
Expand All @@ -198,7 +198,7 @@ This explicit declaration eliminates the need for tools to infer schema versions

- [ ] Update `openapi` version to `3.1.1`
- [ ] Replace `nullable: true` with type arrays (`type: ["string", "null"]`)
- [ ] Update `exclusiveMinimum`/`exclusiveMaximum` from boolean modifiers to direct values
- [ ] Update `exclusiveMinimum`/`exclusiveMaximum` from boolean modifiers to direct values and remove sibling `minimum/maximum`
- [ ] Change schema `example` to `examples` (as an array)
- [ ] Update file upload descriptions to use `contentEncoding`/`contentMediaType`
- [ ] Consider adding `$schema` declarations for better tool compatibility
Expand All @@ -208,7 +208,7 @@ This explicit declaration eliminates the need for tools to infer schema versions

## Tools and Resources

- [OpenAPI 3.1 Specification](https://spec.openapis.org/oas/v3.1.0)
- [OpenAPI 3.1 Specification](https://spec.openapis.org/oas/v3.1)
- [JSON Schema Draft 2020-12](https://json-schema.org/draft/2020-12/schema)
- [swagger2openapi](https://github.com/Mermade/oas-kit/blob/master/packages/swagger2openapi/README.md) for upgrading from Swagger 2.0
- OpenAPI 3.1 compatible validators and tooling
Expand Down
2 changes: 1 addition & 1 deletion upgrading/v3.1-to-v3.2.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ Consider adopting new features incrementally:

## Tools and Resources

- [OpenAPI 3.2 Specification](https://spec.openapis.org/oas/latest) (when available)
- [OpenAPI 3.2 Specification](https://spec.openapis.org/oas/v3.2) (when available)
- [The OpenAPI Specification Explained](../specification/) - Updated with 3.2 features
- [Media Types Registry](https://spec.openapis.org/registry/media-type/index.html)
- [Tag Kind Registry](https://spec.openapis.org/registry/tag-kind/index.html)
Expand Down