#openapi #swagger #generator

bin+lib oapi_generator

Code generator for OpenAPI specifications

23 releases

0.0.25 Oct 27, 2021
0.0.23 Aug 9, 2021
0.0.22 Jun 23, 2021
0.0.15 Feb 25, 2021
0.0.4 Jul 30, 2020

#40 in Template engine

Download history 157/week @ 2021-08-17 112/week @ 2021-08-24 78/week @ 2021-08-31 134/week @ 2021-09-07 186/week @ 2021-09-14 139/week @ 2021-09-21 162/week @ 2021-09-28 173/week @ 2021-10-05 172/week @ 2021-10-12 204/week @ 2021-10-19 158/week @ 2021-10-26 174/week @ 2021-11-02 77/week @ 2021-11-09 250/week @ 2021-11-16 149/week @ 2021-11-23 187/week @ 2021-11-30

687 downloads per month

ISC license

61KB
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

~7MB
~151K SLoC

ya