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

Throws error when a schema contains reference to external file #134

Closed
shahar240 opened this issue Jul 30, 2020 · 1 comment
Closed

Throws error when a schema contains reference to external file #134

shahar240 opened this issue Jul 30, 2020 · 1 comment

Comments

@shahar240
Copy link
Contributor

shahar240 commented Jul 30, 2020

since opening schema allows added references to external files over HTTP with $ref the validator should allow loading schemes that use this feature.

currently the init function throws "TypeError: Cannot convert undefined or null to object" if the schema contains external references.

this can be solved by adding async init function that use "apiSchemaBuilder.buildSchema"
instead of "apiSchemaBuilder.buildSchemaSync"

@shahar240 shahar240 changed the title Add external references support Throws error when a schema contains reference to external file Jul 30, 2020
@shahar240
Copy link
Contributor Author

fixed in 2e61a72 by adding initAsync

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

No branches or pull requests

1 participant