Created by: richardwhiuk
- Updated dependencies:
- hyper 0.13 (from 0.12)
- hyper-openssl 0.8 (from 0.7)
- futures 0.3 (from 0.1)
- swagger-rs 5 (from 4)
- uuid 0.8 (from 0.7)
- serde_ignored 0.1 (from 0.0.4)
- url 2.1 (new)
- serde_urlencoded 0.6 (from 0.5)
- percent-encoding 2 (from 1)
- regex 1 (from 0.2)
- frunk-enum-derive 0.2 (from 0.1 internal)
- frunk-enum-core 0.2 (from 0.1 internal)
- Updated dev dependencies
- error_chain removed
- tokio 0.2 (from 0.1)
- native-tls 0.2 (from 0.1)
- tokio-tls 0.3 (from 0.1)
- tokio-openssl 0.4 (from 0.3)
- API changes
- Addition of
poll_ready
to expose API busy-ness - this is optional. - Trait is now tagged with
async_trait
, and all methods are async.
- Addition of
- Deprecation removals
- No longer export swagger::ApiError, or futures::Future
- Client changes:
- Now parameterised by enclosing Service, rather than by the future it produces
-
⚠ Service must be Clone and Send and Sync.
- Server Changes:
-
⚠ Context is now required to be Clone and Send and Sync. -
MakeService
andService
are now atower::Service
s.
-
- Middleware changes
- MakeAddContext/AddContext now impl tower::Service
- Server and Client are implemented using async/await.
- Note, for Server, this is done by mirroring how
async_trait
works - Sadly
tower::Service
doesn't useasync_trait
, so this doesn't just fall out. - For client, both URL construction and Multipart construction is forced into a block to workaround limitations in Rust's escape analysis for futures.
- Note, for Server, this is done by mirroring how
This resolves https://github.com/OpenAPITools/openapi-generator/issues/3865
Rust Server Technical Committee
- @frol
- @farcaller
- @bjgill
- @paladinzh
PR checklist
-
Read the contribution guidelines. -
If contributing template-only or documentation-only changes which will change sample output, build the project before. -
Run the shell script(s) under ./bin/
(or Windows batch scripts under.\bin\windows
) to update Petstore samples related to your fix. This is important, as CI jobs will verify all generator outputs of your HEAD commit, and these must match the expectations made by your contribution. You only need to run./bin/{LANG}-petstore.sh
,./bin/openapi3/{LANG}-petstore.sh
if updating the code or mustache templates for a language ({LANG}
) (e.g. php, ruby, python, etc). -
File the PR against the correct branch: master
,4.3.x
,5.0.x
. Default:master
. -
Copy the technical committee to review the pull request if your PR is targeting a particular programming language.