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

Confirm use of OpenAPI's Schema Object #4

Open
tedepstein opened this issue Oct 1, 2017 · 0 comments
Open

Confirm use of OpenAPI's Schema Object #4

tedepstein opened this issue Oct 1, 2017 · 0 comments

Comments

@tedepstein
Copy link
Contributor

tedepstein commented Oct 1, 2017

The spec says that extension property schemas should be OpenAPI Schema Objects. At first blush, this seems consistent with this stated design goal:

Common Technology Stack with OpenAPI, so that essential functions like YAML editing, schema validation, and JSON reference resolution can be performed by the same components used with OpenAPI tool implementations.

But, while Schema Object is implemented by certain OpenAPI tools and components (parsers, documentation UIs, code generators, etc.), it's not part of the technology stack used to implement those tools and components.

Pros

  • Puts limits on the use of certain features of JSON schema. (Both a 'pro' and a 'con')
  • Adds its own syntax and semantics for discriminators, format, etc. (Both a 'pro' and a 'con')
  • Lets us use the OpenAPI convention of allowing markdown in description in top-level schemas, property sub-schemas, etc. This could be useful if we want to use SEMOASA to produce rich-formatted documentation of Specification Extensions, though that is not stated as one of the intended use cases.

Cons

  • Puts limits on the use of certain features of JSON schema. (Both a 'pro' and a 'con')
  • Adds its own syntax and semantics for discriminators, format, etc. (Both a 'pro' and a 'con')
  • Libraries that enforce these constraints, implement these extended semantics, and render markdown descriptions may not be readily available, except in OpenAPI tools. Making them available in a lower-level stack, used by tool providers to create those tools might require significant refactoring. It might just not be practical to do this.
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

No branches or pull requests

1 participant