-
-
Notifications
You must be signed in to change notification settings - Fork 7.2k
Open
Labels
Description
Bug Report Checklist
- Have you provided a full/minimal spec to reproduce the issue?
- Have you validated the input using an OpenAPI validator?
- Have you tested with the latest master to confirm the issue still exists?
- Have you searched for related issues/PRs?
- What's the actual output vs expected output?
- [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
The new async file stream support for reqwest client breaks the WASM build.
supportAsync=true
(default) impliesvendorExtensions.useAsyncFileStream=true
, it will addtokio
as a dependency with features incompatible with WASMsupportAsync=false
, it will enable theblocking
feature ofreqwest
, which does not build for WASM
error: Only features sync,macros,io-util,rt,time are supported on wasm.
--> /home/jmlx/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.47.1/src/lib.rs:475:1
|
475 | compile_error!("Only features sync,macros,io-util,rt,time are supported on wasm.");
|
So IMHO, essentially, the WASM build is essentially 100% broken on 7.15.0.
openapi-generator version
7.15.0
OpenAPI declaration file content or url
swagger: "2.0"
info:
title: File Streaming Test API
version: 1.0.0
paths:
/upload:
post:
consumes:
- application/octet-stream
description: Upload a file from the local filesystem
operationId: uploadFile
parameters:
- description: A test file
in: body
name: inputStream
schema:
format: binary
type: string
responses:
'200':
description: Success
Generation Details
java ${JAVA_OPTS} -jar ${CODEGEN} generate -i \"${INPUT_FILE}\" \
-g ${lang} \
-o ${TMP_PATH} \
--additional-properties=packageName=gltf_live_client_sdk \
--additional-properties=publishRustRegistry=false \
--additional-properties=library=reqwest \
--additional-properties=avoidBoxedModels=true
Steps to reproduce
- Generate the Rust client code
- Attempt to build for
wasm32-unknown-unknown
Related issues/PRs
Suggest a fix
useAsyncFileStream
should be a Cargo feature