Skip to content

Make jsonschema completion friendly #2249

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

Closed
rmannibucau opened this issue Jun 2, 2020 · 5 comments
Closed

Make jsonschema completion friendly #2249

rmannibucau opened this issue Jun 2, 2020 · 5 comments
Labels

Comments

@rmannibucau
Copy link

JSON-Schema is a nice tool to validate a payload but it also enables to get completion (in vscode and most modern editors).

Current openapi3 jsonschema does not work at all with completion and has 2 pitfalls:

  1. no description
  2. written in a way it does not enable an IDE to discover much the completion due to a lot of regex (Pathitem patternproperties for verbs is a good example)

This ticket is about ensure at all stage some completion or at least description is enabled to make it user friendly.

@MikeRalphson
Copy link
Member

See (approved) PR #2127 for pathItem patternProperties and (closed) issue #1948 for adding descriptions to the official schema.

@handrews handrews added the Schema label Jun 2, 2020
@MikeRalphson
Copy link
Member

As the PR for the operation methods (regex -> oneOf) was merged and the issue involving adding descriptions was closed as a won't-fix, closing this issue (but it can always be re-opened if necessary).

@rmannibucau
Copy link
Author

Hi @MikeRalphson ,

Do you have the description related PR link handy? Would be great to fix it since it really helps when writing specs by hand or reviewing generated ones.

@MikeRalphson
Copy link
Member

@rmannibucau I don't think there ever was an open PR for adding the descriptions to the v3.0 schema (and definitely not for v3.1). The code was pretty trivial. If I still have it, it's on an old laptop I'm afraid.

@rmannibucau
Copy link
Author

ok so let's continue on #1948 then. Thanks.

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

No branches or pull requests

3 participants