Work in progress!
Input: openapi.yaml and set of paths / methods to be compiled
Output: well-formed structures for serde serialization / deserialization of request / response bodies and URL / Headers serialization.
I found that it is hard to find the compiler of openapi 3.x.x specifcation for Rust. However, this is pet-project that hopefully will be useful for wider audience in future.
Compilation is split to several phases:
- Parse openapi specification using serde (src/schema)
- Compile parsed specification. On this stage all references are resolved and only required schema objects are collected.
- Build model from compiled object. On this stage all objects are flattened and ready for the code generation. (in-progress)
- Code generation. Initially I plan Rust code generator. However I'll leave open possibility for generation for other languages. (todo)
- OpenAPITools / openapi-generator written in Java. Supports output in many languages.
- paperclip-rs / paperclip Rust native tooling for openapi specifications.
- x52dev / oas3-rs Rust native openapi 3.1 specifications.
MIT