Skip to content

qiaojunfeng/test-julia-OpenAPI

Repository files navigation

Minimal working example of using OpenAPI.jl for file transfer

Upload file

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

Download file

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published