#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

#2304 in Database interfaces

Download history 8/week @ 2024-02-19 23/week @ 2024-02-26 16/week @ 2024-03-04 33/week @ 2024-03-11

80 downloads per month

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–7MB
~128K SLoC