eslint-plugin-json-schema-validator
Version:
ESLint plugin that validates data using JSON Schema Validator.
1 lines • 7.18 kB
JSON
{"$schema":"http://json-schema.org/draft-04/schema#","title":"API Builder Schema","properties":{"name":{"type":"string"},"apidoc":{"$ref":"#/definitions/apidoc"},"info":{"$ref":"#/definitions/info"},"namespace":{"type":"string"},"base_url":{"type":"string"},"description":{"type":"string"},"imports":{"type":"array","items":{"$ref":"#/definitions/import"}},"headers":{"type":"array","items":{"$ref":"#/definitions/header"}},"enums":{"$ref":"#/definitions/enum"},"interfaces":{"$ref":"#/definitions/interface"},"models":{"$ref":"#/definitions/model"},"unions":{"$ref":"#/definitions/union"},"resources":{"$ref":"#/definitions/resource"},"attributes":{"type":"array","items":{"$ref":"#/definitions/attribute"}},"annotations":{"type":"array","items":{"type":"string"}}},"definitions":{"apidoc":{"type":"object","properties":{"version":{"type":"string"}},"required":["version"],"additionalProperties":false},"info":{"type":"object","properties":{"contact":{"$ref":"#/definitions/contact"},"license":{"$ref":"#/definitions/license"}},"additionalProperties":false},"contact":{"type":"object","properties":{"name":{"type":"string"},"url":{"type":"string"},"email":{"type":"string"}},"additionalProperties":false},"license":{"type":"object","properties":{"name":{"type":"string"},"url":{"type":"string"}},"required":["name"],"additionalProperties":false},"import":{"type":"object","properties":{"uri":{"type":"string"}},"required":["uri"],"additionalProperties":false},"header":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"required":{"type":"boolean","default":true},"default":{},"description":{"type":"string"},"attributes":{"type":"array","items":{"$ref":"#/definitions/attribute"}},"deprecation":{"$ref":"#/definitions/deprecation"}},"required":["name","type"],"additionalProperties":false},"attribute":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"object"}},"required":["name","value"],"additionalProperties":false},"deprecation":{"type":"object","properties":{"description":{"type":"string"}},"additionalProperties":false},"enum":{"type":"object","patternProperties":{"^[a-zA-Z0-9_]*$":{"type":"object","properties":{"plural":{"type":"string"},"description":{"type":"string"},"values":{"type":"array","items":{"$ref":"#/definitions/enumvalues"}},"attributes":{"type":"array","items":{"$ref":"#/definitions/attribute"}},"deprecation":{"$ref":"#/definitions/deprecation"}},"required":["values"],"additionalProperties":false}}},"enumvalues":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"},"description":{"type":"string"},"attributes":{"type":"array","items":{"$ref":"#/definitions/attribute"}},"deprecation":{"$ref":"#/definitions/deprecation"}},"required":["name"],"additionalProperties":false},"interface":{"type":"object","patternProperties":{"^[a-zA-Z0-9_]*$":{"type":"object","properties":{"plural":{"type":"string"},"description":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/definitions/field"}},"attributes":{"type":"array","items":{"$ref":"#/definitions/attribute"}},"deprecation":{"$ref":"#/definitions/deprecation"}},"required":["values"],"additionalProperties":false}}},"field":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-zA-Z0-9_]*$"},"type":{"type":"string"},"description":{"type":"string"},"required":{"type":"boolean","default":true},"default":{},"example":{"type":"string"},"minimum":{"type":"integer"},"maximum":{"type":"integer"},"attributes":{"type":"array","items":{"$ref":"#/definitions/attribute"}},"deprecation":{"$ref":"#/definitions/deprecation"},"annotations":{"type":"array","items":{"type":"string"}}},"required":["name","type"],"additionalProperties":false},"model":{"type":"object","patternProperties":{"^[a-zA-Z0-9_]*$":{"type":"object","properties":{"description":{"type":"string"},"plural":{"type":"string"},"interfaces":{"$ref":"#/definitions/interface"},"fields":{"type":"array","items":{"$ref":"#/definitions/field"}},"attributes":{"type":"array","items":{"$ref":"#/definitions/attribute"}},"deprecation":{"$ref":"#/definitions/deprecation"}}}},"required":[],"additionalProperties":false},"union":{"type":"object","patternProperties":{"^[a-zA-Z0-9_]*$":{"type":"object","properties":{"plural":{"type":"string"},"discriminator":{"type":"string"},"description":{"type":"string"},"interfaces":{"$ref":"#/definitions/interface"},"types":{"type":"array","items":{"$ref":"#/definitions/uniontype"}},"attributes":{"type":"array","items":{"$ref":"#/definitions/attribute"}},"deprecation":{"$ref":"#/definitions/deprecation"}},"required":["types"],"additionalProperties":false}},"required":[],"additionalProperties":false},"uniontype":{"type":"object","properties":{"type":{"type":"string"},"description":{"type":"string"},"default":{"type":"boolean"},"discriminator_value":{"type":"string"},"attributes":{"type":"array","items":{"$ref":"#/definitions/attribute"}},"deprecation":{"$ref":"#/definitions/deprecation"}},"required":["type"],"additionalProperties":false},"resource":{"type":"object","patternProperties":{"^[a-zA-Z0-9_.]*$":{"type":"object","properties":{"path":{"type":"string"},"description":{"type":"string"},"operations":{"type":"array","items":{"$ref":"#/definitions/operation"}},"attributes":{"type":"array","items":{"$ref":"#/definitions/attribute"}},"deprecation":{"$ref":"#/definitions/deprecation"}},"required":["operations"],"additionalProperties":false}},"additionalProperties":false},"operation":{"type":"object","properties":{"method":{"type":"string"},"path":{"type":"string"},"description":{"type":"string"},"body":{"$ref":"#/definitions/body"},"parameters":{"type":"array","items":{"$ref":"#/definitions/parameter"}},"responses":{"$ref":"#/definitions/response"},"attributes":{"type":"array","items":{"$ref":"#/definitions/attribute"}},"deprecation":{"$ref":"#/definitions/deprecation"}},"required":["method"],"additionalProperties":false},"parameter":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-zA-Z0-9_]*$"},"type":{"type":"string"},"location":{"type":"string"},"description":{"type":"string"},"required":{"type":"boolean","default":true},"default":{},"example":{"type":"string"},"minimum":{"type":"integer"},"maximum":{"type":"integer"},"attributes":{"type":"array","items":{"$ref":"#/definitions/attribute"}},"deprecation":{"$ref":"#/definitions/deprecation"}},"required":["name","type"],"additionalProperties":false},"response":{"type":"object","patternProperties":{"^[0-9]*$":{"type":"object","properties":{"type":{"type":"string"},"headers":{"type":"array","items":{"$ref":"#/definitions/header"}},"description":{"type":"string"},"attributes":{"type":"array","items":{"$ref":"#/definitions/attribute"}},"deprecation":{"$ref":"#/definitions/deprecation"}},"required":["type"],"additionalProperties":false}},"additionalProperties":false},"body":{"type":"object","properties":{"type":{"type":"string"},"description":{"type":"string"},"attributes":{"type":"array","items":{"$ref":"#/definitions/attribute"}},"deprecation":{"$ref":"#/definitions/deprecation"}},"required":["type"],"additionalProperties":false}},"required":["name"],"additionalProperties":false}