NewSchema instantiates a new JSON schema.
()
| 114 | |
| 115 | // NewSchema instantiates a new JSON schema. |
| 116 | func NewSchema() *Schema { |
| 117 | js := Schema{ |
| 118 | Properties: make(map[string]*Schema), |
| 119 | Defs: make(map[string]*Schema), |
| 120 | } |
| 121 | return &js |
| 122 | } |
| 123 | |
| 124 | // JSON serializes the schema into JSON. It makes sure the "$schema" standard |
| 125 | // field is set if needed prior to delegating to the standard JSON marshaler. |
no outgoing calls
no test coverage detected