@speclynx/apidom-ns-openapi-3-0 4.0.3 → 4.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/apidom-ns-openapi-3-0.browser.js +2 -2
- package/dist/apidom-ns-openapi-3-0.browser.min.js +1 -1
- package/package.json +9 -8
- package/src/elements/Callback.ts +0 -13
- package/src/elements/Components.ts +0 -85
- package/src/elements/Contact.ts +0 -42
- package/src/elements/Discriminator.ts +0 -34
- package/src/elements/Encoding.ts +0 -59
- package/src/elements/Example.ts +0 -51
- package/src/elements/ExternalDocumentation.ts +0 -34
- package/src/elements/Header.ts +0 -119
- package/src/elements/Info.ts +0 -70
- package/src/elements/License.ts +0 -34
- package/src/elements/Link.ts +0 -85
- package/src/elements/MediaType.ts +0 -48
- package/src/elements/OAuthFlow.ts +0 -50
- package/src/elements/OAuthFlows.ts +0 -47
- package/src/elements/OpenApi3-0.ts +0 -90
- package/src/elements/Openapi.ts +0 -15
- package/src/elements/Operation.ts +0 -124
- package/src/elements/Parameter.ts +0 -135
- package/src/elements/PathItem.ts +0 -125
- package/src/elements/Paths.ts +0 -13
- package/src/elements/Reference.ts +0 -27
- package/src/elements/RequestBody.ts +0 -46
- package/src/elements/Response.ts +0 -50
- package/src/elements/Responses.ts +0 -24
- package/src/elements/Schema.ts +0 -230
- package/src/elements/SecurityRequirement.ts +0 -13
- package/src/elements/SecurityScheme.ts +0 -84
- package/src/elements/Server.ts +0 -42
- package/src/elements/ServerVariable.ts +0 -43
- package/src/elements/Tag.ts +0 -44
- package/src/elements/Xml.ts +0 -59
- package/src/elements/nces/ComponentsCallbacks.ts +0 -15
- package/src/elements/nces/ComponentsExamples.ts +0 -16
- package/src/elements/nces/ComponentsHeaders.ts +0 -15
- package/src/elements/nces/ComponentsLinks.ts +0 -15
- package/src/elements/nces/ComponentsParameters.ts +0 -16
- package/src/elements/nces/ComponentsRequestBodies.ts +0 -15
- package/src/elements/nces/ComponentsResponses.ts +0 -15
- package/src/elements/nces/ComponentsSchemas.ts +0 -15
- package/src/elements/nces/ComponentsSecuritySchemes.ts +0 -15
- package/src/elements/nces/DiscriminatorMapping.ts +0 -15
- package/src/elements/nces/EncodingHeaders.ts +0 -15
- package/src/elements/nces/HeaderContent.ts +0 -16
- package/src/elements/nces/HeaderExamples.ts +0 -16
- package/src/elements/nces/LinkParameters.ts +0 -15
- package/src/elements/nces/MediaTypeEncoding.ts +0 -15
- package/src/elements/nces/MediaTypeExamples.ts +0 -16
- package/src/elements/nces/OAuthFlowScopes.ts +0 -15
- package/src/elements/nces/OperationCallbacks.ts +0 -15
- package/src/elements/nces/OperationParameters.ts +0 -16
- package/src/elements/nces/OperationSecurity.ts +0 -16
- package/src/elements/nces/OperationServers.ts +0 -16
- package/src/elements/nces/OperationTags.ts +0 -15
- package/src/elements/nces/ParameterContent.ts +0 -16
- package/src/elements/nces/ParameterExamples.ts +0 -16
- package/src/elements/nces/PathItemParameters.ts +0 -16
- package/src/elements/nces/PathItemServers.ts +0 -16
- package/src/elements/nces/RequestBodyContent.ts +0 -16
- package/src/elements/nces/ResponseContent.ts +0 -16
- package/src/elements/nces/ResponseHeaders.ts +0 -15
- package/src/elements/nces/ResponseLinks.ts +0 -15
- package/src/elements/nces/Security.ts +0 -15
- package/src/elements/nces/ServerVariables.ts +0 -15
- package/src/elements/nces/Servers.ts +0 -15
- package/src/elements/nces/Tags.ts +0 -15
- package/src/index.ts +0 -550
- package/src/media-types.ts +0 -52
- package/src/namespace.ts +0 -78
- package/src/predicates.ts +0 -185
- package/src/refractor/index.ts +0 -370
- package/src/refractor/inspect.ts +0 -239
- package/src/refractor/plugins/replace-empty-element.ts +0 -656
- package/src/refractor/predicates.ts +0 -39
- package/src/refractor/specification.ts +0 -557
- package/src/refractor/toolbox.ts +0 -24
- package/src/refractor/visitors/FallbackVisitor.ts +0 -24
- package/src/refractor/visitors/SpecificationExtensionVisitor.ts +0 -22
- package/src/refractor/visitors/SpecificationVisitor.ts +0 -112
- package/src/refractor/visitors/Visitor.ts +0 -47
- package/src/refractor/visitors/generics/AlternatingVisitor.ts +0 -45
- package/src/refractor/visitors/generics/FixedFieldsVisitor.ts +0 -110
- package/src/refractor/visitors/generics/MapVisitor.ts +0 -25
- package/src/refractor/visitors/generics/MixedFieldsVisitor.ts +0 -77
- package/src/refractor/visitors/generics/PatternedFieldsVisitor.ts +0 -99
- package/src/refractor/visitors/open-api-3-0/ContentVisitor.ts +0 -28
- package/src/refractor/visitors/open-api-3-0/ExamplesVisitor.ts +0 -48
- package/src/refractor/visitors/open-api-3-0/OpenapiVisitor.ts +0 -30
- package/src/refractor/visitors/open-api-3-0/ParametersVisitor.ts +0 -47
- package/src/refractor/visitors/open-api-3-0/SecurityVisitor.ts +0 -44
- package/src/refractor/visitors/open-api-3-0/ServersVisitor.ts +0 -40
- package/src/refractor/visitors/open-api-3-0/TagsVisitor.ts +0 -40
- package/src/refractor/visitors/open-api-3-0/bases.ts +0 -82
- package/src/refractor/visitors/open-api-3-0/callback/index.ts +0 -49
- package/src/refractor/visitors/open-api-3-0/components/CallbacksVisitor.ts +0 -45
- package/src/refractor/visitors/open-api-3-0/components/ExamplesVisitor.ts +0 -46
- package/src/refractor/visitors/open-api-3-0/components/HeadersVisitor.ts +0 -53
- package/src/refractor/visitors/open-api-3-0/components/LinksVisitor.ts +0 -45
- package/src/refractor/visitors/open-api-3-0/components/ParametersVisitor.ts +0 -46
- package/src/refractor/visitors/open-api-3-0/components/RequestBodiesVisitor.ts +0 -45
- package/src/refractor/visitors/open-api-3-0/components/ResponsesVisitor.ts +0 -53
- package/src/refractor/visitors/open-api-3-0/components/SchemasVisitor.ts +0 -46
- package/src/refractor/visitors/open-api-3-0/components/SecuritySchemesVisitor.ts +0 -45
- package/src/refractor/visitors/open-api-3-0/components/index.ts +0 -31
- package/src/refractor/visitors/open-api-3-0/contact/index.ts +0 -27
- package/src/refractor/visitors/open-api-3-0/distriminator/MappingVisitor.ts +0 -24
- package/src/refractor/visitors/open-api-3-0/distriminator/index.ts +0 -27
- package/src/refractor/visitors/open-api-3-0/encoding/HeadersVisitor.ts +0 -57
- package/src/refractor/visitors/open-api-3-0/encoding/index.ts +0 -49
- package/src/refractor/visitors/open-api-3-0/example/ExternalValueVisitor.ts +0 -20
- package/src/refractor/visitors/open-api-3-0/example/index.ts +0 -38
- package/src/refractor/visitors/open-api-3-0/external-documentation/index.ts +0 -27
- package/src/refractor/visitors/open-api-3-0/header/ContentVisitor.ts +0 -18
- package/src/refractor/visitors/open-api-3-0/header/ExamplesVisitor.ts +0 -18
- package/src/refractor/visitors/open-api-3-0/header/SchemaVisitor.ts +0 -33
- package/src/refractor/visitors/open-api-3-0/header/index.ts +0 -27
- package/src/refractor/visitors/open-api-3-0/index.ts +0 -39
- package/src/refractor/visitors/open-api-3-0/info/VersionVisitor.ts +0 -21
- package/src/refractor/visitors/open-api-3-0/info/index.ts +0 -27
- package/src/refractor/visitors/open-api-3-0/license/index.ts +0 -27
- package/src/refractor/visitors/open-api-3-0/link/OperationIdVisitor.ts +0 -20
- package/src/refractor/visitors/open-api-3-0/link/OperationRefVisitor.ts +0 -20
- package/src/refractor/visitors/open-api-3-0/link/ParametersVisitor.ts +0 -24
- package/src/refractor/visitors/open-api-3-0/link/index.ts +0 -38
- package/src/refractor/visitors/open-api-3-0/media-type/EncodingVisitor.ts +0 -24
- package/src/refractor/visitors/open-api-3-0/media-type/ExamplesVisitor.ts +0 -18
- package/src/refractor/visitors/open-api-3-0/media-type/SchemaVisitor.ts +0 -33
- package/src/refractor/visitors/open-api-3-0/media-type/index.ts +0 -27
- package/src/refractor/visitors/open-api-3-0/oauth-flow/ScopesVisitor.ts +0 -24
- package/src/refractor/visitors/open-api-3-0/oauth-flow/index.ts +0 -27
- package/src/refractor/visitors/open-api-3-0/oauth-flows/index.ts +0 -27
- package/src/refractor/visitors/open-api-3-0/operation/CallbacksVisitor.ts +0 -45
- package/src/refractor/visitors/open-api-3-0/operation/ParametersVisitor.ts +0 -18
- package/src/refractor/visitors/open-api-3-0/operation/RequestBodyVisitor.ts +0 -39
- package/src/refractor/visitors/open-api-3-0/operation/SecurityVisitor.ts +0 -41
- package/src/refractor/visitors/open-api-3-0/operation/ServersVisitor.ts +0 -18
- package/src/refractor/visitors/open-api-3-0/operation/TagsVisitor.ts +0 -32
- package/src/refractor/visitors/open-api-3-0/operation/index.ts +0 -27
- package/src/refractor/visitors/open-api-3-0/parameter/ContentVisitor.ts +0 -18
- package/src/refractor/visitors/open-api-3-0/parameter/ExamplesVisitor.ts +0 -18
- package/src/refractor/visitors/open-api-3-0/parameter/SchemaVisitor.ts +0 -36
- package/src/refractor/visitors/open-api-3-0/parameter/index.ts +0 -49
- package/src/refractor/visitors/open-api-3-0/path-item/$RefVisitor.ts +0 -20
- package/src/refractor/visitors/open-api-3-0/path-item/ParametersVisitor.ts +0 -18
- package/src/refractor/visitors/open-api-3-0/path-item/ServersVisitor.ts +0 -18
- package/src/refractor/visitors/open-api-3-0/path-item/index.ts +0 -53
- package/src/refractor/visitors/open-api-3-0/paths/index.ts +0 -51
- package/src/refractor/visitors/open-api-3-0/reference/$RefVisitor.ts +0 -20
- package/src/refractor/visitors/open-api-3-0/reference/index.ts +0 -41
- package/src/refractor/visitors/open-api-3-0/request-body/ContentVisitor.ts +0 -18
- package/src/refractor/visitors/open-api-3-0/request-body/index.ts +0 -46
- package/src/refractor/visitors/open-api-3-0/response/ContentVisitor.ts +0 -18
- package/src/refractor/visitors/open-api-3-0/response/HeadersVisitor.ts +0 -57
- package/src/refractor/visitors/open-api-3-0/response/LinksVisitor.ts +0 -45
- package/src/refractor/visitors/open-api-3-0/response/index.ts +0 -57
- package/src/refractor/visitors/open-api-3-0/responses/DefaultVisitor.ts +0 -39
- package/src/refractor/visitors/open-api-3-0/responses/index.ts +0 -64
- package/src/refractor/visitors/open-api-3-0/schema/AllOfVisitor.ts +0 -34
- package/src/refractor/visitors/open-api-3-0/schema/AnyOfVisitor.ts +0 -34
- package/src/refractor/visitors/open-api-3-0/schema/ItemsVisitor.ts +0 -31
- package/src/refractor/visitors/open-api-3-0/schema/OneOfVisitor.ts +0 -34
- package/src/refractor/visitors/open-api-3-0/schema/PropertiesVisitor.ts +0 -34
- package/src/refractor/visitors/open-api-3-0/schema/SchemaOrReferenceVisitor.ts +0 -36
- package/src/refractor/visitors/open-api-3-0/schema/TypeVisitor.ts +0 -26
- package/src/refractor/visitors/open-api-3-0/schema/index.ts +0 -30
- package/src/refractor/visitors/open-api-3-0/security-requirement/index.ts +0 -24
- package/src/refractor/visitors/open-api-3-0/security-scheme/index.ts +0 -27
- package/src/refractor/visitors/open-api-3-0/server/UrlVisitor.ts +0 -20
- package/src/refractor/visitors/open-api-3-0/server/VariablesVisitor.ts +0 -24
- package/src/refractor/visitors/open-api-3-0/server/index.ts +0 -27
- package/src/refractor/visitors/open-api-3-0/server-variable/index.ts +0 -27
- package/src/refractor/visitors/open-api-3-0/tag/index.ts +0 -27
- package/src/refractor/visitors/open-api-3-0/xml/index.ts +0 -27
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { ObjectElement, Element, type Attributes, type Meta } from '@speclynx/apidom-datamodel';
|
|
2
|
-
|
|
3
|
-
import SchemaElement from './Schema.ts';
|
|
4
|
-
import ReferenceElement from './Reference.ts';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* @public
|
|
8
|
-
*/
|
|
9
|
-
class MediaType extends ObjectElement {
|
|
10
|
-
constructor(content?: Record<string, unknown>, meta?: Meta, attributes?: Attributes) {
|
|
11
|
-
super(content, meta, attributes);
|
|
12
|
-
this.element = 'mediaType';
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
get schema(): SchemaElement | ReferenceElement | undefined {
|
|
16
|
-
return this.get('schema') as SchemaElement | ReferenceElement | undefined;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
set schema(schema: SchemaElement | ReferenceElement | undefined) {
|
|
20
|
-
this.set('schema', schema);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
get example(): Element | undefined {
|
|
24
|
-
return this.get('example') as Element | undefined;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
set example(example: Element | undefined) {
|
|
28
|
-
this.set('example', example);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
get examples(): ObjectElement | undefined {
|
|
32
|
-
return this.get('examples') as ObjectElement | undefined;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
set examples(examples: ObjectElement | undefined) {
|
|
36
|
-
this.set('examples', examples);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
get encoding(): ObjectElement | undefined {
|
|
40
|
-
return this.get('encoding') as ObjectElement | undefined;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
set encoding(encoding: ObjectElement | undefined) {
|
|
44
|
-
this.set('encoding', encoding);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export default MediaType;
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ObjectElement,
|
|
3
|
-
StringElement,
|
|
4
|
-
type Attributes,
|
|
5
|
-
type Meta,
|
|
6
|
-
} from '@speclynx/apidom-datamodel';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* @public
|
|
10
|
-
*/
|
|
11
|
-
class OAuthFlow extends ObjectElement {
|
|
12
|
-
constructor(content?: Record<string, unknown>, meta?: Meta, attributes?: Attributes) {
|
|
13
|
-
super(content, meta, attributes);
|
|
14
|
-
this.element = 'oAuthFlow';
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
get authorizationUrl(): StringElement | undefined {
|
|
18
|
-
return this.get('authorizationUrl') as StringElement | undefined;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
set authorizationUrl(authorizationUrl: StringElement | undefined) {
|
|
22
|
-
this.set('authorizationUrl', authorizationUrl);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
get tokenUrl(): StringElement | undefined {
|
|
26
|
-
return this.get('tokenUrl') as StringElement | undefined;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
set tokenUrl(tokenUrl: StringElement | undefined) {
|
|
30
|
-
this.set('tokenUrl', tokenUrl);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
get refreshUrl(): StringElement | undefined {
|
|
34
|
-
return this.get('refreshUrl') as StringElement | undefined;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
set refreshUrl(refreshUrl: StringElement | undefined) {
|
|
38
|
-
this.set('refreshUrl', refreshUrl);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
get scopes(): ObjectElement | undefined {
|
|
42
|
-
return this.get('scopes') as ObjectElement | undefined;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
set scopes(scopes: ObjectElement | undefined) {
|
|
46
|
-
this.set('scopes', scopes);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export default OAuthFlow;
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { ObjectElement, type Attributes, type Meta } from '@speclynx/apidom-datamodel';
|
|
2
|
-
|
|
3
|
-
import OAuthFlowElement from './OAuthFlow.ts';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* @public
|
|
7
|
-
*/
|
|
8
|
-
class OAuthFlows extends ObjectElement {
|
|
9
|
-
constructor(content?: Record<string, unknown>, meta?: Meta, attributes?: Attributes) {
|
|
10
|
-
super(content, meta, attributes);
|
|
11
|
-
this.element = 'oAuthFlows';
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
get implicit(): OAuthFlowElement | undefined {
|
|
15
|
-
return this.get('implicit') as OAuthFlowElement | undefined;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
set implicit(implicit: OAuthFlowElement | undefined) {
|
|
19
|
-
this.set('implicit', implicit);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
get password(): OAuthFlowElement | undefined {
|
|
23
|
-
return this.get('password') as OAuthFlowElement | undefined;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
set password(password: OAuthFlowElement | undefined) {
|
|
27
|
-
this.set('password', password);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
get clientCredentials(): OAuthFlowElement | undefined {
|
|
31
|
-
return this.get('clientCredentials') as OAuthFlowElement | undefined;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
set clientCredentials(clientCredentials: OAuthFlowElement | undefined) {
|
|
35
|
-
this.set('clientCredentials', clientCredentials);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
get authorizationCode(): OAuthFlowElement | undefined {
|
|
39
|
-
return this.get('authorizationCode') as OAuthFlowElement | undefined;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
set authorizationCode(authorizationCode: OAuthFlowElement | undefined) {
|
|
43
|
-
this.set('authorizationCode', authorizationCode);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export default OAuthFlows;
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ObjectElement,
|
|
3
|
-
ArrayElement,
|
|
4
|
-
type Attributes,
|
|
5
|
-
type Meta,
|
|
6
|
-
} from '@speclynx/apidom-datamodel';
|
|
7
|
-
|
|
8
|
-
import OpenapiElement from './Openapi.ts';
|
|
9
|
-
import InfoElement from './Info.ts';
|
|
10
|
-
import ComponentsElement from './Components.ts';
|
|
11
|
-
import PathsElement from './Paths.ts';
|
|
12
|
-
import ExternalDocumentationElement from './ExternalDocumentation.ts';
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* @public
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
class OpenApi3_0 extends ObjectElement {
|
|
19
|
-
constructor(content?: Record<string, unknown>, meta?: Meta, attributes?: Attributes) {
|
|
20
|
-
super(content, meta, attributes);
|
|
21
|
-
this.element = 'openApi3_0';
|
|
22
|
-
this.classes.push('api');
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
get openapi(): OpenapiElement | undefined {
|
|
26
|
-
return this.get('openapi') as OpenapiElement | undefined;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
set openapi(openapi: OpenapiElement | undefined) {
|
|
30
|
-
this.set('openapi', openapi);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
get info(): InfoElement | undefined {
|
|
34
|
-
return this.get('info') as InfoElement | undefined;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
set info(info: InfoElement | undefined) {
|
|
38
|
-
this.set('info', info);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
get servers(): ArrayElement | undefined {
|
|
42
|
-
return this.get('servers') as ArrayElement | undefined;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
set servers(servers: ArrayElement | undefined) {
|
|
46
|
-
this.set('servers', servers);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
get paths(): PathsElement | undefined {
|
|
50
|
-
return this.get('paths') as PathsElement | undefined;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
set paths(paths: PathsElement | undefined) {
|
|
54
|
-
this.set('paths', paths);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
get components(): ComponentsElement | undefined {
|
|
58
|
-
return this.get('components') as ComponentsElement | undefined;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
set components(components: ComponentsElement | undefined) {
|
|
62
|
-
this.set('components', components);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
get security(): ArrayElement | undefined {
|
|
66
|
-
return this.get('security') as ArrayElement | undefined;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
set security(security: ArrayElement | undefined) {
|
|
70
|
-
this.set('security', security);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
get tags(): ArrayElement | undefined {
|
|
74
|
-
return this.get('tags') as ArrayElement | undefined;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
set tags(tags: ArrayElement | undefined) {
|
|
78
|
-
this.set('tags', tags);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
get externalDocs(): ExternalDocumentationElement | undefined {
|
|
82
|
-
return this.get('externalDocs') as ExternalDocumentationElement | undefined;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
set externalDocs(externalDocs: ExternalDocumentationElement | undefined) {
|
|
86
|
-
this.set('externalDocs', externalDocs);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
export default OpenApi3_0;
|
package/src/elements/Openapi.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { StringElement, type Attributes, type Meta } from '@speclynx/apidom-datamodel';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @public
|
|
5
|
-
*/
|
|
6
|
-
class Openapi extends StringElement {
|
|
7
|
-
constructor(content?: string, meta?: Meta, attributes?: Attributes) {
|
|
8
|
-
super(content, meta, attributes);
|
|
9
|
-
this.element = 'openapi';
|
|
10
|
-
this.classes.push('spec-version');
|
|
11
|
-
this.classes.push('version');
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export default Openapi;
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ObjectElement,
|
|
3
|
-
ArrayElement,
|
|
4
|
-
BooleanElement,
|
|
5
|
-
StringElement,
|
|
6
|
-
type Attributes,
|
|
7
|
-
type Meta,
|
|
8
|
-
} from '@speclynx/apidom-datamodel';
|
|
9
|
-
|
|
10
|
-
import ReferenceElement from './Reference.ts';
|
|
11
|
-
import ExternalDocumentationElement from './ExternalDocumentation.ts';
|
|
12
|
-
import RequestBodyElement from './RequestBody.ts';
|
|
13
|
-
import ResponsesElement from './Responses.ts';
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* @public
|
|
17
|
-
*/
|
|
18
|
-
class Operation extends ObjectElement {
|
|
19
|
-
constructor(content?: Record<string, unknown>, meta?: Meta, attributes?: Attributes) {
|
|
20
|
-
super(content, meta, attributes);
|
|
21
|
-
this.element = 'operation';
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
get tags(): ArrayElement | undefined {
|
|
25
|
-
return this.get('tags') as ArrayElement | undefined;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
set tags(tags: ArrayElement | undefined) {
|
|
29
|
-
this.set('tags', tags);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
get summary(): StringElement | undefined {
|
|
33
|
-
return this.get('summary') as StringElement | undefined;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
set summary(description: StringElement | undefined) {
|
|
37
|
-
this.set('summary', description);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
get description(): StringElement | undefined {
|
|
41
|
-
return this.get('description') as StringElement | undefined;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
set description(description: StringElement | undefined) {
|
|
45
|
-
this.set('description', description);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
set externalDocs(externalDocs: ExternalDocumentationElement | undefined) {
|
|
49
|
-
this.set('externalDocs', externalDocs);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
get externalDocs(): ExternalDocumentationElement | undefined {
|
|
53
|
-
return this.get('externalDocs') as ExternalDocumentationElement | undefined;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
get operationId(): StringElement | undefined {
|
|
57
|
-
return this.get('operationId') as StringElement | undefined;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
set operationId(operationId: StringElement | undefined) {
|
|
61
|
-
this.set('operationId', operationId);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
get parameters(): ArrayElement | undefined {
|
|
65
|
-
return this.get('parameters') as ArrayElement | undefined;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
set parameters(parameters: ArrayElement | undefined) {
|
|
69
|
-
this.set('parameters', parameters);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
get requestBody(): RequestBodyElement | ReferenceElement | undefined {
|
|
73
|
-
return this.get('requestBody') as RequestBodyElement | ReferenceElement | undefined;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
set requestBody(requestBody: RequestBodyElement | ReferenceElement | undefined) {
|
|
77
|
-
this.set('requestBody', requestBody);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
get responses(): ResponsesElement | undefined {
|
|
81
|
-
return this.get('responses') as ResponsesElement | undefined;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
set responses(responses: ResponsesElement | undefined) {
|
|
85
|
-
this.set('responses', responses);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
get callbacks(): ObjectElement | undefined {
|
|
89
|
-
return this.get('callbacks') as ObjectElement | undefined;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
set callbacks(callbacks: ObjectElement | undefined) {
|
|
93
|
-
this.set('callbacks', callbacks);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
get deprecated(): BooleanElement {
|
|
97
|
-
if (this.hasKey('deprecated')) {
|
|
98
|
-
return this.get('deprecated') as BooleanElement;
|
|
99
|
-
}
|
|
100
|
-
return new BooleanElement(false);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
set deprecated(deprecated: BooleanElement) {
|
|
104
|
-
this.set('deprecated', deprecated);
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
get security(): ArrayElement | undefined {
|
|
108
|
-
return this.get('security') as ArrayElement | undefined;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
set security(security: ArrayElement | undefined) {
|
|
112
|
-
this.set('security', security);
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
get servers(): ArrayElement | undefined {
|
|
116
|
-
return this.get('severs') as ArrayElement | undefined;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
set servers(servers: ArrayElement | undefined) {
|
|
120
|
-
this.set('servers', servers);
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
export default Operation;
|
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Element,
|
|
3
|
-
ObjectElement,
|
|
4
|
-
BooleanElement,
|
|
5
|
-
StringElement,
|
|
6
|
-
type Attributes,
|
|
7
|
-
type Meta,
|
|
8
|
-
} from '@speclynx/apidom-datamodel';
|
|
9
|
-
|
|
10
|
-
import SchemaElement from './Schema.ts';
|
|
11
|
-
import ReferenceElement from './Reference.ts';
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* @public
|
|
15
|
-
*/
|
|
16
|
-
class Parameter extends ObjectElement {
|
|
17
|
-
constructor(content?: Record<string, unknown>, meta?: Meta, attributes?: Attributes) {
|
|
18
|
-
super(content, meta, attributes);
|
|
19
|
-
this.element = 'parameter';
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
get name(): StringElement | undefined {
|
|
23
|
-
return this.get('name') as StringElement | undefined;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
set name(name: StringElement | undefined) {
|
|
27
|
-
this.set('name', name);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
get in(): StringElement | undefined {
|
|
31
|
-
return this.get('in') as StringElement | undefined;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
set in(val: StringElement | undefined) {
|
|
35
|
-
this.set('in', val);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
get required(): BooleanElement {
|
|
39
|
-
if (this.hasKey('required')) {
|
|
40
|
-
return this.get('required') as BooleanElement;
|
|
41
|
-
}
|
|
42
|
-
return new BooleanElement(false);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
set required(required: BooleanElement) {
|
|
46
|
-
this.set('required', required);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
get deprecated(): BooleanElement {
|
|
50
|
-
if (this.hasKey('deprecated')) {
|
|
51
|
-
return this.get('deprecated') as BooleanElement;
|
|
52
|
-
}
|
|
53
|
-
return new BooleanElement(false);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
set deprecated(deprecated: BooleanElement) {
|
|
57
|
-
this.set('deprecated', deprecated);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
get allowEmptyValue(): BooleanElement | undefined {
|
|
61
|
-
return this.get('allowEmptyValue') as BooleanElement | undefined;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
set allowEmptyValue(allowEmptyValue: BooleanElement | undefined) {
|
|
65
|
-
this.set('allowEmptyValue', allowEmptyValue);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
get styleField(): StringElement | undefined {
|
|
69
|
-
return this.get('style') as StringElement | undefined;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
set styleField(style: StringElement | undefined) {
|
|
73
|
-
this.set('style', style);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
get explode(): BooleanElement | undefined {
|
|
77
|
-
return this.get('explode') as BooleanElement | undefined;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
set explode(explode: BooleanElement | undefined) {
|
|
81
|
-
this.set('explode', explode);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
get allowReserved(): BooleanElement | undefined {
|
|
85
|
-
return this.get('allowReserved') as BooleanElement | undefined;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
set allowReserved(allowReserved: BooleanElement | undefined) {
|
|
89
|
-
this.set('allowReserved', allowReserved);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
get schema(): SchemaElement | ReferenceElement | undefined {
|
|
93
|
-
return this.get('schema') as SchemaElement | ReferenceElement | undefined;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
set schema(schema: SchemaElement | ReferenceElement | undefined) {
|
|
97
|
-
this.set('schema', schema);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
get example(): Element | undefined {
|
|
101
|
-
return this.get('example') as Element | undefined;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
set example(example: Element | undefined) {
|
|
105
|
-
this.set('example', example);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
get examples(): ObjectElement | undefined {
|
|
109
|
-
return this.get('examples') as ObjectElement | undefined;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
set examples(examples: ObjectElement | undefined) {
|
|
113
|
-
this.set('examples', examples);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
get contentField(): ObjectElement | undefined {
|
|
117
|
-
return this.get('content') as ObjectElement | undefined;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
set contentField(content: ObjectElement | undefined) {
|
|
121
|
-
this.set('content', content);
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
Object.defineProperty(Parameter.prototype, 'description', {
|
|
126
|
-
get(): StringElement | undefined {
|
|
127
|
-
return this.get('description') as StringElement | undefined;
|
|
128
|
-
},
|
|
129
|
-
set(description: StringElement | undefined) {
|
|
130
|
-
this.set('description', description);
|
|
131
|
-
},
|
|
132
|
-
enumerable: true,
|
|
133
|
-
});
|
|
134
|
-
|
|
135
|
-
export default Parameter;
|
package/src/elements/PathItem.ts
DELETED
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
StringElement,
|
|
3
|
-
ObjectElement,
|
|
4
|
-
ArrayElement,
|
|
5
|
-
type Attributes,
|
|
6
|
-
type Meta,
|
|
7
|
-
} from '@speclynx/apidom-datamodel';
|
|
8
|
-
|
|
9
|
-
import OperationElement from './Operation.ts';
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* @public
|
|
13
|
-
*/
|
|
14
|
-
class PathItem extends ObjectElement {
|
|
15
|
-
constructor(content?: Record<string, unknown>, meta?: Meta, attributes?: Attributes) {
|
|
16
|
-
super(content, meta, attributes);
|
|
17
|
-
this.element = 'pathItem';
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
get $ref(): StringElement | undefined {
|
|
21
|
-
return this.get('$ref') as StringElement | undefined;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
set $ref($ref: StringElement | undefined) {
|
|
25
|
-
this.set('$ref', $ref);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
get summary(): StringElement | undefined {
|
|
29
|
-
return this.get('summary') as StringElement | undefined;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
set summary(summary: StringElement | undefined) {
|
|
33
|
-
this.set('summary', summary);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
get description(): StringElement {
|
|
37
|
-
return this.get('description') as StringElement;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
set description(description: StringElement | undefined) {
|
|
41
|
-
this.set('description', description);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
get getField(): OperationElement | undefined {
|
|
45
|
-
return this.get('get') as OperationElement | undefined;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
set getField(operation: OperationElement | undefined) {
|
|
49
|
-
this.set('get', operation);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
get put(): OperationElement | undefined {
|
|
53
|
-
return this.get('put') as OperationElement | undefined;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
set put(operation: OperationElement | undefined) {
|
|
57
|
-
this.set('put', operation);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
get post(): OperationElement | undefined {
|
|
61
|
-
return this.get('post') as OperationElement | undefined;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
set post(operation: OperationElement | undefined) {
|
|
65
|
-
this.set('post', operation);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
get deleteField(): OperationElement | undefined {
|
|
69
|
-
return this.get('delete') as OperationElement | undefined;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
set deleteField(operation: OperationElement | undefined) {
|
|
73
|
-
this.set('delete', operation);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
get options(): OperationElement | undefined {
|
|
77
|
-
return this.get('options') as OperationElement | undefined;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
set options(operation: OperationElement | undefined) {
|
|
81
|
-
this.set('options', operation);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
get head(): OperationElement | undefined {
|
|
85
|
-
return this.get('head') as OperationElement | undefined;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
set head(operation: OperationElement | undefined) {
|
|
89
|
-
this.set('head', operation);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
get patch(): OperationElement | undefined {
|
|
93
|
-
return this.get('patch') as OperationElement | undefined;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
set patch(operation: OperationElement | undefined) {
|
|
97
|
-
this.set('patch', operation);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
get trace(): OperationElement | undefined {
|
|
101
|
-
return this.get('trace') as OperationElement | undefined;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
set trace(operation: OperationElement | undefined) {
|
|
105
|
-
this.set('trace', operation);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
get servers(): ArrayElement | undefined {
|
|
109
|
-
return this.get('servers') as ArrayElement | undefined;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
set servers(servers: ArrayElement | undefined) {
|
|
113
|
-
this.set('servers', servers);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
get parameters(): ArrayElement {
|
|
117
|
-
return this.get('parameters') as ArrayElement;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
set parameters(parameters: ArrayElement | undefined) {
|
|
121
|
-
this.set('parameters', parameters);
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
export default PathItem;
|
package/src/elements/Paths.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ObjectElement, type Attributes, type Meta } from '@speclynx/apidom-datamodel';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @public
|
|
5
|
-
*/
|
|
6
|
-
class Paths extends ObjectElement {
|
|
7
|
-
constructor(content?: Record<string, unknown>, meta?: Meta, attributes?: Attributes) {
|
|
8
|
-
super(content, meta, attributes);
|
|
9
|
-
this.element = 'paths';
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export default Paths;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
StringElement,
|
|
3
|
-
ObjectElement,
|
|
4
|
-
type Attributes,
|
|
5
|
-
type Meta,
|
|
6
|
-
} from '@speclynx/apidom-datamodel';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* @public
|
|
10
|
-
*/
|
|
11
|
-
class Reference extends ObjectElement {
|
|
12
|
-
constructor(content?: Record<string, unknown>, meta?: Meta, attributes?: Attributes) {
|
|
13
|
-
super(content, meta, attributes);
|
|
14
|
-
this.element = 'reference';
|
|
15
|
-
this.classes.push('openapi-reference');
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
get $ref(): StringElement | undefined {
|
|
19
|
-
return this.get('$ref') as StringElement | undefined;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
set $ref($ref: StringElement | undefined) {
|
|
23
|
-
this.set('$ref', $ref);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export default Reference;
|