49 releases (31 stable)

new 7.0.0-rc1 Dec 10, 2024
6.5.0 May 29, 2024
6.4.1 Sep 5, 2023
6.3.0 Jun 30, 2023
0.7.0 Oct 2, 2017

#52 in HTTP server

Download history 926/week @ 2024-08-19 985/week @ 2024-08-26 906/week @ 2024-09-02 1041/week @ 2024-09-09 816/week @ 2024-09-16 1066/week @ 2024-09-23 881/week @ 2024-09-30 1055/week @ 2024-10-07 942/week @ 2024-10-14 1001/week @ 2024-10-21 900/week @ 2024-10-28 853/week @ 2024-11-04 659/week @ 2024-11-11 784/week @ 2024-11-18 917/week @ 2024-11-25 1054/week @ 2024-12-02

3,425 downloads per month
Used in 30 crates (25 directly)

Apache-2.0

115KB
2K SLoC

swagger-rs

Build Status crates.io

A set of common utilities for crates generated by the rust-server openapi-generator generator

Releasing a new version

  1. Run ./release-changelog.sh <version> to update the changelog and Cargo.toml
  2. Commit and push your changes.
  3. Wait for a travis build to complete successfully.
  4. Run cargo publish.
  5. Tag the new version and push the tag.

lib.rs:

Support crate for Swagger codegen.

Crate features

Crate features exist to reduce the dependencies on the crate. Most features should be enabled by the generator when relevant.

By default, the serdejson feature is enabled.

Format support

  • multipart_form - Enable support for multipart/form-data as described in RFC 7578
  • multipart_related - Enable support for multipart/related as described in RFC 2387
  • serdejson - Enable JSON serialization/deserialization support using serde.

Feature support

  • serdevalid - Enable support for JSON schema based validation
  • conversion - Enable support for Frunk-based conversion - in particular, transmogrification

Use case support

  • client - Enable support for providing an OpenAPI client
  • server - Enable support for providing an OpenAPI server
  • http1 - Enable support for HTTP/1 based APIs - RFC 9112
  • http2 - Enable support for HTTP/2 based APIs - RFC 9113
  • tls - Enable support for HTTP over TLS (HTTPS)
  • uds - Enable support for HTTP over UDS (Unix Domain Sockets)

Dependencies

~5–19MB
~267K SLoC