gensonschema

module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 19, 2024 License: MIT

README

gensonschema

Generate Go from Json Schema

gensonschema generate type-safe code from JSON Schema, with full support for allOf, oneOf, anyOf

Usage

Create a gensonschema.yaml:

output:
  package: gen
  file: generated.go

resources:
  - url: simple.yaml
    source: ./testdata/simple.yaml

generate:
  - simple.yaml

At the top of a go file, add:

//go:generate go run github.com/raphaelvigee/gensonschema/cmd

Directories

Path Synopsis
Code generated by github.com/raphaelvigee/gensonschema.
Code generated by github.com/raphaelvigee/gensonschema.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL