{ "$schema": "http://json-schema.org/schema#", "title": "sample", "type": "object", "properties": { "image": { "$ref": "#/definitions/link", "description": "Link to a PNG image" }, "object_types": { "$ref": "#/definitions/object_types", "description": "Object types supports." }, "person": { "$ref": "#/definitions/person", "description" : "humans" } }, "definitions": { "person": { "properties": { "name": { "type": "string" }, "age": { "type": "integer" } } }, "link": { "type": "object", "properties": { "href": { "type": "string", "format": "uri" }, "person": { "$ref": "#/definitions/person" } }, "required": [ "href" ] }, "object_types": { "type": "object", "additionalProperties": { "$ref": "#/definitions/object_type", "description": "Each additional property is an object type." } }, "object_type": { "type": "object", "properties": { "doc": { "$ref": "#/definitions/link", "description": "Link to the schema of the object type." }, "fields": { "type": "object", "additionalProperties": { "$ref": "#/definitions/input_field", "description": "Each additional property describes an input field." } }, "pollable": { "type": "boolean", "description": "A hint for the client that polling for this object_type might produce objects containing new data." }, "metadata": { "type": "object", "description": "Free form key-value pairs. Can contain additional metadata about the object_type, if anything is required by client." }, "endpoint": { "$ref": "#/definitions/link", "description": "Link to an endpoint that produces this object_type." } }, "required": [ "endpoint" ] }, "input_field": { "type": "object", "properties": { "regex": { "type": "string", "description": "Regular expression that can be used by client to capture valid inputs, from a text line or paragraph." }, "capture_group": { "type": "integer", "description": "Which parentheses group of the regex captured text to be used." }, "env": { "type": "string", "description": "To be collected from client's Environment variables and send in the request." }, "required": { "type": "boolean", "description": "A flag says if this input field is mandatory. If client knows this field then it can include in the request for better results." } }, "dependencies": { "regex": { "required": [ "capture_group" ] } } }, "http_methods": { "type": "string", "enum": [ "DELETE", "GET", "HEAD", "OPTIONS", "PATCH", "POST", "PUT", "TRACE" ] } } }