Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add :examples key to OpenAPI.Spec.Schema #67

Merged
merged 1 commit into from
Sep 10, 2024

Conversation

McSym28
Copy link
Contributor

@McSym28 McSym28 commented Aug 13, 2024

examples key was added (and example is being deprecated) to Schema objects in OpenAPI 3.1.0.

Deprecated: The example property has been deprecated in favor of the JSON Schema examples keyword. Use of example is discouraged, and later versions of this specification may remove it.

from https://spec.openapis.org/oas/latest.html?#fixed-fields-19

The value of this keyword MUST be an array. There are no restrictions placed on the values within the array. When multiple occurrences of this keyword are applicable to a single sub-instance, implementations MUST provide a flat array of all values rather than an array of arrays.
This keyword can be used to provide sample JSON values associated with a particular schema, for the purpose of illustrating usage. It is RECOMMENDED that these values be valid against the associated schema.

from https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-validation-00#section-9.5

@aj-foster aj-foster merged commit 1a09bae into aj-foster:main Sep 10, 2024
2 of 3 checks passed
@aj-foster
Copy link
Owner

Thank you! ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants