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

fix(#43): Load all schemas before validating them #214

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

iainjreid
Copy link

Hello! This PR ensures that all of the schemas passed through the CLI are loaded before they're validated, allowing schemas to cross reference each other without having to be loaded in a given order 👍

}

function compileSchema(file: string): AnyValidateFunction | undefined {
const sch = openFile(file, `schema ${file}`)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line could be removed if the schema name were set to the filename by default, and ignoring the IDs, would that be helpful to add to this PR?

@iainjreid
Copy link
Author

iainjreid commented Jun 24, 2022

I should add that the install fails for me locally, I'm not sure if this is because the lock file is missing, and the dependencies have moved on since the CI was last ran?

I've locked the version of TypeScript in the package file to prevent the build failures 👍

@iainjreid iainjreid marked this pull request as ready for review June 24, 2022 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant