juhaku / utoipa

Simple, Fast, Code first and Compile time generated OpenAPI documentation for Rust
Apache License 2.0
2k stars 160 forks source link

Use `CARGO_HTTP_CAINFO` CA file in build script if present #935

Closed ranger-ross closed 1 month ago

ranger-ross commented 1 month ago

This PR adds support for using the CARGO_HTTP_CAINFO cargo option if its present. See https://github.com/juhaku/utoipa/issues/934 for more details.

CARGO_HTTP_CAINFO is optional and the behavior will not change if it is not present. If it is present and we fail to read/parse the file, we just skip adding it and attempt to download the file without setting a custom CA.

Resolves #934