[d24f17c] | 1 | import { UnsupportedOperationError } from '@swagger-api/apidom-error';
|
---|
| 2 | import { JSONSchemaElement } from '@swagger-api/apidom-ns-json-schema-draft-4';
|
---|
| 3 | /* eslint-disable class-methods-use-this */
|
---|
| 4 | class Schema extends JSONSchemaElement {
|
---|
| 5 | constructor(content, meta, attributes) {
|
---|
| 6 | super(content, meta, attributes);
|
---|
| 7 | this.element = 'schema';
|
---|
| 8 | this.classes.push('json-schema-draft-4');
|
---|
| 9 | }
|
---|
| 10 |
|
---|
| 11 | /**
|
---|
| 12 | * Core vocabulary
|
---|
| 13 | *
|
---|
| 14 | * URI: https://tools.ietf.org/html/draft-wright-json-schema-00
|
---|
| 15 | */
|
---|
| 16 | get idProp() {
|
---|
| 17 | throw new UnsupportedOperationError('idProp getter in Schema class is not not supported.');
|
---|
| 18 | }
|
---|
| 19 | set idProp(idProps) {
|
---|
| 20 | throw new UnsupportedOperationError('idProp setter in Schema class is not not supported.');
|
---|
| 21 | }
|
---|
| 22 | get $schema() {
|
---|
| 23 | throw new UnsupportedOperationError('$schema getter in Schema class is not not supported.');
|
---|
| 24 | }
|
---|
| 25 | set $schema($schema) {
|
---|
| 26 | throw new UnsupportedOperationError('$schema setter in Schema class is not not supported.');
|
---|
| 27 | }
|
---|
| 28 |
|
---|
| 29 | /**
|
---|
| 30 | * Validation keywords for arrays
|
---|
| 31 | */
|
---|
| 32 |
|
---|
| 33 | get additionalItems() {
|
---|
| 34 | return this.get('additionalItems');
|
---|
| 35 | }
|
---|
| 36 | set additionalItems(additionalItems) {
|
---|
| 37 | this.set('additionalItems', additionalItems);
|
---|
| 38 | }
|
---|
| 39 | get items() {
|
---|
| 40 | return this.get('items');
|
---|
| 41 | }
|
---|
| 42 | set items(items) {
|
---|
| 43 | this.set('items', items);
|
---|
| 44 | }
|
---|
| 45 |
|
---|
| 46 | /**
|
---|
| 47 | * Validation keywords for objects
|
---|
| 48 | */
|
---|
| 49 |
|
---|
| 50 | get additionalProperties() {
|
---|
| 51 | return this.get('additionalProperties');
|
---|
| 52 | }
|
---|
| 53 | set additionalProperties(additionalProperties) {
|
---|
| 54 | this.set('additionalProperties', additionalProperties);
|
---|
| 55 | }
|
---|
| 56 | get patternProperties() {
|
---|
| 57 | throw new UnsupportedOperationError('patternProperties getter in Schema class is not not supported.');
|
---|
| 58 | }
|
---|
| 59 | set patternProperties(patternProperties) {
|
---|
| 60 | throw new UnsupportedOperationError('patternProperties setter in Schema class is not not supported.');
|
---|
| 61 | }
|
---|
| 62 | get dependencies() {
|
---|
| 63 | throw new UnsupportedOperationError('dependencies getter in Schema class is not not supported.');
|
---|
| 64 | }
|
---|
| 65 | set dependencies(dependencies) {
|
---|
| 66 | throw new UnsupportedOperationError('dependencies setter in Schema class is not not supported.');
|
---|
| 67 | }
|
---|
| 68 |
|
---|
| 69 | /**
|
---|
| 70 | * Validation keywords for any instance type
|
---|
| 71 | */
|
---|
| 72 |
|
---|
| 73 | get type() {
|
---|
| 74 | return this.get('type');
|
---|
| 75 | }
|
---|
| 76 | set type(type) {
|
---|
| 77 | this.set('type', type);
|
---|
| 78 | }
|
---|
| 79 | get not() {
|
---|
| 80 | return this.get('not');
|
---|
| 81 | }
|
---|
| 82 | set not(not) {
|
---|
| 83 | this.set('not', not);
|
---|
| 84 | }
|
---|
| 85 | get definitions() {
|
---|
| 86 | throw new UnsupportedOperationError('definitions getter in Schema class is not not supported.');
|
---|
| 87 | }
|
---|
| 88 | set definitions(definitions) {
|
---|
| 89 | throw new UnsupportedOperationError('definitions setter in Schema class is not not supported.');
|
---|
| 90 | }
|
---|
| 91 |
|
---|
| 92 | /**
|
---|
| 93 | * JSON Hyper-Schema
|
---|
| 94 | *
|
---|
| 95 | * URI: https://datatracker.ietf.org/doc/html/draft-wright-json-schema-hyperschema-00
|
---|
| 96 | */
|
---|
| 97 |
|
---|
| 98 | get base() {
|
---|
| 99 | throw new UnsupportedOperationError('base getter in Schema class is not not supported.');
|
---|
| 100 | }
|
---|
| 101 | set base(base) {
|
---|
| 102 | throw new UnsupportedOperationError('base setter in Schema class is not not supported.');
|
---|
| 103 | }
|
---|
| 104 | get links() {
|
---|
| 105 | throw new UnsupportedOperationError('links getter in Schema class is not not supported.');
|
---|
| 106 | }
|
---|
| 107 | set links(links) {
|
---|
| 108 | throw new UnsupportedOperationError('links setter in Schema class is not not supported.');
|
---|
| 109 | }
|
---|
| 110 | get media() {
|
---|
| 111 | throw new UnsupportedOperationError('media getter in Schema class is not not supported.');
|
---|
| 112 | }
|
---|
| 113 | set media(media) {
|
---|
| 114 | throw new UnsupportedOperationError('media setter in Schema class is not not supported.');
|
---|
| 115 | }
|
---|
| 116 |
|
---|
| 117 | /**
|
---|
| 118 | * OpenAPI vocabulary
|
---|
| 119 | */
|
---|
| 120 |
|
---|
| 121 | get nullable() {
|
---|
| 122 | return this.get('nullable');
|
---|
| 123 | }
|
---|
| 124 | set nullable(nullable) {
|
---|
| 125 | this.set('nullable', nullable);
|
---|
| 126 | }
|
---|
| 127 | get discriminator() {
|
---|
| 128 | return this.get('discriminator');
|
---|
| 129 | }
|
---|
| 130 | set discriminator(discriminator) {
|
---|
| 131 | this.set('discriminator', discriminator);
|
---|
| 132 | }
|
---|
| 133 | get writeOnly() {
|
---|
| 134 | return this.get('writeOnly');
|
---|
| 135 | }
|
---|
| 136 | set writeOnly(writeOnly) {
|
---|
| 137 | this.set('writeOnly', writeOnly);
|
---|
| 138 | }
|
---|
| 139 | get xml() {
|
---|
| 140 | return this.get('xml');
|
---|
| 141 | }
|
---|
| 142 | set xml(xml) {
|
---|
| 143 | this.set('xml', xml);
|
---|
| 144 | }
|
---|
| 145 | get externalDocs() {
|
---|
| 146 | return this.get('externalDocs');
|
---|
| 147 | }
|
---|
| 148 | set externalDocs(externalDocs) {
|
---|
| 149 | this.set('externalDocs', externalDocs);
|
---|
| 150 | }
|
---|
| 151 | get example() {
|
---|
| 152 | return this.get('example');
|
---|
| 153 | }
|
---|
| 154 | set example(example) {
|
---|
| 155 | this.set('example', example);
|
---|
| 156 | }
|
---|
| 157 | get deprecated() {
|
---|
| 158 | return this.get('deprecated');
|
---|
| 159 | }
|
---|
| 160 | set deprecated(deprecated) {
|
---|
| 161 | this.set('deprecated', deprecated);
|
---|
| 162 | }
|
---|
| 163 | }
|
---|
| 164 | /* eslint-disable class-methods-use-this */
|
---|
| 165 |
|
---|
| 166 | export default Schema; |
---|