Skip to content

Schema is missing an examples properties #653

@madjar

Description

@madjar

I use open_api_spex to import an existing spec, and it has an examples field in Schema, which contains an array of examples, instead of a single example field.

This seems to be part of the spec:

The examples array is part of JSON Schema and is the preferred way to include examples in the Schema Object, while example is retained purely for compatibility with older versions of the OpenAPI Specification.

In https://swagger.io/specification/#working-with-examples

The examples keyword is a place to provide an array of examples that validate against the schema.

https://json-schema.org/understanding-json-schema/reference/annotations

I have PR incoming for this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions