schemarshal

command module
Version: v0.0.0-...-05136e6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 4, 2018 License: BSD-2-Clause Imports: 12 Imported by: 0

README

schemarshal wercker status

Coverage Status Go Report Card FOSSA Status

Generates Go struct types from a JSON Schema.

Installation

go get -u github.com/aaharu/schemarshal

Usage

SYNOPSIS
  schemarshal [options] [<json_schema_file>]
OPTIONS
  -h, -help
           Show this help message.
  -f <file>, -file <file>
           Input file name.
  -o <file>, -output <file>
           Write output to file instead of stdout.
  -p <package>, -package <package>
           Package name for output. (default `main`)
  -t <package>, -type <package>
           Set default Type name.
  -v, -version
           Show version.
  -nc, -nocomment
           Do not output comments.
# with args
schemarshal -o api/schema/gen.go -p gen -f schema.json

# pipe
curl -s "https://raw.githubusercontent.com/aaharu/schemarshal/master/test_data/disk.json" | schemarshal

TODO

  • use go/ast

Examples

Dependencies

Similar Projects

License

BSD-2-Clause

FOSSA Status

Documentation

The Go Gopher

There is no documentation for this package.

Source Files

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL