Install TYML CLI tools with:
(Requires Rustβs cargo.)
This section describes the API generator.
Running this prints something like:
TYML: type checker for markup language
Usage: tyml-api-gen <COMMAND>
Commands:
server
client
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
-V, --version Print version
As shown, tyml-api-gen
has two subcommands.
The server command has three required arguments and one optional argument. Valid values are:
- KIND: Kind of server to generate
Allowed: rust-axum
- TYML: The TYML file to use for generation
- DIR: Destination directory (becomes a package/crate directory)
- NAME: Package/crate name, default is "api"
The client command has three required arguments and one optional argument. Valid values are:
- KIND: Kind of client to generate
Allowed: typescript, rust
- TYML: The TYML file to use for generation
- DIR: Destination directory (becomes a package/crate directory)
- NAME: Package/crate name, default is "api"