{ "$schema": "http://json-schema.org/draft-04/schema#", "definitions": { "narrow-number": { "allOf": [ { "type": "integer" }, { "minimum": 1 } ] }, "JsonResponseBase": { "type": "object", "properties": { "result": { "type": "string" } } }, "JsonSuccessBase": { "description": "x", "allOf": [ { "$ref": "#/components/schemas/JsonResponseBase" }, { "required": [ "result", "msg" ], "properties": { "result": { "enum": [ "success" ] }, "msg": { "type": "string" } } } ] }, "JsonSuccess": { "allOf": [ { "$ref": "#/components/schemas/JsonSuccessBase" }, { "additionalProperties": false, "properties": { "result": {}, "msg": {} } } ] }, "but-not-that": { "type": "object", "properties": { "this": {}, "that": {} }, "not": { "required": [ "that" ] } }, "trim-fat": { "type": "object", "properties": { "a": {}, "b": {}, "c": {} }, "required": [ "a" ], "not": { "anyOf": [ { "required": [ "b" ] }, { "required": [ "c" ] } ] } }, "weird-enum": { "type": "object", "properties": { "pattern": { "type": "string" }, "pattern-regex": { "type": "string" }, "patterns": { "type": "string" }, "pattern-either": { "type": "string" } }, "oneOf": [ { "required": [ "pattern" ], "not": { "anyOf": [ { "required": [ "patterns" ] }, { "required": [ "pattern-either" ] }, { "required": [ "pattern-regex" ] } ] } }, { "required": [ "patterns" ], "not": { "anyOf": [ { "required": [ "pattern" ] }, { "required": [ "pattern-either" ] }, { "required": [ "pattern-regex" ] } ] } }, { "required": [ "pattern-either" ], "not": { "anyOf": [ { "required": [ "pattern" ] }, { "required": [ "patterns" ] }, { "required": [ "pattern-regex" ] } ] } }, { "required": [ "pattern-regex" ], "not": { "anyOf": [ { "required": [ "pattern" ] }, { "required": [ "patterns" ] }, { "required": [ "pattern-either" ] } ] } } ] }, "unsatisfiable-1": { "allOf": [ { "type": "string", "enum": [ "foo" ] }, { "type": "object", "properties": { "bar": {} } } ] }, "unsatisfiable-2": { "allOf": [ { "type": "object", "properties": { "action": { "type": "string", "enum": [ "foo" ] } }, "additionalProperties": false }, { "type": "object", "properties": { "action": { "type": "string", "enum": [ "bar" ] } }, "additionalProperties": false } ] }, "unsatisfiable-3": { "allOf": [ { "$ref": "#/definitions/unsatisfiable-3-a" }, { "type": "object", "properties": { "action": { "$ref": "#/definitions/unsatisfiable-3-b" } } } ] }, "unsatisfiable-3-a": { "type": "object", "properties": { "action": { "allOf": [ { "$ref": "#/definitions/unsatisfiable-3-c" } ] } } }, "unsatisfiable-3-b": { "type": "string", "enum": [ "bar" ] }, "unsatisfiable-3-c": { "type": "string", "enum": [ "foo" ] }, "pickingone": { "$comment": "TODO this generates an extra type for the pickingone-user dependency", "allOf": [ { "$ref": "#/definitions/pickingone-installation" }, { "type": "object", "required": [ "suspended_by" ], "properties": { "suspended_by": { "$ref": "#/definitions/pickingone-user" } } } ] }, "pickingone-installation": { "type": "object", "properties": { "suspended_by": { "oneOf": [ { "$ref": "#/definitions/pickingone-user" }, { "type": "null" } ] } } }, "pickingone-user": { "type": "object", "properties": { "email": { "type": [ "string", "null" ] } } }, "OrderDependentMerge": { "allOf": [ { "$ref": "#/components/schemas/BarProp" }, { "properties": { "baz": { "type": "boolean" } } } ], "required": [ "baz" ] }, "BarProp": { "properties": { "bar": { "bar": "string" } } }, "Unresolvable": { "$comment": "subschemas all end up unresolvable", "oneOf": [ { "type": "object", "properties": { "x": { "enum": [ "a" ] } }, "required": [ "x" ] }, { "type": "object", "properties": { "x": { "enum": [ "b" ] } }, "required": [ "x" ] } ], "type": "object", "properties": { "x": { "enum": [ "c" ] } }, "required": [ "x" ] }, "CommentedTypeMerged": { "description": "if we don't see this, we dropped the metadata", "type": "object", "properties": { "x": true }, "allOf": [ { "type": "object", "properties": { "y": true } } ] }, "HereAndThere": { "allOf": [ { "type": "object", "properties": { "foo": { "type": "string" } } } ], "oneOf": [ { "type": "object", "properties": { "bar": { "type": "string" } } }, { "type": "object", "properties": { "baz": { "type": "string" } } } ] } } }