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

RFC: Improved support for JSONSchema route hosting #4658

Open
cdaringe opened this issue Apr 18, 2024 · 0 comments
Open

RFC: Improved support for JSONSchema route hosting #4658

cdaringe opened this issue Apr 18, 2024 · 0 comments

Comments

@cdaringe
Copy link

Problem

I need a JSONSchema URL to type some entity (such as a JSONFile, yaml file), e.g.:

{
  "$schema": "https://petstore.com/api/schemas/foo/bar",
  "bar": { ... }
}

...but such a standard in the swagger specification doesn't exist.

Without this capability, I cannot enable great features like intellisense in my IDE without first downloading the swagger.json and performing a transformation.

Discussion

  • Hosting a dedicated route(s) for supplying raw JSONSchema would be an excellent addition to the core offerring.
  • We go to great lengths to build JSONSchema models, but we don't expose them in their natural form.
  • JSONSchema likes to be hosted at URIs that produce raw/idiomatic JSONSchema: https://json-schema.org/understanding-json-schema/structuring#schema-identification, which is helpful for integrating with some tools

Desired, example behavior:

curl https://petstore.com/api/schemas/SCHEMA_NAME # or similar

{ # JSONSchema document just for that SCHEMA_NAME
  ...
}
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