source: node_modules/@swagger-api/apidom-ns-openapi-3-1/es/elements/Schema.mjs

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

Initial commit

  • Property mode set to 100644
File size: 10.2 KB
RevLine 
[d24f17c]1import { ObjectElement } from '@swagger-api/apidom-core';
2class Schema extends ObjectElement {
3 constructor(content, meta, attributes) {
4 super(content, meta, attributes);
5 this.element = 'schema';
6 }
7
8 /**
9 * Core vocabulary
10 *
11 * URI: https://json-schema.org/draft/2020-12/vocab/core
12 */
13
14 get $schema() {
15 return this.get('$schema');
16 }
17 set $schema($schema) {
18 this.set('$schema', $schema);
19 }
20 get $vocabulary() {
21 return this.get('$vocabulary');
22 }
23 set $vocabulary($vocabulary) {
24 this.set('$vocabulary', $vocabulary);
25 }
26 get $id() {
27 return this.get('$id');
28 }
29 set $id($id) {
30 this.set('$id', $id);
31 }
32 get $anchor() {
33 return this.get('$anchor');
34 }
35 set $anchor($anchor) {
36 this.set('$anchor', $anchor);
37 }
38 get $dynamicAnchor() {
39 return this.get('$dynamicAnchor');
40 }
41 set $dynamicAnchor($dynamicAnchor) {
42 this.set('$dynamicAnchor', $dynamicAnchor);
43 }
44 get $dynamicRef() {
45 return this.get('$dynamicRef');
46 }
47 set $dynamicRef($dynamicRef) {
48 this.set('$dynamicRef', $dynamicRef);
49 }
50 get $ref() {
51 return this.get('$ref');
52 }
53 set $ref($ref) {
54 this.set('$ref', $ref);
55 }
56 get $defs() {
57 return this.get('$defs');
58 }
59 set $defs($defs) {
60 this.set('$defs', $defs);
61 }
62 get $comment() {
63 return this.get('$comment');
64 }
65 set $comment($comment) {
66 this.set('$comment', $comment);
67 }
68
69 /**
70 * Applicator vocabulary
71 *
72 * URI: https://json-schema.org/draft/2020-12/vocab/applicator
73 */
74
75 get allOf() {
76 return this.get('allOf');
77 }
78 set allOf(allOf) {
79 this.set('allOf', allOf);
80 }
81 get anyOf() {
82 return this.get('anyOf');
83 }
84 set anyOf(anyOf) {
85 this.set('anyOf', anyOf);
86 }
87 get oneOf() {
88 return this.get('oneOf');
89 }
90 set oneOf(oneOf) {
91 this.set('oneOf', oneOf);
92 }
93 get not() {
94 return this.get('not');
95 }
96 set not(not) {
97 this.set('not', not);
98 }
99 get if() {
100 return this.get('if');
101 }
102 set if(ifSchema) {
103 this.set('if', ifSchema);
104 }
105 get then() {
106 return this.get('then');
107 }
108 set then(thenSchema) {
109 this.set('then', thenSchema);
110 }
111 get else() {
112 return this.get('else');
113 }
114 set else(elseSchema) {
115 this.set('else', elseSchema);
116 }
117 get dependentSchemas() {
118 return this.get('dependentSchemas');
119 }
120 set dependentSchemas(dependentSchemas) {
121 this.set('dependentSchemas', dependentSchemas);
122 }
123 get prefixItems() {
124 return this.get('prefixItems');
125 }
126 set prefixItems(prefixItems) {
127 this.set('prefixItems', prefixItems);
128 }
129 get items() {
130 return this.get('items');
131 }
132 set items(items) {
133 this.set('items', items);
134 }
135 get containsProp() {
136 return this.get('contains');
137 }
138 set containsProp(containsProp) {
139 this.set('contains', containsProp);
140 }
141 get properties() {
142 return this.get('properties');
143 }
144 set properties(properties) {
145 this.set('properties', properties);
146 }
147 get patternProperties() {
148 return this.get('patternProperties');
149 }
150 set patternProperties(patternProperties) {
151 this.set('patternProperties', patternProperties);
152 }
153 get additionalProperties() {
154 return this.get('additionalProperties');
155 }
156 set additionalProperties(additionalProperties) {
157 this.set('additionalProperties', additionalProperties);
158 }
159 get propertyNames() {
160 return this.get('propertyNames');
161 }
162 set propertyNames(propertyNames) {
163 this.set('propertyNames', propertyNames);
164 }
165
166 /**
167 * Unevaluated Locations vocabulary
168 *
169 * URI: https://json-schema.org/draft/2020-12/vocab/unevaluated
170 */
171
172 get unevaluatedItems() {
173 return this.get('unevaluatedItems');
174 }
175 set unevaluatedItems(unevaluatedItems) {
176 this.set('unevaluatedItems', unevaluatedItems);
177 }
178 get unevaluatedProperties() {
179 return this.get('unevaluatedProperties');
180 }
181 set unevaluatedProperties(unevaluatedProperties) {
182 this.set('unevaluatedProperties', unevaluatedProperties);
183 }
184
185 /**
186 * Validation vocabulary
187 *
188 * URI: https://json-schema.org/draft/2020-12/vocab/validation
189 */
190
191 /**
192 * Validation Keywords for Any Instance Type
193 *
194 * URI: https://json-schema.org/draft/2020-12/json-schema-validation.html#rfc.section.6.1
195 */
196
197 get type() {
198 return this.get('type');
199 }
200 set type(type) {
201 this.set('type', type);
202 }
203 get enum() {
204 return this.get('enum');
205 }
206 set enum(enumVal) {
207 this.set('enum', enumVal);
208 }
209 get const() {
210 return this.get('const');
211 }
212 set const(constVal) {
213 this.set('const', constVal);
214 }
215
216 /**
217 * Validation Keywords for Numeric Instances (number and integer)
218 *
219 * URI: https://json-schema.org/draft/2020-12/json-schema-validation.html#numeric
220 */
221
222 get multipleOf() {
223 return this.get('multipleOf');
224 }
225 set multipleOf(multipleOf) {
226 this.set('multipleOf', multipleOf);
227 }
228 get maximum() {
229 return this.get('maximum');
230 }
231 set maximum(maximum) {
232 this.set('maximum', maximum);
233 }
234 get exclusiveMaximum() {
235 return this.get('exclusiveMaximum');
236 }
237 set exclusiveMaximum(exclusiveMaximum) {
238 this.set('exclusiveMaximum', exclusiveMaximum);
239 }
240 get minimum() {
241 return this.get('minimum');
242 }
243 set minimum(minimum) {
244 this.set('minimum', minimum);
245 }
246 get exclusiveMinimum() {
247 return this.get('exclusiveMinimum');
248 }
249 set exclusiveMinimum(exclusiveMinimum) {
250 this.set('exclusiveMinimum', exclusiveMinimum);
251 }
252
253 /**
254 * Validation Keywords for Strings
255 *
256 * URI: https://json-schema.org/draft/2020-12/json-schema-validation.html#string
257 */
258
259 get maxLength() {
260 return this.get('maxLength');
261 }
262 set maxLength(maxLength) {
263 this.set('maxLength', maxLength);
264 }
265 get minLength() {
266 return this.get('minLength');
267 }
268 set minLength(minLength) {
269 this.set('minLength', minLength);
270 }
271 get pattern() {
272 return this.get('pattern');
273 }
274 set pattern(pattern) {
275 this.set('pattern', pattern);
276 }
277
278 /**
279 * Validation Keywords for Arrays
280 *
281 * URI: https://json-schema.org/draft/2020-12/json-schema-validation.html#rfc.section.6.4
282 */
283
284 get maxItems() {
285 return this.get('maxItems');
286 }
287 set maxItems(maxItems) {
288 this.set('maxItems', maxItems);
289 }
290 get minItems() {
291 return this.get('minItems');
292 }
293 set minItems(minItems) {
294 this.set('minItems', minItems);
295 }
296 get uniqueItems() {
297 return this.get('uniqueItems');
298 }
299 set uniqueItems(uniqueItems) {
300 this.set('uniqueItems', uniqueItems);
301 }
302 get maxContains() {
303 return this.get('maxContains');
304 }
305 set maxContains(maxContains) {
306 this.set('maxContains', maxContains);
307 }
308 get minContains() {
309 return this.get('minContains');
310 }
311 set minContains(minContains) {
312 this.set('minContains', minContains);
313 }
314
315 /**
316 * Validation Keywords for Objects
317 *
318 * URI: https://json-schema.org/draft/2020-12/json-schema-validation.html#rfc.section.6.5
319 */
320
321 get maxProperties() {
322 return this.get('maxProperties');
323 }
324 set maxProperties(maxProperties) {
325 this.set('maxProperties', maxProperties);
326 }
327 get minProperties() {
328 return this.get('minProperties');
329 }
330 set minProperties(minProperties) {
331 this.set('minProperties', minProperties);
332 }
333 get required() {
334 return this.get('required');
335 }
336 set required(required) {
337 this.set('required', required);
338 }
339 get dependentRequired() {
340 return this.get('dependentRequired');
341 }
342 set dependentRequired(dependentRequired) {
343 this.set('dependentRequired', dependentRequired);
344 }
345
346 /**
347 * Vocabulary for Basic Meta-Data Annotations
348 *
349 * URI: https://json-schema.org/draft/2020-12/vocab/meta-data
350 */
351
352 get title() {
353 return this.get('title');
354 }
355 set title(title) {
356 this.set('title', title);
357 }
358 get description() {
359 return this.get('description');
360 }
361 set description(description) {
362 this.set('description', description);
363 }
364 get default() {
365 return this.get('default');
366 }
367 set default(defaultVal) {
368 this.set('default', defaultVal);
369 }
370 get deprecated() {
371 return this.get('deprecated');
372 }
373 set deprecated(deprecated) {
374 this.set('deprecated', deprecated);
375 }
376 get readOnly() {
377 return this.get('readOnly');
378 }
379 set readOnly(readOnly) {
380 this.set('readOnly', readOnly);
381 }
382 get writeOnly() {
383 return this.get('writeOnly');
384 }
385 set writeOnly(writeOnly) {
386 this.set('writeOnly', writeOnly);
387 }
388 get examples() {
389 return this.get('examples');
390 }
391 set examples(examples) {
392 this.set('examples', examples);
393 }
394
395 /**
396 * Vocabularies for Semantic Content With "format"
397 *
398 * URI: https://json-schema.org/draft/2020-12/vocab/format-annotation
399 */
400
401 get format() {
402 return this.get('format');
403 }
404 set format(format) {
405 this.set('format', format);
406 }
407
408 /**
409 * Vocabulary for the Contents of String-Encoded Data
410 *
411 * URI: https://json-schema.org/draft/2020-12/vocab/content
412 */
413
414 get contentEncoding() {
415 return this.get('contentEncoding');
416 }
417 set contentEncoding(contentEncoding) {
418 this.set('contentEncoding', contentEncoding);
419 }
420 get contentMediaType() {
421 return this.get('contentMediaType');
422 }
423 set contentMediaType(contentMediaType) {
424 this.set('contentMediaType', contentMediaType);
425 }
426 get contentSchema() {
427 return this.get('contentSchema');
428 }
429 set contentSchema(contentSchema) {
430 this.set('contentSchema', contentSchema);
431 }
432
433 /**
434 * OAS base vocabulary
435 *
436 * URI: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#baseVocabulary
437 */
438
439 get discriminator() {
440 return this.get('discriminator');
441 }
442 set discriminator(discriminator) {
443 this.set('discriminator', discriminator);
444 }
445 get xml() {
446 return this.get('xml');
447 }
448 set xml(xml) {
449 this.set('xml', xml);
450 }
451 get externalDocs() {
452 return this.get('externalDocs');
453 }
454 set externalDocs(externalDocs) {
455 this.set('externalDocs', externalDocs);
456 }
457
458 /**
459 * @deprecated The example property has been deprecated in favor of the JSON Schema examples keyword. Use of example is discouraged, and later versions of this specification may remove it.
460 */
461 get example() {
462 return this.get('example');
463 }
464
465 /**
466 * @deprecated The example property has been deprecated in favor of the JSON Schema examples keyword. Use of example is discouraged, and later versions of this specification may remove it.
467 */
468 set example(example) {
469 this.set('example', example);
470 }
471}
472export default Schema;
Note: See TracBrowser for help on using the repository browser.