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

Robustly support schema references via URL #23

Open
joelgallant opened this issue Nov 25, 2020 · 1 comment
Open

Robustly support schema references via URL #23

joelgallant opened this issue Nov 25, 2020 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@joelgallant
Copy link
Contributor

joelgallant commented Nov 25, 2020

Detect and resolve $ref properties that point to http/s URLs. This is useful for databases like schemastore.

This would be implemented in schema.ts, in resolveExternalSchemas. Detect URLs like we detect filepaths, fetch JSON and add it to schema references in the same way. Have to do this recursively as well.

@joelgallant joelgallant added enhancement New feature or request good first issue Good for newcomers labels Nov 25, 2020
@joelgallant joelgallant changed the title Support common schema references via URL (eg. https://www.schemastore.org/json/) Support common schema references via URL Nov 25, 2020
@joelgallant
Copy link
Contributor Author

#53 basically provides this out of the box. It's not exactly plug-n-play though (for example, non-text Content-Types don't tend to work). Would probably have to play with the http options of json-schema-ref-parser.

@joelgallant joelgallant changed the title Support common schema references via URL Officially / robustly support schema references via URL Jan 2, 2021
@joelgallant joelgallant added this to the Version 3 milestone Feb 13, 2021
@joelgallant joelgallant added this to To do in Development Feb 13, 2021
@joelgallant joelgallant removed this from the Version 3 milestone Apr 9, 2021
@joelgallant joelgallant removed this from To do in Development Apr 16, 2021
@joelgallant joelgallant changed the title Officially / robustly support schema references via URL Robustly support schema references via URL Apr 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant