#openapi #swagger #generator

bin+lib oapi_generator

Code generator for OpenAPI specifications

28 releases

0.0.30 May 4, 2022
0.0.27 Mar 2, 2022
0.0.25 Oct 27, 2021
0.0.22 Jun 23, 2021
0.0.4 Jul 30, 2020

#31 in Template engine

Download history 72/week @ 2022-02-05 152/week @ 2022-02-12 54/week @ 2022-02-19 96/week @ 2022-02-26 85/week @ 2022-03-05 171/week @ 2022-03-12 198/week @ 2022-03-19 22/week @ 2022-03-26 30/week @ 2022-04-02 144/week @ 2022-04-09 30/week @ 2022-04-16 122/week @ 2022-04-23 227/week @ 2022-04-30 224/week @ 2022-05-07 536/week @ 2022-05-14 150/week @ 2022-05-21

1,201 downloads per month

ISC license

65KB
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
~153K SLoC