source: node_modules/@swagger-api/apidom-ns-json-schema-draft-4/cjs/elements/JSONSchema.cjs@ e48199a

main
Last change on this file since e48199a was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago

Initial commit

  • Property mode set to 100644
File size: 5.9 KB
RevLine 
[d24f17c]1"use strict";
2
3exports.__esModule = true;
4exports.default = void 0;
5var _apidomCore = require("@swagger-api/apidom-core");
6class JSONSchema extends _apidomCore.ObjectElement {
7 constructor(content, meta, attributes) {
8 super(content, meta, attributes);
9 this.element = 'JSONSchemaDraft4';
10 }
11
12 /**
13 * Core vocabulary
14 *
15 * URI: https://tools.ietf.org/html/draft-wright-json-schema-00
16 */
17
18 get idProp() {
19 return this.get('id');
20 }
21 set idProp(idProp) {
22 this.set('id', idProp);
23 }
24 get $schema() {
25 return this.get('$schema');
26 }
27 set $schema($schema) {
28 this.set('$schema', $schema);
29 }
30
31 /**
32 * Validation vocabulary
33 *
34 * URI: https://tools.ietf.org/html/draft-wright-json-schema-validation-00
35 */
36
37 /**
38 * Validation keywords for numeric instances (number and integer)
39 */
40
41 get multipleOf() {
42 return this.get('multipleOf');
43 }
44 set multipleOf(multipleOf) {
45 this.set('multipleOf', multipleOf);
46 }
47 get maximum() {
48 return this.get('maximum');
49 }
50 set maximum(maximum) {
51 this.set('maximum', maximum);
52 }
53 get exclusiveMaximum() {
54 return this.get('exclusiveMaximum');
55 }
56 set exclusiveMaximum(exclusiveMaximum) {
57 this.set('exclusiveMaximum', exclusiveMaximum);
58 }
59 get minimum() {
60 return this.get('minimum');
61 }
62 set minimum(minimum) {
63 this.set('minimum', minimum);
64 }
65 get exclusiveMinimum() {
66 return this.get('exclusiveMinimum');
67 }
68 set exclusiveMinimum(exclusiveMinimum) {
69 this.set('exclusiveMinimum', exclusiveMinimum);
70 }
71
72 /**
73 * Validation keywords for strings
74 */
75
76 get maxLength() {
77 return this.get('maxLength');
78 }
79 set maxLength(maxLength) {
80 this.set('maxLength', maxLength);
81 }
82 get minLength() {
83 return this.get('minLength');
84 }
85 set minLength(minLength) {
86 this.set('minLength', minLength);
87 }
88 get pattern() {
89 return this.get('pattern');
90 }
91 set pattern(pattern) {
92 this.set('pattern', pattern);
93 }
94
95 /**
96 * Validation keywords for arrays
97 */
98
99 get additionalItems() {
100 return this.get('additionalItems');
101 }
102 set additionalItems(additionalItems) {
103 this.set('additionalItems', additionalItems);
104 }
105 get items() {
106 return this.get('items');
107 }
108 set items(items) {
109 this.set('items', items);
110 }
111 get maxItems() {
112 return this.get('maxItems');
113 }
114 set maxItems(maxItems) {
115 this.set('maxItems', maxItems);
116 }
117 get minItems() {
118 return this.get('minItems');
119 }
120 set minItems(minItems) {
121 this.set('minItems', minItems);
122 }
123 get uniqueItems() {
124 return this.get('uniqueItems');
125 }
126 set uniqueItems(uniqueItems) {
127 this.set('uniqueItems', uniqueItems);
128 }
129
130 /**
131 * Validation keywords for objects
132 */
133
134 get maxProperties() {
135 return this.get('maxProperties');
136 }
137 set maxProperties(maxProperties) {
138 this.set('maxProperties', maxProperties);
139 }
140 get minProperties() {
141 return this.get('minProperties');
142 }
143 set minProperties(minProperties) {
144 this.set('minProperties', minProperties);
145 }
146 get required() {
147 return this.get('required');
148 }
149 set required(required) {
150 this.set('required', required);
151 }
152 get properties() {
153 return this.get('properties');
154 }
155 set properties(properties) {
156 this.set('properties', properties);
157 }
158 get additionalProperties() {
159 return this.get('additionalProperties');
160 }
161 set additionalProperties(additionalProperties) {
162 this.set('additionalProperties', additionalProperties);
163 }
164 get patternProperties() {
165 return this.get('patternProperties');
166 }
167 set patternProperties(patternProperties) {
168 this.set('patternProperties', patternProperties);
169 }
170 get dependencies() {
171 return this.get('dependencies');
172 }
173 set dependencies(dependencies) {
174 this.set('dependencies', dependencies);
175 }
176
177 /**
178 * Validation keywords for any instance type
179 */
180
181 get enum() {
182 return this.get('enum');
183 }
184 set enum(enumValue) {
185 this.set('enum', enumValue);
186 }
187 get type() {
188 return this.get('type');
189 }
190 set type(type) {
191 this.set('type', type);
192 }
193 get allOf() {
194 return this.get('allOf');
195 }
196 set allOf(allOf) {
197 this.set('allOf', allOf);
198 }
199 get anyOf() {
200 return this.get('anyOf');
201 }
202 set anyOf(anyOf) {
203 this.set('anyOf', anyOf);
204 }
205 get oneOf() {
206 return this.get('oneOf');
207 }
208 set oneOf(oneOf) {
209 this.set('oneOf', oneOf);
210 }
211 get not() {
212 return this.get('not');
213 }
214 set not(not) {
215 this.set('not', not);
216 }
217 get definitions() {
218 return this.get('definitions');
219 }
220 set definitions(definitions) {
221 this.set('definitions', definitions);
222 }
223
224 /**
225 * Metadata keywords
226 *
227 * URI: https://datatracker.ietf.org/doc/html/draft-wright-json-schema-validation-00#section-6
228 */
229
230 get title() {
231 return this.get('title');
232 }
233 set title(title) {
234 this.set('title', title);
235 }
236 get description() {
237 return this.get('description');
238 }
239 set description(description) {
240 this.set('description', description);
241 }
242 get default() {
243 return this.get('default');
244 }
245 set default(defaultValue) {
246 this.set('default', defaultValue);
247 }
248
249 /**
250 * Semantic validation with "format"
251 *
252 * URI: https://datatracker.ietf.org/doc/html/draft-wright-json-schema-validation-00#section-7
253 */
254
255 get format() {
256 return this.get('format');
257 }
258 set format(format) {
259 this.set('format', format);
260 }
261
262 /**
263 * JSON Hyper-Schema
264 *
265 * URI: https://datatracker.ietf.org/doc/html/draft-wright-json-schema-hyperschema-00
266 */
267
268 get base() {
269 return this.get('base');
270 }
271 set base(base) {
272 this.set('base', base);
273 }
274 get links() {
275 return this.get('links');
276 }
277 set links(links) {
278 this.set('links', links);
279 }
280 get media() {
281 return this.get('media');
282 }
283 set media(media) {
284 this.set('media', media);
285 }
286 get readOnly() {
287 return this.get('readOnly');
288 }
289 set readOnly(readOnly) {
290 this.set('readOnly', readOnly);
291 }
292}
293var _default = exports.default = JSONSchema;
Note: See TracBrowser for help on using the repository browser.