github.com/alecthomas/jsonschema@v0.0.0-20220216202328-9eeeec9d044b/fixtures/custom_slice_type.json (about) 1 { 2 "$schema": "http://json-schema.org/draft-04/schema#", 3 "$ref": "#/definitions/CustomSliceOuter", 4 "definitions": { 5 "CustomSliceOuter": { 6 "type": "object", 7 "required": [ 8 "slice" 9 ], 10 "additionalProperties": false, 11 "properties": { 12 "slice": { 13 "$schema": "http://json-schema.org/draft-04/schema#", 14 "$ref": "#/definitions/CustomSliceType" 15 } 16 } 17 }, 18 "CustomSliceType": { 19 "oneOf": [ 20 { 21 "type": "string" 22 }, 23 { 24 "items": { 25 "type": "string" 26 }, 27 "type": "array" 28 } 29 ] 30 } 31 } 32 }