The openapi-generator 7.10.0
generated julia server/client code has wrong
function type signature for OpenAPI file upload.
This repo shows the error and a fix to it.
The server/client
folders contain the old code generated by 7.10.0
, while the server_new/client_new
folders contain updated version generated by my branch at https://github.com/qiaojunfeng/openapi-generator/tree/fix/julia_file.
See generate.sh
.
To test the code, start a server by
julia --project ServerImpl.jl
Then run the client code by
julia --project test.jl
To test the new version, open test.jl
and change line 3-5 to
# include("client/src/APIClient.jl")
# the new one, works fine
include("client_new/src/APIClient.jl")
and run again the client code by
julia --project test.jl
In this case, the openapi-generator
works fine.
One only need a small change to OpenAPI.jl
, to make the user experience more friendly, see https://github.com/qiaojunfeng/OpenAPI.jl/tree/binary.
To see this, run in julia
julia --project -e 'using Pkg; Pkg.add(url="https://github.com/qiaojunfeng/OpenAPI.jl", rev="binary")'
julia --project test.jl