argentum_rest_generator_app

Crates.ioargentum_rest_generator_app
lib.rsargentum_rest_generator_app
version0.2.5
sourcesrc
created_at2024-08-01 20:07:39.188782
updated_at2024-08-05 23:28:28.307381
descriptionArgentum toolkit REST generator
homepagehttps://github.com/argentum-toolkit/argentum
repositoryhttps://github.com/argentum-toolkit/argentum
max_upload_size
id1322461
size162,465
Vital Leshchyk (itcreator)

documentation

https://github.com/argentum-toolkit/argentum

README

= Argentum ToolKit. REST Generator.

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

Supported generators

[cols="1,3,1"] |=== |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

[source,shell]

cargo install argentum_rest_generator_app

.From source codes .Clone [source,shell]

git clone git@gitlab.com:argentum-toolkit/argentum.git


.Install binary [source,shell]

cargo install --path argentum_rest_generator_app/


== How to use

.Generate REST API server library [source,shell]

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)

.Example [source,shell]

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 embedded 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
Commit count: 0

cargo fmt