47 releases (30 stable)

6.4.1 Sep 5, 2023
6.3.0 Jun 30, 2023
6.2.1 Jul 13, 2022
6.1.1 Feb 1, 2022
0.7.0 Oct 2, 2017

#65 in HTTP server

Download history 979/week @ 2023-12-16 355/week @ 2023-12-23 503/week @ 2023-12-30 950/week @ 2024-01-06 1082/week @ 2024-01-13 1136/week @ 2024-01-20 1101/week @ 2024-01-27 1382/week @ 2024-02-03 1151/week @ 2024-02-10 930/week @ 2024-02-17 1696/week @ 2024-02-24 1663/week @ 2024-03-02 1423/week @ 2024-03-09 1179/week @ 2024-03-16 1417/week @ 2024-03-23 1446/week @ 2024-03-30

5,744 downloads per month
Used in 27 crates (23 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
  • tcp - Enable support for HTTP over TCP
  • tls - Enable support for HTTP over TLS (HTTPS)
  • uds - Enable support for HTTP over UDS (Unix Domain Sockets)

Dependencies

~7–21MB
~287K SLoC