Skip to content

Describe it to me differently

Pre-release
Pre-release
Compare
Choose a tag to compare
@mattpolzin mattpolzin released this 28 Aug 22:47
0ed4858

The biggest change since alpha 1 is that all occurrences of JSONReference outside of JSONSchema have been replaced by a new OpenAPI.Reference type.

This change only impacts the OpenAPIKit module that targets v3.1 of the specification. This alpha does not change the OpenAPIKit30 module that targets v3.0 of the spec.

This new type attempts to expose all of the same conveniences of JSONReference but it additionally introduces support for overriding the summary or description of the object being referenced. These overrides only apply when the referenced object would have already supported the summary or description field (otherwise the override is ignored). You can also find the JSONReference at the jsonReference property of an OpenAPI.Reference.

This move comes with a couple of small but definitely breaking changes to code that uses JSONReference directly. For example, anywhere you used to create a reference with JSONReference.internal(.path(...)) you will now use OpenAPI.Reference.internal(path: ...).