Search code examples
rustdocumentationopenapiopenapi-generator

Open API Generator. What is the difference between rust and rust-server clients?


https://github.com/OpenAPITools/openapi-generator

Generating a 'rust' client stub.

Generating a 'rust-server' client stub.

What's the difference between them. I feel like the 'rust' client is outdated, it doesn't have any examples and the code generated is lacking in certain areas compared to 'rust-server'. Is the reason for the 'rust' client to allow users to customise the client more or has it just been abandoned? If it is still being supported then when would you use one over the other?

Also the 'rust' client's README talks about itself being a server which only adds to the confusion...


Solution

  • I think rust client generator was created first. For your feedback on the rust client generator, please let us know via github.com/OpenAPITools/openapi-generator/issues/new. rust client supports multiple libraries that you want to try:

    library
        library template (sub-template) to use. (Default: hyper)
            hyper - HTTP client: Hyper.
            reqwest - HTTP client: Reqwest.
    

    rust-server generator comes with both server and client generators. There were discussions to consolidate the client part of rust-server into rust client generator but no one has time to perform the consolidation.