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

Update jsonschema to 0.28.1, support drafts 2019-09 and 2020-12 #730

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

uncenter
Copy link
Contributor

@uncenter uncenter commented Jan 9, 2025

Closes #497, jsonschema now supports both of drafts (#497 (comment)).

}
jsonschema::paths::PathChunk::Keyword(_) => {}
Copy link
Contributor Author

@uncenter uncenter Jan 9, 2025

Choose a reason for hiding this comment

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

Not quite sure what this was but I couldn't figure out what the equivalent was based on the release notes and migration guide of jsonschema. I'll try to take another look later this week when I have more time.

self.cache
.get_schema(url)
.get_schema(&Url::parse(uri.as_str())?)
Copy link
Contributor Author

@uncenter uncenter Jan 9, 2025

Choose a reason for hiding this comment

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

Since jsonschema now uses fluent_uri:Uri instead of url::Url, we convert the Uri back to Url to avoid refactoring other major areas of Taplo to use fluent_uri.

let mut external_schema_requests: FuturesUnordered<_> = errors
.iter()
.filter_map(|err| {
if let ValidationErrorKind::Referencing(ReferencingError::Unretrievable {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I believe this here ValidationErrorKind::Referencing(ReferencingError::Unretrievable) should be what we want to refer to external schema errors?

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

Successfully merging this pull request may close these issues.

Discrepancy in validation with JSON Schema draft 2020-12
1 participant