8 releases

Uses new Rust 2024

0.3.1 Aug 19, 2025
0.3.0 Aug 18, 2025
0.2.5 Aug 5, 2024

#338 in HTTP server

Download history

401 downloads per month

LGPL-3.0

275KB
7K SLoC

Rust 6K SLoC // 0.0% comments Handlebars 1.5K SLoC AsciiDoc 60 SLoC

Argentum ToolKit. REST Generator.

REST Generator is a tools that creates API libraries from OpenAPI specification.

Supported generators

Language Type Supported versions
Rust Server side API package 3.1 and 3

Key features

  • Parsing instead of validation
  • Generated code compatible with Argentum REST
  • Clean and human-readable error responses
  • Low code duplication in generated code
  • Extendable and reusable generated code

How to install

Via cargo install

cargo install argentum_rest_generator_app
git clone git@gitlab.com:argentum-toolkit/argentum.git

cargo install --path argentum_rest_generator_app/

How to use

argentum_rest_generator_app --input api-doc/openapi.yaml --output rest/ --package-name user_account_rest

Or you can generate via cargo run (sources should be cloned)

cd argentum/argentum_rest_generator_app

cargo run --   --input ../argentum_user_account/api-doc/openapi.yaml --output ../argentum_user_account/rest/ --package-name argentum_user_account_rest

Restrictions

  • supports only $ref params in case if OpenAPI objects supports $ref. (Doesn’t support inline objects in this case)
  • Schemas supports only Object type (Array, AnyOf, AllOf are not implemented yet)
  • we don’t use OpenAPI tags. If you need similar functionality, we would like to recommend split your API to packages

Dependencies

~17–35MB
~471K SLoC