Skip to content

Allow URL schema resolving with rustls #355

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

Merged

Conversation

jqnatividad
Copy link
Contributor

Hi @Stranger6667,
I'm also using jsonschema-rs as a library, and needed to use rustls with URL schemas, as cross no longer bundles openssl which native-tls requires.

As per the README, I explicitly enabled reqwest and rustls and disabled native-tls via default-features = false in my Cargo.toml file but I still got the compilation error.

jsonschema = { version = "0.15.1", features = [
    "resolve-file",
    "reqwest",
    "rustls"
], default-features = false }
Compiling jsonschema v0.15.1
error: the `reqwest` feature does not enable HTTP schema resolving anymore, use the `resolve-http` feature instead
  --> C:\Users\jsmith\.cargo\registry\src\github.com-1ecc6299db9ec823\jsonschema-0.15.1\src\resolver.rs:81:21
   |
81 | ...   compile_error!("the `reqwest` feature does not enable HTTP schema resolving anymore, use the `resolve-http` feature instead");

I had to tweak the conditional compilation directives to get it to work.

Fixes #353

@codecov
Copy link

codecov bot commented Apr 10, 2022

Codecov Report

Merging #355 (38e8c27) into master (044935d) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #355   +/-   ##
=======================================
  Coverage   82.72%   82.72%           
=======================================
  Files          57       57           
  Lines        5533     5533           
=======================================
  Hits         4577     4577           
  Misses        956      956           
Impacted Files Coverage Δ
jsonschema/src/resolver.rs 86.95% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 044935d...38e8c27. Read the comment docs.

@Stranger6667
Copy link
Owner

Hi @jqnatividad !

Thank you, and sorry for not getting back to you in #353! I overlooked it :(

@Stranger6667 Stranger6667 merged commit 293d517 into Stranger6667:master Apr 10, 2022
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.

Cross compilation doesn't work with 0.15.1 enabling reqwest/native-tls by default
2 participants