#openapi-generator #openapi #swagger #generator

bin+lib oapi_generator

Code generator for OpenAPI specifications

33 releases

0.0.35 Jul 18, 2023
0.0.34 Jul 18, 2022
0.0.33 Jun 16, 2022
0.0.27 Mar 2, 2022
0.0.4 Jul 30, 2020

#238 in Template engine

Download history 8/week @ 2024-10-20 39/week @ 2024-10-27 33/week @ 2024-11-03 3/week @ 2024-11-10 18/week @ 2024-11-17 7/week @ 2024-11-24 1/week @ 2024-12-01 62/week @ 2024-12-08 44/week @ 2024-12-15 4/week @ 2024-12-22 3/week @ 2025-01-05 12/week @ 2025-01-12 35/week @ 2025-01-19 1/week @ 2025-01-26 14/week @ 2025-02-02

62 downloads per month

ISC license

70KB
1.5K SLoC

oapi_generator

Generate code from OpenAPI specifications.

Forked from the original with the idea to make it into simple build-script crate as opposed to being a binary

To use it as a binary:

cargo run -- path-to-specification path-to-output

To use it inside a build script:

oapi_generator::generate_oapi_server_stubs(speification, destination)

The hosting crate should have the following crates inside its Cargo.toml:

reqwest = { version = "0.10.6", features = [ "json" ] } 
async-std = "1.6.0"
serde = { version = "1.0.111", features = [ "derive" ] }
serde_json = "1.0.53"
serde_urlencoded = "0.6.1"
actix-multipart = "0.2.0"
async-trait = "0.1.33"
url = "2.1.1"
thiserror = "1.0.19"
displaydoc = "0.1.6"
regex = "1.4.2"
lazy_static = "1.4.0"

Dependencies

~10–19MB
~256K SLoC