juhaku / utoipa

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

This PR also breaks sandboxed builds that deny network access, sadly. #922

Closed juhaku closed 4 months ago

juhaku commented 4 months ago
          This PR also breaks sandboxed builds that deny network access, sadly.

Nix builds typically have no external network access, instead letting Nix download files itself and injecting them into the build. Typically you'd do this with a tool like crate2nix, but that is only aware of Cargo dependencies, not external downloads like this.

IMO, the ideal would be to either:

  1. Add a vendored feature (this could pull in a separate utoipa-swagger-ui-vendored crate to avoid bloating the main crate archive),
  2. Make SWAGGER_UI_DOWNLOAD_URL support file:// URLs as well, or
  3. Add a separate SWAGGER_UI_ZIP=/path/to/the/zip environment variable

Originally posted by @nightkr in https://github.com/juhaku/utoipa/issues/845#issuecomment-2107585774