MQTTSuite
Loading...
Searching...
No Matches
json-schema-draft7.json.cpp
Go to the documentation of this file.
1/*
2 * JSON schema validator for JSON for modern C++
3 *
4 * Copyright (c) 2016-2019 Patrick Boettcher <p@yai.se>.
5 *
6 * SPDX-License-Identifier: MIT
7 *
8 */
9#include <nlohmann/json.hpp>
10
11namespace nlohmann
12{
13namespace json_schema
14{
15
17 "$schema": "http://json-schema.org/draft-07/schema#",
18 "$id": "http://json-schema.org/draft-07/schema#",
19 "title": "Core schema meta-schema",
20 "definitions": {
21 "schemaArray": {
22 "type": "array",
23 "minItems": 1,
24 "items": { "$ref": "#" }
25 },
26 "nonNegativeInteger": {
27 "type": "integer",
28 "minimum": 0
29 },
30 "nonNegativeIntegerDefault0": {
31 "allOf": [
32 { "$ref": "#/definitions/nonNegativeInteger" },
33 { "default": 0 }
34 ]
35 },
36 "simpleTypes": {
37 "enum": [
38 "array",
39 "boolean",
40 "integer",
41 "null",
42 "number",
43 "object",
44 "string"
45 ]
46 },
47 "stringArray": {
48 "type": "array",
49 "items": { "type": "string" },
50 "uniqueItems": true,
51 "default": []
52 }
53 },
54 "type": ["object", "boolean"],
55 "properties": {
56 "$id": {
57 "type": "string",
58 "format": "uri-reference"
59 },
60 "$schema": {
61 "type": "string",
62 "format": "uri"
63 },
64 "$ref": {
65 "type": "string",
66 "format": "uri-reference"
67 },
68 "$comment": {
69 "type": "string"
70 },
71 "title": {
72 "type": "string"
73 },
74 "description": {
75 "type": "string"
76 },
77 "default": true,
78 "readOnly": {
79 "type": "boolean",
80 "default": false
81 },
82 "examples": {
83 "type": "array",
84 "items": true
85 },
86 "multipleOf": {
87 "type": "number",
88 "exclusiveMinimum": 0
89 },
90 "maximum": {
91 "type": "number"
92 },
93 "exclusiveMaximum": {
94 "type": "number"
95 },
96 "minimum": {
97 "type": "number"
98 },
99 "exclusiveMinimum": {
100 "type": "number"
101 },
102 "maxLength": { "$ref": "#/definitions/nonNegativeInteger" },
103 "minLength": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
104 "pattern": {
105 "type": "string",
106 "format": "regex"
107 },
108 "additionalItems": { "$ref": "#" },
109 "items": {
110 "anyOf": [
111 { "$ref": "#" },
112 { "$ref": "#/definitions/schemaArray" }
113 ],
114 "default": true
115 },
116 "maxItems": { "$ref": "#/definitions/nonNegativeInteger" },
117 "minItems": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
118 "uniqueItems": {
119 "type": "boolean",
120 "default": false
121 },
122 "contains": { "$ref": "#" },
123 "maxProperties": { "$ref": "#/definitions/nonNegativeInteger" },
124 "minProperties": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
125 "required": { "$ref": "#/definitions/stringArray" },
126 "additionalProperties": { "$ref": "#" },
127 "definitions": {
128 "type": "object",
129 "additionalProperties": { "$ref": "#" },
130 "default": {}
131 },
132 "properties": {
133 "type": "object",
134 "additionalProperties": { "$ref": "#" },
135 "default": {}
136 },
137 "patternProperties": {
138 "type": "object",
139 "additionalProperties": { "$ref": "#" },
140 "propertyNames": { "format": "regex" },
141 "default": {}
142 },
143 "dependencies": {
144 "type": "object",
145 "additionalProperties": {
146 "anyOf": [
147 { "$ref": "#" },
148 { "$ref": "#/definitions/stringArray" }
149 ]
150 }
151 },
152 "propertyNames": { "$ref": "#" },
153 "const": true,
154 "enum": {
155 "type": "array",
156 "items": true,
157 "minItems": 1,
158 "uniqueItems": true
159 },
160 "type": {
161 "anyOf": [
162 { "$ref": "#/definitions/simpleTypes" },
163 {
164 "type": "array",
165 "items": { "$ref": "#/definitions/simpleTypes" },
166 "minItems": 1,
167 "uniqueItems": true
168 }
169 ]
170 },
171 "format": { "type": "string" },
172 "contentMediaType": { "type": "string" },
173 "contentEncoding": { "type": "string" },
174 "if": { "$ref": "#" },
175 "then": { "$ref": "#" },
176 "else": { "$ref": "#" },
177 "allOf": { "$ref": "#/definitions/schemaArray" },
178 "anyOf": { "$ref": "#/definitions/schemaArray" },
179 "oneOf": { "$ref": "#/definitions/schemaArray" },
180 "not": { "$ref": "#" }
181 },
182 "default": true
183} )"_json;
184}
185} // namespace nlohmann