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:
Add a vendored feature (this could pull in a separate utoipa-swagger-ui-vendored crate to avoid bloating the main crate archive),
Make SWAGGER_UI_DOWNLOAD_URL support file:// URLs as well, or
Add a separate SWAGGER_UI_ZIP=/path/to/the/zip environment variable
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:
vendored
feature (this could pull in a separateutoipa-swagger-ui-vendored
crate to avoid bloating the main crate archive),SWAGGER_UI_DOWNLOAD_URL
supportfile://
URLs as well, orSWAGGER_UI_ZIP=/path/to/the/zip
environment variableOriginally posted by @nightkr in https://github.com/juhaku/utoipa/issues/845#issuecomment-2107585774