#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

#2288 in Database interfaces

Download history 7/week @ 2024-02-18 24/week @ 2024-02-25 14/week @ 2024-03-03 33/week @ 2024-03-10 10/week @ 2024-03-17 12/week @ 2024-03-24 38/week @ 2024-03-31

95 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

~4–6.5MB
~113K SLoC