swagger-rs icon indicating copy to clipboard operation
swagger-rs copied to clipboard

Hyper 1.x

Open dsteeley opened this issue 1 year ago • 0 comments

Migrate to Hyper 1: Matches the changes described in the [hyper1 upgrade guide](https://hyper.rs/guides/1/upgrading/_

  1. Remove poll_ready from the Service implementation.
  2. call no longer requires a mutable service.
  3. AddContextService and DropContext service are now generic over hyper::body::Body a. It is expected that implementing services collect an Incoming body or are generic over hyper::body::Body and return Full.
  4. The tcp feature has been removed, to match the new hyper feature set.

Other changes:

  • BREAKING - Remove dependency and re-export of hyper-old-types which is no longer maintained.
    • This changes the inner types of the AuthData enum and thus the various methods on it to avoid re-exports.
      • The hyper_old_types are no longer re-exported, and the enums just wrap Strings.
      • AuthData::bearer() now returns Option, returning None if the provided token is not valid base64.
    • The auth::make_headers function now returns an Option<AuthData>.
  • BREAKING - Remove SwaggerService trait due to lack of usage.

dsteeley avatar Sep 30 '24 13:09 dsteeley