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

Feature: Add alternativeSchema support #192

Open
philsturgeon opened this issue Nov 7, 2018 · 0 comments
Open

Feature: Add alternativeSchema support #192

philsturgeon opened this issue Nov 7, 2018 · 0 comments
Labels
enhancement New feature or request openapi-3.1

Comments

@philsturgeon
Copy link
Contributor

philsturgeon commented Nov 7, 2018

Add support for the OpenAPI v3.1 keyword alternativeSchema, to properly support JSON Schema (and eventually other schemas) without worrying about OpenAPI <> JSON Schema divergence.

Context

OpenAPI and JSON Schema have suffered a bit of a divergence in their keywords for years. At WeWork we came up with a workaround, creating json-schema-to-openapi-schema and jamming it into Speccy to convert from one flavour to another when using the --json-schema switch.

Supporting the alternativeSchema keyword for OpenAPI v3.1 will help folks get away from this workaround situation, and stop them needing to speccy resolve things before passing the specs to other OpenAPI tools which do not have the same workaround enabled.

Possible Implementation

It's possible that this work will need to be done in oas-kit and not directly done in speccy. This issue is created to track that progress regardless.

Work that should definitely be done in Speccy:

  • If a document contains openapi: 3.1.x and is also using the --json-schema flag, return a warning to the cli pointing them towards alternativeSchema
@philsturgeon philsturgeon added enhancement New feature or request openapi-3.1 labels Nov 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request openapi-3.1
Projects
None yet
Development

No branches or pull requests

1 participant