#json-schema #generate #applications #line #command #type #output

app schemafy-cli

Command line application for generating Rust types from Json Schema

1 unstable release

0.1.0 Oct 29, 2020

#133 in #json-schema

MIT license

6KB
67 lines

schemafy-cli

schemafy-cli is a tool which generates Rust structs from JSON Schema Draft 4 files. Output is dumped to standard output.

Usage:

schemafy-cli <path-to-schema-dir> | tee my_types.rs

or if we want this stuff to be prettier

schemafy-cli <path-to-schema-dir> | rustfmt |  tee my_types.rs

Example:

schemafy-cli ./resources/test | rustfmt | tee ocpp_16.rs

Dependencies

~5–13MB
~166K SLoC