@api-client/core 0.11.0 → 0.11.1
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/build/src/amf/AmfMixin.d.ts +2 -15
- package/build/src/amf/AmfMixin.d.ts.map +1 -1
- package/build/src/amf/AmfMixin.js +7 -28
- package/build/src/amf/AmfMixin.js.map +1 -1
- package/data/models/example-generator-api.json +9 -9
- package/package.json +17 -3
- package/src/amf/AmfMixin.ts +10 -31
- package/tests/unit/amf/AmfLoader.ts +20 -31
- package/tsconfig.browser.json +2 -1
|
@@ -1,16 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
@license
|
|
3
|
-
Copyright 2018 The Advanced REST client authors <arc@mulesoft.com>
|
|
4
|
-
Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
|
5
|
-
use this file except in compliance with the License. You may obtain a copy of
|
|
6
|
-
the License at
|
|
7
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
Unless required by applicable law or agreed to in writing, software
|
|
9
|
-
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
10
|
-
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
11
|
-
License for the specific language governing permissions and limitations under
|
|
12
|
-
the License.
|
|
13
|
-
*/
|
|
14
1
|
import { IAmfDocument, IAmfDomainElement, IAmfEndPoint, IAmfSecurityScheme, IAmfShape, IAmfWebApi, IAmfOperation, IAmfAsyncApi, IAmfServer, IAmfRequest } from './definitions/Amf.js';
|
|
15
2
|
export declare const findAmfType: unique symbol;
|
|
16
3
|
export declare const findReferenceObject: unique symbol;
|
|
@@ -54,7 +41,7 @@ export declare class AmfMixinInterface {
|
|
|
54
41
|
/**
|
|
55
42
|
* Expands flattened AMF model
|
|
56
43
|
*/
|
|
57
|
-
_expand(amf:
|
|
44
|
+
_expand(amf: unknown): IAmfDocument;
|
|
58
45
|
/**
|
|
59
46
|
* Returns compact model key for given value.
|
|
60
47
|
* @param property AMF original property
|
|
@@ -68,7 +55,7 @@ export declare class AmfMixinInterface {
|
|
|
68
55
|
* @param amf AMF json/ld model
|
|
69
56
|
* @returns The API spec
|
|
70
57
|
*/
|
|
71
|
-
_ensureAmfModel(amf:
|
|
58
|
+
_ensureAmfModel(amf: unknown): IAmfDocument | undefined;
|
|
72
59
|
/**
|
|
73
60
|
* Ensures that the value is an array.
|
|
74
61
|
* It returns undefined when there's no value.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AmfMixin.d.ts","sourceRoot":"","sources":["../../../src/amf/AmfMixin.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AmfMixin.d.ts","sourceRoot":"","sources":["../../../src/amf/AmfMixin.ts"],"names":[],"mappings":"AAgBA,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,YAAY,EAEZ,kBAAkB,EAClB,SAAS,EACT,UAAU,EACV,aAAa,EACb,YAAY,EACZ,UAAU,EACV,WAAW,EACZ,MAAM,sBAAsB,CAAA;AAG7B,eAAO,MAAM,WAAW,eAAwB,CAAA;AAChD,eAAO,MAAM,mBAAmB,eAAgC,CAAA;AAChE,eAAO,MAAM,aAAa,eAA0B,CAAA;AACpD,eAAO,MAAM,wBAAwB,eAAqC,CAAA;AAE1E,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAA;CACZ;AAED,KAAK,WAAW,CAAC,CAAC,GAAG,MAAM,IAAI,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,CAAA;AAExD,MAAM,CAAC,OAAO,OAAO,iBAAi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AED;;GAEG;AACH,eAAO,MAAM,QAAQ,GAAI,CAAC,SAAS,WAAW,CAAC,GAAG,CAAC,EAAE,YAAY,CAAC,KAAG,WAAW,CAAC,iBAAiB,CAAC,GAAG,CAmrCrG,CAAA"}
|
|
@@ -13,8 +13,7 @@ WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
|
13
13
|
License for the specific language governing permissions and limitations under
|
|
14
14
|
the License.
|
|
15
15
|
*/
|
|
16
|
-
|
|
17
|
-
import { AmfModelExpander, JsonLdOptions, JsonLd } from 'amf-json-ld-lib';
|
|
16
|
+
import { AmfModelExpander } from 'amf-json-ld-lib';
|
|
18
17
|
import { AmfNamespace as ns } from './definitions/Namespace.js';
|
|
19
18
|
export const findAmfType = Symbol('findAmfType');
|
|
20
19
|
export const findReferenceObject = Symbol('findReferenceObject');
|
|
@@ -26,30 +25,18 @@ export const computeReferenceSecurity = Symbol('computeReferenceSecurity');
|
|
|
26
25
|
export const AmfMixin = (superClass) => {
|
|
27
26
|
class AmfMixin extends superClass {
|
|
28
27
|
_amf;
|
|
29
|
-
_flattenedAmf;
|
|
30
28
|
__cachedKeys;
|
|
29
|
+
__lastSetValue;
|
|
31
30
|
get amf() {
|
|
32
31
|
return this._amf;
|
|
33
32
|
}
|
|
34
33
|
set amf(value) {
|
|
35
|
-
|
|
36
|
-
if (old === value) {
|
|
34
|
+
if (this._amf === value || this.__lastSetValue === value) {
|
|
37
35
|
return;
|
|
38
36
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
expanded = value;
|
|
43
|
-
}
|
|
44
|
-
else {
|
|
45
|
-
const oldFlattened = this._flattenedAmf;
|
|
46
|
-
if (oldFlattened === value) {
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
this._flattenedAmf = value;
|
|
50
|
-
expanded = this._expand(value);
|
|
51
|
-
}
|
|
52
|
-
// Cached keys cannot be static as this element can be using in the sane
|
|
37
|
+
this.__lastSetValue = value;
|
|
38
|
+
const expanded = value ? this._expand(value) : undefined;
|
|
39
|
+
// Cached keys cannot be static as this element can be used in the sane
|
|
53
40
|
// document with different AMF models
|
|
54
41
|
this.__cachedKeys = {};
|
|
55
42
|
this._amf = expanded;
|
|
@@ -68,15 +55,7 @@ export const AmfMixin = (superClass) => {
|
|
|
68
55
|
* Expands flattened AMF model
|
|
69
56
|
*/
|
|
70
57
|
_expand(amf) {
|
|
71
|
-
AmfModelExpander.
|
|
72
|
-
const linkEmbeddingFilter = (key) => !key.endsWith('fixPoint');
|
|
73
|
-
const rootNode = amf['@context'] ? '' : 'amf://id';
|
|
74
|
-
const options = JsonLdOptions.apply()
|
|
75
|
-
.withEmbeddedLinks(linkEmbeddingFilter)
|
|
76
|
-
.withCompactedIris()
|
|
77
|
-
.withExpandedStructure()
|
|
78
|
-
.withRootNode(rootNode);
|
|
79
|
-
return JsonLd.process(amf, options);
|
|
58
|
+
return AmfModelExpander.expand(amf);
|
|
80
59
|
}
|
|
81
60
|
/**
|
|
82
61
|
* Returns compact model key for given value.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AmfMixin.js","sourceRoot":"","sources":["../../../src/amf/AmfMixin.ts"],"names":[],"mappings":"AAAA,uDAAuD;AACvD,sDAAsD;AACtD;;;;;;;;;;;;EAYE;AAEF,6DAA6D;AAC7D,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AAczE,OAAO,EAAE,YAAY,IAAI,EAAE,EAAE,MAAM,4BAA4B,CAAA;AAE/D,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,CAAC,aAAa,CAAC,CAAA;AAChD,MAAM,CAAC,MAAM,mBAAmB,GAAG,MAAM,CAAC,qBAAqB,CAAC,CAAA;AAChE,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,eAAe,CAAC,CAAA;AACpD,MAAM,CAAC,MAAM,wBAAwB,GAAG,MAAM,CAAC,0BAA0B,CAAC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5B,IAAI,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,GAAG,CAAC,EAAE,CAAC;wBACjC,MAAM,CAAC,IAAI,CAAC,QAA6B,CAAC,CAAA;oBAC5C,CAAC;gBACH,CAAC,CAAC,CAAA;YACJ,CAAC;YACD,MAAM,UAAU,GAAG,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAA;YAClD,IAAI,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,UAAU,CAAC,MAAM,EAAE,CAAC;gBACnD,KAAK,MAAM,GAAG,IAAI,UAAU,EAAE,CAAC;oBAC7B,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,YAAY,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;wBAC5D,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,GAAwB,EAAE,IAAI,EAAE,OAAO,CAAC,CAAA;wBACrE,IAAI,KAAK,CAAC,MAAM,EAAE,CAAC;4BACjB,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;wBAC/B,CAAC;oBACH,CAAC;gBACH,CAAC;YACH,CAAC;YACD,OAAO,MAAM,CAAA;QACf,CAAC;KACF;IACD,OAAO,QAA8C,CAAA;AACvD,CAAC,CAAA","sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/no-unused-vars */\n/**\n@license\nCopyright 2018 The Advanced REST client authors <arc@mulesoft.com>\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\nhttp://www.apache.org/licenses/LICENSE-2.0\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n*/\n\n// @ts-expect-error This library has no proper types defined.\nimport { AmfModelExpander, JsonLdOptions, JsonLd } from 'amf-json-ld-lib'\nimport {\n IAmfDocument,\n IAmfDomainElement,\n IAmfEndPoint,\n IAmfLdValue,\n IAmfSecurityScheme,\n IAmfShape,\n IAmfWebApi,\n IAmfOperation,\n IAmfAsyncApi,\n IAmfServer,\n IAmfRequest,\n} from './definitions/Amf.js'\nimport { AmfNamespace as ns } from './definitions/Namespace.js'\n\nexport const findAmfType = Symbol('findAmfType')\nexport const findReferenceObject = Symbol('findReferenceObject')\nexport const getArrayItems = Symbol('getArrayItems')\nexport const computeReferenceSecurity = Symbol('computeReferenceSecurity')\n\nexport interface ServersQueryOptions {\n /**\n * An EndPoint to look for the servers in\n */\n endpointId?: string\n /**\n * An Operation to look for the servers in\n */\n methodId?: string\n}\n\nexport interface ServerQueryOptions {\n /**\n * An EndPoint to look for the servers in. Required if Operation is provided\n */\n endpointId?: string\n /**\n * An Operation to look for the servers in\n */\n methodId?: string\n /**\n * Optional selected server id\n */\n id?: string\n}\n\ntype Constructor<T = object> = new (...args: any[]) => T\n\nexport declare class AmfMixinInterface {\n amf?: IAmfDocument\n _amf?: IAmfDocument\n /**\n * This is an abstract method to be implemented by the components.\n * If, instead, the component uses `amf` setter you must use `super.amf` to\n * set the value.\n * @param amf Current AMF model. Can be undefined.\n */\n _amfChanged(amf?: IAmfDocument): void\n\n /**\n * Expands flattened AMF model\n */\n _expand(amf: any): any\n\n /**\n * Returns compact model key for given value.\n * @param property AMF original property\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns Compact model property name or the same value if value not found in the context.\n */\n _getAmfKey(property?: string, context?: Record<string, string>): string\n\n /**\n * Ensures that the model is AMF object.\n *\n * @param amf AMF json/ld model\n * @returns The API spec\n */\n _ensureAmfModel(amf: any): IAmfDocument | undefined\n\n /**\n * Ensures that the value is an array.\n * It returns undefined when there's no value.\n * It returns the same array if the value is already an array.\n * It returns new array of the item is not an array.\n *\n * @param value An item to test\n */\n _ensureArray(value?: any): unknown[] | undefined\n\n /**\n * Gets a single scalar value from a model.\n * @param model Amf model to extract the value from.\n * @param untrustedKey Model key to search for the value\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns Value for key\n */\n _getValue(\n model: IAmfDomainElement,\n untrustedKey: string,\n context?: Record<string, string>\n ): string | number | boolean | undefined | null\n\n /**\n * Gets values from a model as an array of `@value` properties.\n * @param model Amf model to extract the value from.\n * @param untrustedKey Model key to search for the value\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns The value for key\n */\n _getValueArray(\n model: IAmfDomainElement,\n untrustedKey: string,\n context?: Record<string, string>\n ): (string | number | boolean | null)[] | undefined\n\n /**\n * Reads an array from the model.\n *\n * @param model Amf model to extract the value from.\n * @param untrustedKey Model key to search for the value\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns Value for the key\n */\n [getArrayItems](\n model?: IAmfDomainElement,\n untrustedKey?: string,\n context?: Record<string, string>\n ): IAmfDomainElement[] | undefined\n\n /**\n * Reads the value of the `@id` property.\n * @param model Amf model to extract the value from.\n * @param untrustedKey Model key to search for the @id\n * @param context A context to use. If not set, it looks for the context of the passed model\n */\n _getLinkValue(model: IAmfDomainElement, untrustedKey: string, context?: Record<string, string>): string | undefined\n\n /**\n * Reads the list of value for the `@id` property.\n * @param model Amf model to extract the value from.\n * @param untrustedKey Model key to search for the @id\n * @param context A context to use. If not set, it looks for the context of the passed model\n */\n _getLinkValues(model: IAmfDomainElement, untrustedKey: string, context?: Record<string, string>): string[] | undefined\n\n /**\n * Checks if a model has a type.\n * @param model Model to test\n * @param type Type name\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns True if model has a type.\n */\n _hasType(model?: IAmfDomainElement, type?: string, context?: Record<string, string>): boolean\n\n /**\n * Checks if a shape has a property.\n * @param shape The shape to test\n * @param untrustedKey Property name to test\n * @param context A context to use. If not set, it looks for the context of the passed model\n */\n _hasProperty(shape: IAmfDomainElement, untrustedKey: string, context?: Record<string, string>): boolean\n\n /**\n * Computes array value of a property in a model (shape).\n *\n * @param shape AMF shape object\n * @param untrustedKey Property name\n * @param context A context to use. If not set, it looks for the context of the passed model\n */\n _computePropertyArray(\n shape?: IAmfDomainElement,\n untrustedKey?: string,\n context?: Record<string, string>\n ): (string | number | boolean | null | object)[] | undefined\n\n /**\n * Computes API version from the AMF model.\n *\n * @param amf\n * @param context A context to use. If not set, it looks for the context of the passed model\n */\n _computeApiVersion(amf?: IAmfDocument, context?: Record<string, string>): string | undefined\n\n /**\n * Computes model's `encodes` property.\n *\n * @param model AMF data model\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns List of encodes\n */\n _computeEncodes(model?: IAmfDocument, context?: Record<string, string>): IAmfDomainElement | undefined\n\n /**\n * Computes list of declarations in the AMF api model.\n *\n * @param model AMF json/ld model for an API\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns List of declarations\n */\n _computeDeclares(model?: IAmfDocument, context?: Record<string, string>): IAmfDomainElement[] | undefined\n\n /**\n * Computes list of references in the AMF api model.\n *\n * @param model AMF json/ld model for an API\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns List of declarations\n */\n _computeReferences(model?: IAmfDocument, context?: Record<string, string>): IAmfDomainElement[] | undefined\n\n /**\n * Computes AMF's `http://schema.org/WebAPI` model\n *\n * @param model AMF json/ld model for an API\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns Web API declaration.\n */\n _computeWebApi(model?: IAmfDocument, context?: Record<string, string>): IAmfWebApi | undefined\n\n /**\n * Computes AMF's `http://schema.org/API` model\n *\n * @param model AMF json/ld model for an API\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns API declaration.\n */\n _computeApi(model?: IAmfDocument, context?: Record<string, string>): IAmfAsyncApi | IAmfWebApi | undefined\n\n /**\n * Returns whether an AMF node is a WebAPI node\n *\n * @param model AMF json/ld model for an API\n * @param context A context to use. If not set, it looks for the context of the passed model\n */\n _isWebAPI(model?: IAmfDocument, context?: Record<string, string>): boolean\n\n /**\n * Returns whether an AMF node is an AsyncAPI node\n *\n * @param model AMF json/ld model for an API\n * @param context A context to use. If not set, it looks for the context of the passed model\n */\n _isAsyncAPI(model?: IAmfDocument, context?: Record<string, string>): boolean\n\n /**\n * Returns whether an AMF node is an API node\n *\n * @param model AMF json/ld model for an API\n * @param context A context to use. If not set, it looks for the context of the passed model\n */\n _isAPI(model?: IAmfDocument, context?: Record<string, string>): boolean\n\n /**\n * Determines whether a partial model is valid for reading servers from\n * Current valid values:\n * - Operation\n * - Endpoint\n * @param model The partial model to evaluate\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns Whether the model's type is part of the array of valid node types from which\n * to read servers\n * @private\n */\n _isValidServerPartial(model: IAmfDomainElement | IAmfDomainElement[], context?: Record<string, string>): boolean\n\n /**\n * @param options Server query options\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns List of servers for method, if defined, or endpoint, if defined, or root level\n */\n _getServers(options?: ServersQueryOptions, context?: Record<string, string>): IAmfServer[] | undefined\n\n /**\n * Computes value for the `expects` property.\n *\n * @param method AMF `supportedOperation` model\n * @param context A context to use. If not set, it looks for the context of the passed model\n */\n _computeExpects(method?: IAmfOperation, context?: Record<string, string>): IAmfRequest | undefined\n\n /**\n * Computes list of endpoints from a WebApi model.\n * @param webApi\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns An array of endpoints.\n */\n _computeEndpoints(webApi?: IAmfWebApi, context?: Record<string, string>): IAmfEndPoint[] | undefined\n /**\n * Computes model for an endpoint documentation.\n *\n * @param webApi Current value of `webApi` property\n * @param id Selected shape ID\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns An endpoint definition\n */\n _computeEndpointModel(webApi?: IAmfWebApi, id?: string, context?: Record<string, string>): IAmfEndPoint | undefined\n\n /**\n * Computes method for the method documentation.\n *\n * @param webApi Current value of `webApi` property\n * @param selected Selected shape\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns A method definition\n */\n _computeMethodModel(\n webApi?: IAmfWebApi,\n selected?: string,\n context?: Record<string, string>\n ): IAmfOperation | undefined\n\n /**\n * Computes an endpoint for a method.\n * @param webApi The WebApi AMF model\n * @param methodId Method id\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns An endpoint model of undefined.\n */\n _computeMethodEndpoint(\n webApi?: IAmfWebApi,\n methodId?: string,\n context?: Record<string, string>\n ): IAmfEndPoint | undefined\n\n /**\n * Computes a list of methods for an endpoint that contains a method with\n * given id.\n *\n * @param webApi WebApi model\n * @param methodId Method id.\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns A list of sibling methods or undefined.\n */\n __computeMethodsListForMethod(\n webApi?: IAmfWebApi,\n methodId?: string,\n context?: Record<string, string>\n ): IAmfOperation[] | undefined\n\n /**\n * Computes a type documentation model.\n *\n * @param declares Current value of `declares` property\n * @param references Current value of `references` property\n * @param selected Selected shape\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns A type definition\n */\n _computeType(\n declares?: IAmfDomainElement[],\n references?: IAmfDomainElement[],\n selected?: string,\n context?: Record<string, string>\n ): IAmfShape | undefined\n\n /**\n * Finds a type in the model declares and references.\n * @param domainId The domain id of the type (AMF's shape).\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns The AMF shape or undefined when not found.\n */\n [findAmfType](domainId?: string, context?: Record<string, string>): IAmfShape | undefined\n\n /**\n * Searches for an object in model's references list.\n * It does not resolve the object (useful for handling links correctly).\n *\n * @param domainId The domain of the object to find in the references.\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns The domain object or undefined.\n */\n [findReferenceObject](domainId: string, context?: Record<string, string>): IAmfDomainElement | undefined\n\n /**\n * Computes a type model from a reference (library for example).\n * @param reference AMF model for a reference to extract the data from\n * @param selected Node ID to look for\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns Type definition or undefined if not found.\n */\n _computeReferenceType(\n reference?: IAmfDomainElement,\n selected?: string,\n context?: Record<string, string>\n ): IAmfShape | undefined\n\n /**\n * Computes a documentation model.\n *\n * @param webApi Current value of `webApi` property\n * @param selected Selected shape\n * @param context A context to use. If not set, it looks for the context of the passed model\n */\n _computeDocument(\n webApi?: IAmfDomainElement,\n selected?: string,\n context?: Record<string, string>\n ): IAmfDomainElement | undefined\n\n /**\n * Resolves a reference to an external fragment.\n *\n * @param shape A shape to resolve\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns Resolved shape.\n */\n _resolve(shape: any, context?: Record<string, string>): any\n\n /**\n * @param amf References object to search in\n * @param id Id of the shape to resolve\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns Resolved shape for given reference, undefined otherwise\n */\n _getLinkTarget(amf?: IAmfDocument, id?: string, context?: Record<string, string>): IAmfDomainElement | undefined\n\n /**\n * Resolves the shape of a given reference.\n *\n * @param references References object to search in\n * @param id Id of the shape to resolve\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns Resolved shape for given reference, undefined otherwise\n */\n _obtainShapeFromReferences(\n references?: IAmfDomainElement[],\n id?: string,\n context?: Record<string, string>\n ): IAmfDomainElement | undefined\n\n /**\n * Searches a node with a given ID in an array\n *\n * @param array Array to search for a given ID\n * @param id Id to search for\n * @returns Node with the given ID when found, undefined otherwise\n */\n _findById(array?: IAmfDomainElement[], id?: string): IAmfDomainElement | undefined\n\n _getReferenceId(amf?: IAmfDocument, id?: string, context?: Record<string, string>): IAmfDomainElement | undefined\n\n _resolveRecursive(shape: any, context?: Record<string, string>): void\n\n /**\n * Merge two shapes together. If the resulting shape has one of the \"special merge\" keys,\n * then the special merge function for that key will be used to match that property\n * @param shapeA AMF node\n * @param shapeB AMF node\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns Merged AMF node\n */\n _mergeShapes(shapeA: any, shapeB: any, context?: Record<string, string>): any\n\n /**\n * Obtains source map sources value from two shapes and returns the merged result\n * If neither shape has a sources node, then an empty object will be returned.\n * Result is wrapped in an array as per AMF model standard\n * @param shapeA AMF node\n * @param shapeB AMF node\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns Empty object or resulting merge, wrapped in an array\n * @private\n */\n _mergeSourceMapsSources(shapeA: any, shapeB: any, context?: Record<string, string>): (any | object)[]\n\n /**\n * Expands the key property from compacted mode to full mode.\n * @param value The value to process\n * @returns The expanded value.\n */\n _expandKey(value: string, context?: Record<string, string>): string\n\n /**\n * Computes a security model from a reference (library for example).\n * @param domainId Domain id of the security requirement to find.\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns Type definition or undefined if not found.\n */\n findSecurityScheme(domainId: string, context?: Record<string, string>): IAmfSecurityScheme | undefined\n\n /**\n * Computes a security model from a reference (library for example).\n * @param reference AMF model for a reference to extract the data from\n * @param selected Node ID to look for\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns Type definition or undefined if not found.\n */\n [computeReferenceSecurity](\n reference: IAmfDomainElement,\n selected: string,\n context?: Record<string, string>\n ): IAmfSecurityScheme | undefined\n\n /**\n * Collects domain objects by a domain type.\n * @param source The element to search for declare/encoded objects.\n * @param type The domain type\n * @param context A context to use. If not set, it looks for the context of the passed model\n */\n getByType(source: IAmfDomainElement, type: string, context?: Record<string, string>): IAmfDomainElement[]\n}\n\n/**\n * Common functions used by AMF components to compute AMF values.\n */\nexport const AmfMixin = <T extends Constructor<any>>(superClass: T): Constructor<AmfMixinInterface> & T => {\n class AmfMixin extends superClass {\n _amf?: IAmfDocument\n _flattenedAmf?: any\n __cachedKeys?: any\n\n get amf(): IAmfDocument | undefined {\n return this._amf\n }\n\n set amf(value: IAmfDocument | undefined) {\n const old = this._amf\n if (old === value) {\n return\n }\n let expanded\n if (!value || AmfModelExpander.isInExpandedForm(value)) {\n this._flattenedAmf = undefined\n expanded = value\n } else {\n const oldFlattened = this._flattenedAmf\n if (oldFlattened === value) {\n return\n }\n this._flattenedAmf = value\n expanded = this._expand(value)\n }\n // Cached keys cannot be static as this element can be using in the sane\n // document with different AMF models\n this.__cachedKeys = {}\n this._amf = expanded\n this._amfChanged(expanded)\n }\n\n /**\n * This is an abstract method to be implemented by the components.\n * If, instead, the component uses `amf` setter you must use `super.amf` to\n * set the value.\n * @param amf Current AMF model. Can be undefined.\n */\n _amfChanged(amf?: IAmfDocument): void {\n // ...\n }\n\n /**\n * Expands flattened AMF model\n */\n _expand(amf: any): any {\n AmfModelExpander.preprocessLegacyRootNodeId(amf)\n const linkEmbeddingFilter = (key: string): boolean => !key.endsWith('fixPoint')\n const rootNode = amf['@context'] ? '' : 'amf://id'\n const options = JsonLdOptions.apply()\n .withEmbeddedLinks(linkEmbeddingFilter)\n .withCompactedIris()\n .withExpandedStructure()\n .withRootNode(rootNode)\n return JsonLd.process(amf, options)\n }\n\n /**\n * Returns compact model key for given value.\n * @param property AMF original property\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns Compact model property name or the same value if value not found in the context.\n */\n _getAmfKey(property?: string, context?: Record<string, string>): string {\n if (!property) {\n return ''\n }\n let { amf } = this\n if (!amf && !context) {\n return property\n }\n if (Array.isArray(amf)) {\n ;[amf] = amf\n }\n if (!this.__cachedKeys) {\n this.__cachedKeys = {}\n }\n const ctx = (context || (amf && amf['@context'])) as Record<string, string> | undefined\n if (!ctx || !property) {\n return property\n }\n const cache = this.__cachedKeys\n if (property in cache) {\n return cache[property]\n }\n property = String(property)\n const hashIndex = property.indexOf('#')\n const hashProperty = property.substring(0, hashIndex + 1)\n const keys = Object.keys(ctx)\n for (let i = 0, len = keys.length; i < len; i++) {\n const k = keys[i]\n if (ctx[k] === property) {\n cache[property] = k\n return k\n }\n if (hashIndex === -1 && property.indexOf(ctx[k]) === 0) {\n const result = property.replace(ctx[k], `${k}:`)\n cache[property] = result\n return result\n }\n if (ctx[k] === hashProperty) {\n const result = `${k}:${property.substring(hashIndex + 1)}`\n cache[property] = result\n return result\n }\n }\n return property\n }\n\n /**\n * Ensures that the model is AMF object.\n *\n * @param amf AMF json/ld model\n * @returns The API spec\n */\n _ensureAmfModel(amf: any): IAmfDocument | undefined {\n if (!amf) {\n return undefined\n }\n if (Array.isArray(amf)) {\n ;[amf] = amf\n }\n if (this._hasType(amf, ns.aml.vocabularies.document.Document)) {\n return amf\n }\n return undefined\n }\n\n /**\n * Ensures that the value is an array.\n * It returns undefined when there's no value.\n * It returns the same array if the value is already an array.\n * It returns new array of the item is not an array.\n *\n * @param value An item to test\n */\n _ensureArray(value?: any): unknown[] | undefined {\n if (!value) {\n return undefined\n }\n if (value instanceof Array) {\n return value\n }\n return [value]\n }\n\n /**\n * Gets a single scalar value from a model.\n * @param model Amf model to extract the value from.\n * @param untrustedKey Model key to search for the value\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns Value for key\n */\n _getValue(\n model: IAmfDomainElement,\n untrustedKey: string,\n context?: Record<string, string>\n ): string | number | boolean | undefined | null {\n const key = this._getAmfKey(untrustedKey, context)\n if (!key) {\n return undefined\n }\n let data = model && (model[key as keyof IAmfDomainElement] as string | number | boolean | undefined | null)\n if (!data) {\n // This includes \"undefined\", \"false\", \"null\" and \"0\"\n return data\n }\n if (Array.isArray(data)) {\n ;[data] = data\n }\n if (!data) {\n return undefined\n }\n const type = typeof data\n if (['string', 'number', 'boolean', 'undefined'].includes(type)) {\n return data\n }\n return (data as unknown as IAmfLdValue<any>)['@value']\n }\n\n /**\n * Gets values from a model as an array of `@value` properties.\n * @param model Amf model to extract the value from.\n * @param untrustedKey Model key to search for the value\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns The value for key\n */\n _getValueArray(\n model: IAmfDomainElement,\n untrustedKey: string,\n context?: Record<string, string>\n ): (string | number | boolean | null)[] | undefined {\n const key = this._getAmfKey(untrustedKey, context)\n if (!key) {\n return undefined\n }\n const data = model && (this._ensureArray((model as any)[key]) as any[])\n if (!Array.isArray(data)) {\n return undefined\n }\n return data.map((item) => item['@value'] || item)\n }\n\n /**\n * Reads an array from the model.\n *\n * @param model Amf model to extract the value from.\n * @param untrustedKey Model key to search for the value\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns Value for the key\n */\n [getArrayItems](\n model?: IAmfDomainElement,\n untrustedKey?: string,\n context?: Record<string, string>\n ): IAmfDomainElement[] | undefined {\n const k = this._getAmfKey(untrustedKey, context)\n if (!k) {\n return undefined\n }\n const data = model && (this._ensureArray((model as any)[k]) as IAmfDomainElement[])\n if (!Array.isArray(data)) {\n return undefined\n }\n return data\n }\n\n /**\n * Reads the value of the `@id` property.\n * @param model Amf model to extract the value from.\n * @param untrustedKey Model key to search for the @id\n * @param context A context to use. If not set, it looks for the context of the passed model\n */\n _getLinkValue(\n model: IAmfDomainElement,\n untrustedKey: string,\n context?: Record<string, string>\n ): string | undefined {\n const k = this._getAmfKey(untrustedKey, context)\n if (!k) {\n return undefined\n }\n let data = model && (model as any)[k]\n if (!data) {\n return undefined\n }\n if (Array.isArray(data)) {\n ;[data] = data\n }\n if (!data) {\n return undefined\n }\n return data['@id']\n }\n\n /**\n * Reads the list of value for the `@id` property.\n * @param model Amf model to extract the value from.\n * @param untrustedKey Model key to search for the @id\n * @param context A context to use. If not set, it looks for the context of the passed model\n */\n _getLinkValues(\n model: IAmfDomainElement,\n untrustedKey: string,\n context?: Record<string, string>\n ): string[] | undefined {\n const k = this._getAmfKey(untrustedKey, context)\n if (!k) {\n return undefined\n }\n let data = (model && (model as any)[k]) as IAmfDomainElement[] | undefined\n if (!data) {\n return undefined\n }\n if (!Array.isArray(data)) {\n data = [data]\n }\n return data.map((i) => i['@id'])\n }\n\n /**\n * Checks if a model has a type.\n * @param model Model to test\n * @param type Type name\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns True if model has a type.\n */\n _hasType(model?: IAmfDomainElement, type?: string, context?: Record<string, string>): boolean {\n const types = this._ensureArray(model && model['@type'])\n if (!types || !types.length) {\n return false\n }\n const key = this._getAmfKey(type, context)\n for (const type of types) {\n if (type === key) {\n return true\n }\n }\n return false\n }\n\n /**\n * Checks if a shape has a property.\n * @param shape The shape to test\n * @param untrustedKey Property name to test\n * @param context A context to use. If not set, it looks for the context of the passed model\n */\n _hasProperty(shape: IAmfDomainElement, untrustedKey: string, context?: Record<string, string>): boolean {\n const key = this._getAmfKey(untrustedKey, context) as string\n return !!(shape && key && key in shape)\n }\n\n /**\n * Computes array value of a property in a model (shape).\n *\n * @param shape AMF shape object\n * @param untrustedKey Property name\n * @param context A context to use. If not set, it looks for the context of the passed model\n */\n _computePropertyArray(\n shape?: IAmfDomainElement,\n untrustedKey?: string,\n context?: Record<string, string>\n ): (string | number | boolean | null | object)[] | undefined {\n if (!shape) {\n return undefined\n }\n const key = this._getAmfKey(untrustedKey, context)\n if (!key) {\n return undefined\n }\n const data = this._ensureArray(shape && (shape as any)[key])\n if (!data || !Array.isArray(data)) {\n return undefined\n }\n return data as (string | number | boolean | null | object)[]\n }\n\n /**\n * Computes API version from the AMF model.\n *\n * @param amf\n * @param context A context to use. If not set, it looks for the context of the passed model\n */\n _computeApiVersion(amf?: IAmfDocument, context?: Record<string, string>): string | undefined {\n const api = this._computeApi(amf)\n if (!api) {\n return undefined\n }\n return this._getValue(api, ns.aml.vocabularies.core.version, context) as string\n }\n\n /**\n * Computes model's `encodes` property.\n *\n * @param model AMF data model\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns List of encodes\n */\n _computeEncodes(model?: IAmfDocument, context?: Record<string, string>): IAmfDomainElement | undefined {\n if (!model) {\n return undefined\n }\n if (Array.isArray(model)) {\n ;[model] = model\n }\n const key = this._getAmfKey(ns.aml.vocabularies.document.encodes, context)\n if (!key) {\n return undefined\n }\n const data = (model as any)[key]\n if (data) {\n return Array.isArray(data) ? data[0] : data\n }\n return undefined\n }\n\n /**\n * Computes list of declarations in the AMF api model.\n *\n * @param model AMF json/ld model for an API\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns List of declarations\n */\n _computeDeclares(model?: IAmfDocument, context?: Record<string, string>): IAmfDomainElement[] | undefined {\n if (!model) {\n return undefined\n }\n if (Array.isArray(model)) {\n ;[model] = model\n }\n if (!model) {\n return undefined\n }\n const key = this._getAmfKey(ns.aml.vocabularies.document.declares, context)\n if (!key) {\n return undefined\n }\n const data = this._ensureArray((model as any)[key]) as IAmfDomainElement[]\n return Array.isArray(data) ? data : undefined\n }\n\n /**\n * Computes list of references in the AMF api model.\n *\n * @param model AMF json/ld model for an API\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns List of declarations\n */\n _computeReferences(model?: IAmfDocument, context?: Record<string, string>): IAmfDomainElement[] | undefined {\n if (!model) {\n return undefined\n }\n if (Array.isArray(model)) {\n ;[model] = model\n }\n if (!model) {\n return undefined\n }\n const key = this._getAmfKey(ns.aml.vocabularies.document.references, context)\n if (!key) {\n return undefined\n }\n const data = this._ensureArray((model as any)[key]) as IAmfDomainElement[]\n return data instanceof Array ? data : undefined\n }\n\n /**\n * Computes AMF's `http://schema.org/WebAPI` model\n *\n * @param model AMF json/ld model for an API\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns Web API declaration.\n */\n _computeWebApi(model?: IAmfDocument, context?: Record<string, string>): IAmfWebApi | undefined {\n const enc = this._computeEncodes(model, context)\n if (!enc) {\n return undefined\n }\n if (this._hasType(enc, ns.aml.vocabularies.apiContract.WebAPI, context)) {\n return enc\n }\n return undefined\n }\n\n /**\n * Computes AMF's `http://schema.org/API` model\n *\n * @param model AMF json/ld model for an API\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns API declaration.\n */\n _computeApi(model?: IAmfDocument, context?: Record<string, string>): IAmfAsyncApi | IAmfWebApi | undefined {\n const enc = this._computeEncodes(model, context)\n if (!enc) {\n return undefined\n }\n if (this._isAPI(model, context) || this._isWebAPI(model, context) || this._isAsyncAPI(model, context)) {\n return enc\n }\n return undefined\n }\n\n /**\n * Returns whether an AMF node is a WebAPI node\n *\n * @param model AMF json/ld model for an API\n * @param context A context to use. If not set, it looks for the context of the passed model\n */\n _isWebAPI(model?: IAmfDocument, context?: Record<string, string>): boolean {\n const enc = this._computeEncodes(model, context)\n if (!enc) {\n return false\n }\n return this._hasType(enc, ns.aml.vocabularies.apiContract.WebAPI, context)\n }\n\n /**\n * Returns whether an AMF node is an AsyncAPI node\n *\n * @param model AMF json/ld model for an API\n * @param context A context to use. If not set, it looks for the context of the passed model\n */\n _isAsyncAPI(model?: IAmfDocument, context?: Record<string, string>): boolean {\n const enc = this._computeEncodes(model, context)\n if (!enc) {\n return false\n }\n return this._hasType(enc, ns.aml.vocabularies.apiContract.AsyncAPI, context)\n }\n\n /**\n * Returns whether an AMF node is an API node\n *\n * @param model AMF json/ld model for an API\n * @param context A context to use. If not set, it looks for the context of the passed model\n */\n _isAPI(model?: IAmfDocument, context?: Record<string, string>): boolean {\n const enc = this._computeEncodes(model, context)\n if (!enc) {\n return false\n }\n return this._hasType(enc, ns.aml.vocabularies.apiContract.API, context)\n }\n\n /**\n * Determines whether a partial model is valid for reading servers from\n * Current valid values:\n * - Operation\n * - Endpoint\n * @param model The partial model to evaluate\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns Whether the model's type is part of the array of valid node types from which\n * to read servers\n * @private\n */\n _isValidServerPartial(model: IAmfDomainElement | IAmfDomainElement[], context?: Record<string, string>): boolean {\n if (Array.isArray(model)) {\n ;[model] = model\n }\n if (!model) {\n return false\n }\n const oKey = ns.aml.vocabularies.apiContract.Operation\n const eKey = ns.aml.vocabularies.apiContract.EndPoint\n const allowedPartialModelTypes = [this._getAmfKey(oKey, context), this._getAmfKey(eKey, context)]\n const types = model['@type']\n for (const type of types) {\n if (allowedPartialModelTypes.indexOf(type) !== -1) {\n return true\n }\n }\n return false\n }\n\n /**\n * @param options Server query options\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns List of servers for method, if defined, or endpoint, if defined, or root level\n */\n _getServers(options: ServersQueryOptions = {}, context?: Record<string, string>): IAmfServer[] | undefined {\n const { endpointId, methodId } = options\n const { amf } = this\n if (!amf) {\n return undefined\n }\n let api = this._computeApi(amf, context)\n if (Array.isArray(api)) {\n ;[api] = api\n }\n if (!api) {\n if (this._isValidServerPartial(amf, context)) {\n api = amf\n } else {\n return undefined\n }\n }\n\n const serverKey = this._getAmfKey(ns.aml.vocabularies.apiContract.server, context)\n\n const getRootServers = (): IAmfServer[] | undefined =>\n this[getArrayItems](api, serverKey, context) as IAmfServer[]\n const getEndpointServers = (): IAmfServer[] | undefined => {\n const endpoint = this._computeEndpointModel(api, endpointId, context)\n const servers = this[getArrayItems](endpoint, serverKey, context) as IAmfServer[]\n if (servers) {\n return servers\n }\n return getRootServers()\n }\n const getMethodServers = (): IAmfServer[] | undefined => {\n const method = this._computeMethodModel(api, methodId, context)\n const servers = this[getArrayItems](method, serverKey, context) as IAmfServer[]\n if (servers) {\n return servers\n }\n return getEndpointServers()\n }\n\n if (methodId) {\n return getMethodServers()\n }\n if (endpointId) {\n return getEndpointServers()\n }\n return getRootServers()\n }\n\n /**\n * Computes value for the `expects` property.\n *\n * @param method AMF `supportedOperation` model\n * @param context A context to use. If not set, it looks for the context of the passed model\n */\n _computeExpects(method?: IAmfOperation, context?: Record<string, string>): IAmfRequest | undefined {\n const operationKey = ns.aml.vocabularies.apiContract.Operation\n const expectsKey = ns.aml.vocabularies.apiContract.expects\n if (this._hasType(method, operationKey, context)) {\n const key = this._getAmfKey(expectsKey, context) as string\n const expects = this._ensureArray((method as any)[key])\n if (expects) {\n return Array.isArray(expects) ? (expects[0] as IAmfRequest) : (expects as IAmfRequest)\n }\n }\n return undefined\n }\n\n /**\n * Computes list of endpoints from a WebApi model.\n * @param webApi\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns An array of endpoints.\n */\n _computeEndpoints(webApi?: IAmfWebApi, context?: Record<string, string>): IAmfEndPoint[] | undefined {\n if (!webApi) {\n return []\n }\n const endpointKey = ns.aml.vocabularies.apiContract.endpoint\n const key = this._getAmfKey(endpointKey, context) as string\n return this._ensureArray((webApi as any)[key]) as IAmfEndPoint[]\n }\n\n /**\n * Computes model for an endpoint documentation.\n *\n * @param webApi Current value of `webApi` property\n * @param id Selected shape ID\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns An endpoint definition\n */\n _computeEndpointModel(\n webApi?: IAmfWebApi,\n id?: string,\n context?: Record<string, string>\n ): IAmfEndPoint | undefined {\n if (this._hasType(webApi, ns.aml.vocabularies.apiContract.EndPoint, context)) {\n return webApi\n }\n const endpoints = this._computeEndpoints(webApi, context)\n if (!endpoints) {\n return undefined\n }\n return endpoints.find((item) => item['@id'] === id)\n }\n\n /**\n * Computes method for the method documentation.\n *\n * @param webApi Current value of `webApi` property\n * @param selected Selected shape\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns A method definition\n */\n _computeMethodModel(\n webApi?: IAmfWebApi,\n selected?: string,\n context?: Record<string, string>\n ): IAmfOperation | undefined {\n const methods = this.__computeMethodsListForMethod(webApi, selected, context)\n if (!methods) {\n return undefined\n }\n return methods.find((item) => item['@id'] === selected)\n }\n\n /**\n * Computes an endpoint for a method.\n * @param webApi The WebApi AMF model\n * @param methodId Method id\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns An endpoint model of undefined.\n */\n _computeMethodEndpoint(\n webApi?: IAmfWebApi,\n methodId?: string,\n context?: Record<string, string>\n ): IAmfEndPoint | undefined {\n if (!webApi || !methodId) {\n return undefined\n }\n if (this._hasType(webApi, ns.aml.vocabularies.apiContract.EndPoint, context)) {\n return webApi\n }\n const endpoints = this._computeEndpoints(webApi, context)\n if (!endpoints) {\n return undefined\n }\n const opKey = this._getAmfKey(ns.aml.vocabularies.apiContract.supportedOperation, context)\n for (let i = 0, len = endpoints.length; i < len; i++) {\n const endpoint = endpoints[i]\n let methods = (endpoint as any)[opKey] as IAmfOperation[]\n if (!methods) {\n continue\n }\n if (!Array.isArray(methods)) {\n methods = [methods]\n }\n for (let j = 0, jLen = methods.length; j < jLen; j++) {\n if (methods[j]['@id'] === methodId) {\n return endpoint\n }\n }\n }\n return undefined\n }\n\n /**\n * Computes a list of methods for an endpoint that contains a method with\n * given id.\n *\n * @param webApi WebApi model\n * @param methodId Method id.\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns A list of sibling methods or undefined.\n */\n __computeMethodsListForMethod(\n webApi?: IAmfWebApi,\n methodId?: string,\n context?: Record<string, string>\n ): IAmfOperation[] | undefined {\n const endpoint = this._computeMethodEndpoint(webApi, methodId, context)\n if (!endpoint) {\n return undefined\n }\n const opKey = this._getAmfKey(ns.aml.vocabularies.apiContract.supportedOperation, context)\n return this._ensureArray((endpoint as any)[opKey]) as IAmfOperation[] | undefined\n }\n\n /**\n * Computes a type documentation model.\n *\n * @param declares Current value of `declares` property\n * @param references Current value of `references` property\n * @param selected Selected shape\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns A type definition\n */\n _computeType(\n declares?: IAmfDomainElement[],\n references?: IAmfDomainElement[],\n selected?: string,\n context?: Record<string, string>\n ): IAmfShape | undefined {\n if ((!declares && !references) || !selected) {\n return undefined\n }\n // In compact model some IDs are presented in long version (in source maps for examples)\n // This must test for this case as well.\n const compactId = selected.replace('amf://id', '')\n let type = declares && declares.find((item) => item['@id'] === selected || item['@id'] === compactId)\n if (!type && references && references.length) {\n for (let i = 0, len = references.length; i < len; i++) {\n if (!this._hasType(references[i], ns.aml.vocabularies.document.Module)) {\n continue\n }\n type = this._computeReferenceType(references[i], selected, context)\n if (type) {\n break\n }\n }\n }\n return type\n }\n\n /**\n * Finds a type in the model declares and references.\n * @param domainId The domain id of the type (AMF's shape).\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns The AMF shape or undefined when not found.\n */\n [findAmfType](domainId?: string, context?: Record<string, string>): IAmfShape | undefined {\n let { amf } = this\n if (!amf || !domainId) {\n return undefined\n }\n if (Array.isArray(amf)) {\n ;[amf] = amf\n }\n const declares = this._computeDeclares(amf, context)\n const compactId = domainId.replace('amf://id', '')\n if (Array.isArray(declares)) {\n const result = declares.find((item) => item['@id'] === domainId || item['@id'] === compactId)\n if (result) {\n return result\n }\n }\n return this[findReferenceObject](domainId)\n }\n\n /**\n * Searches for an object in model's references list.\n * It does not resolve the object (useful for handling links correctly).\n *\n * @param domainId The domain of the object to find in the references.\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns The domain object or undefined.\n */\n [findReferenceObject](domainId: string, context?: Record<string, string>): IAmfDomainElement | undefined {\n let { amf } = this\n if (Array.isArray(amf)) {\n ;[amf] = amf\n }\n if (!amf) {\n return undefined\n }\n const references = this._computeReferences(amf, context)\n if (!Array.isArray(references) || !references.length) {\n return undefined\n }\n const compactId = domainId.replace('amf://id', '')\n for (let i = 0, len = references.length; i < len; i++) {\n const ref = /** @type IAmfDocument */ references[i]\n const declares = this._computeDeclares(ref, context)\n if (!Array.isArray(declares)) {\n continue\n }\n for (let j = 0, lenDecl = declares.length; j < lenDecl; j++) {\n let declared = declares[j]\n if (Array.isArray(declared)) {\n ;[declared] = declared\n }\n if (declared['@id'] === domainId || declared['@id'] === compactId) {\n return declared\n }\n }\n }\n return undefined\n }\n\n /**\n * Computes a type model from a reference (library for example).\n * @param reference AMF model for a reference to extract the data from\n * @param selected Node ID to look for\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns Type definition or undefined if not found.\n */\n _computeReferenceType(\n reference?: IAmfDomainElement,\n selected?: string,\n context?: Record<string, string>\n ): IAmfShape | undefined {\n const declare = this._computeDeclares(reference, context)\n if (!declare || !selected) {\n return undefined\n }\n // In compact model some IDs are presented in long version (in source maps for examples)\n // This must test for this case as well.\n const compactId = selected.replace('amf://id', '')\n let result = declare.find((item) => {\n if (Array.isArray(item)) {\n ;[item] = item\n }\n return item['@id'] === selected || item['@id'] === compactId\n })\n if (Array.isArray(result)) {\n ;[result] = result\n }\n return this._resolve(result)\n }\n\n /**\n * Computes a documentation model.\n *\n * @param webApi Current value of `webApi` property\n * @param selected Selected shape\n * @param context A context to use. If not set, it looks for the context of the passed model\n */\n _computeDocument(\n webApi?: IAmfDomainElement,\n selected?: string,\n context?: Record<string, string>\n ): IAmfDomainElement | undefined {\n if (!webApi || !selected) {\n return undefined\n }\n const key = this._getAmfKey(ns.aml.vocabularies.core.documentation, context)\n const docs = this._ensureArray((webApi as any)[key]) as IAmfDomainElement[]\n return docs && docs.find((item) => ((item as any)['@id'] as string) === selected)\n }\n\n /**\n * Resolves a reference to an external fragment.\n *\n * @param shape A shape to resolve\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns Resolved shape.\n */\n _resolve(shape: any, context?: Record<string, string>): any {\n const { amf } = this\n if (typeof shape !== 'object' || Array.isArray(shape) || !amf || shape.__apicResolved) {\n return shape\n }\n let refKey = this._getAmfKey(ns.aml.vocabularies.document.linkTarget, context)\n let refValue = this._ensureArray(shape[refKey]) as IAmfDomainElement[]\n let refData\n if (refValue) {\n const rk = refValue[0]['@id']\n if (rk === shape['@id']) {\n // recursive shape.\n shape.__apicResolved = true\n return shape\n }\n refData = this._getLinkTarget(amf, rk, context)\n } else {\n refKey = this._getAmfKey(ns.aml.vocabularies.document.referenceId, context)\n refValue = this._ensureArray(shape[refKey]) as IAmfDomainElement[]\n if (refValue) {\n const rk = refValue[0]['@id']\n if (rk === shape['@id']) {\n // recursive shape.\n shape.__apicResolved = true\n return shape\n }\n refData = this._getReferenceId(amf, rk, context)\n }\n }\n if (!refData) {\n this._resolveRecursive(shape)\n shape.__apicResolved = true\n return shape\n }\n const copy = { ...refData } as any\n delete copy['@id']\n const types = copy['@type']\n if (types) {\n if (shape['@type']) {\n shape['@type'] = shape['@type'].concat(types)\n } else {\n shape['@type'] = types\n }\n delete copy['@type']\n }\n this._mergeShapes(shape, copy, context)\n shape.__apicResolved = true\n this._resolveRecursive(shape)\n return shape\n }\n\n /**\n * @param amf References object to search in\n * @param id Id of the shape to resolve\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns Resolved shape for given reference, undefined otherwise\n */\n _getLinkTarget(amf?: IAmfDocument, id?: string, context?: Record<string, string>): IAmfDomainElement | undefined {\n if (!amf || !id) {\n return undefined\n }\n let target\n const declares = this._computeDeclares(amf, context)\n if (declares) {\n target = this._findById(declares, id)\n }\n if (!target) {\n const references = this._computeReferences(amf, context)\n target = this._obtainShapeFromReferences(references, id, context)\n }\n if (!target) {\n return undefined\n }\n // Declaration may contain references\n target = this._resolve(target)\n return target\n }\n\n /**\n * Resolves the shape of a given reference.\n *\n * @param references References object to search in\n * @param id Id of the shape to resolve\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns Resolved shape for given reference, undefined otherwise\n */\n _obtainShapeFromReferences(\n references?: IAmfDomainElement[],\n id?: string,\n context?: Record<string, string>\n ): IAmfDomainElement | undefined {\n if (!Array.isArray(references) || !references.length) {\n return undefined\n }\n let target\n for (const _ref of references) {\n // case of fragment that encodes the shape\n const encoded = this._computeEncodes(_ref, context)\n if (encoded && encoded['@id'] === id) {\n target = encoded\n break\n }\n // case of a library which declares types\n if (!encoded) {\n target = this._findById(this._computeDeclares(_ref, context), id)\n if (target) break\n }\n }\n return target\n }\n\n /**\n * Searches a node with a given ID in an array\n *\n * @param array Array to search for a given ID\n * @param id Id to search for\n * @returns Node with the given ID when found, undefined otherwise\n */\n _findById(array?: IAmfDomainElement[], id?: string): IAmfDomainElement | undefined {\n if (!array) return undefined\n let target\n for (const _current of array) {\n if (_current && _current['@id'] === id) {\n target = _current\n break\n }\n }\n return target\n }\n\n _getReferenceId(amf?: IAmfDocument, id?: string, context?: Record<string, string>): IAmfDomainElement | undefined {\n if (!amf || !id) {\n return undefined\n }\n const refs = this._computeReferences(amf, context)\n if (!refs) {\n return undefined\n }\n for (const _ref of refs) {\n const enc = this._computeEncodes(_ref, context)\n if (enc) {\n if (enc['@id'] === id) {\n return enc\n }\n }\n }\n return undefined\n }\n\n _resolveRecursive(shape: any, context?: Record<string, string>): void {\n Object.keys(shape).forEach((key) => {\n const currentShape = shape[key]\n if (Array.isArray(currentShape)) {\n for (let i = 0, len = currentShape.length; i < len; i++) {\n currentShape[i] = this._resolve(currentShape[i])\n }\n } else if (typeof currentShape === 'object') {\n shape[key] = this._resolve(currentShape, context)\n }\n })\n }\n\n /**\n * Merge two shapes together. If the resulting shape has one of the \"special merge\" keys,\n * then the special merge function for that key will be used to match that property\n * @param shapeA AMF node\n * @param shapeB AMF node\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns Merged AMF node\n */\n _mergeShapes(shapeA: any, shapeB: any, context?: Record<string, string>): any {\n const merged = { ...shapeA, ...shapeB }\n const specialMerges = [\n {\n key: this._getAmfKey(ns.aml.vocabularies.docSourceMaps.sources, context),\n merger: this._mergeSourceMapsSources.bind(this),\n },\n ]\n specialMerges.forEach(({ key, merger }) => {\n if (this._hasProperty(merged, key, context)) {\n merged[key] = merger(shapeA, shapeB, context)\n }\n })\n return Object.assign(shapeA, merged)\n }\n\n /**\n * Obtains source map sources value from two shapes and returns the merged result\n * If neither shape has a sources node, then an empty object will be returned.\n * Result is wrapped in an array as per AMF model standard\n * @param shapeA AMF node\n * @param shapeB AMF node\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns Empty object or resulting merge, wrapped in an array\n * @private\n */\n _mergeSourceMapsSources(shapeA: any, shapeB: any, context?: Record<string, string>): (any | object)[] {\n const sourcesKey = this._getAmfKey(ns.aml.vocabularies.docSourceMaps.sources, context)\n let aSources = shapeA[sourcesKey] || {}\n if (Array.isArray(aSources)) {\n aSources = aSources[0]\n }\n let bSources = shapeB[sourcesKey] || {}\n if (Array.isArray(bSources)) {\n bSources = bSources[0]\n }\n return [Object.assign(aSources, bSources)]\n }\n\n /**\n * Expands the key property from compacted mode to full mode.\n * @param value The value to process\n * @returns The expanded value.\n */\n _expandKey(value: string, context?: Record<string, string>): string {\n let { amf } = this\n if (!value || typeof value !== 'string' || (!amf && !context)) {\n return value\n }\n if (Array.isArray(amf)) {\n ;[amf] = amf\n }\n const ctx = context || (amf && amf['@context'])\n if (!ctx) {\n return value\n }\n const [root, key] = value.split(':')\n if (!root || !key) {\n return value\n }\n const prefix = ctx[root]\n if (!prefix) {\n return value\n }\n return `${prefix}${key}`\n }\n\n /**\n * Computes a security model from a reference (library for example).\n * @param domainId Domain id of the security requirement to find.\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns Type definition or undefined if not found.\n */\n findSecurityScheme(domainId: string, context?: Record<string, string>): IAmfSecurityScheme | undefined {\n const { amf } = this\n const declares = this._computeDeclares(amf, context)\n let result\n if (declares) {\n result = declares.find((item) => item['@id'] === domainId)\n }\n if (result) {\n result = this._resolve(result)\n return result\n }\n const references = this._computeReferences(amf, context)\n if (Array.isArray(references) && references.length) {\n for (const ref of references) {\n if (this._hasType(ref, ns.aml.vocabularies.document.Module, context)) {\n result = this[computeReferenceSecurity](ref, domainId, context)\n if (result) {\n result = this._resolve(result)\n return result\n }\n }\n }\n }\n return undefined\n }\n\n /**\n * Computes a security model from a reference (library for example).\n * @param reference AMF model for a reference to extract the data from\n * @param selected Node ID to look for\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns Type definition or undefined if not found.\n */\n [computeReferenceSecurity](\n reference: IAmfDomainElement,\n selected: string,\n context?: Record<string, string>\n ): IAmfSecurityScheme | undefined {\n const declare = this._computeDeclares(reference, context)\n if (!declare) {\n return undefined\n }\n let result = declare.find((item) => {\n let declared = item\n if (Array.isArray(declared)) {\n ;[declared] = declared\n }\n return declared['@id'] === selected\n })\n if (Array.isArray(result)) {\n ;[result] = result\n }\n return this._resolve(result)\n }\n\n /**\n * Collects domain objects by a domain type.\n * @param source The element to search for declare/encoded objects.\n * @param type The domain type\n * @param context A context to use. If not set, it looks for the context of the passed model\n */\n getByType(source: IAmfDomainElement, type: string, context?: Record<string, string>): IAmfDomainElement[] {\n if (!source) {\n return []\n }\n let result: IAmfDomainElement[] = []\n const declares = this._computeDeclares(source)\n const key = this._getAmfKey(type, context)\n if (declares && declares.length) {\n declares.forEach((declared) => {\n if (this._hasType(declared, key)) {\n result.push(declared as IAmfDomainElement)\n }\n })\n }\n const references = this._computeReferences(source)\n if (Array.isArray(references) && references.length) {\n for (const ref of references) {\n if (this._hasType(ref, ns.aml.vocabularies.document.Module)) {\n const items = this.getByType(ref as IAmfDomainElement, type, context)\n if (items.length) {\n result = result.concat(items)\n }\n }\n }\n }\n return result\n }\n }\n return AmfMixin as Constructor<AmfMixinInterface> & T\n}\n"]}
|
|
1
|
+
{"version":3,"file":"AmfMixin.js","sourceRoot":"","sources":["../../../src/amf/AmfMixin.ts"],"names":[],"mappings":"AAAA,uDAAuD;AACvD,sDAAsD;AACtD;;;;;;;;;;;;EAYE;AACF,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAclD,OAAO,EAAE,YAAY,IAAI,EAAE,EAAE,MAAM,4BAA4B,CAAA;AAE/D,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,CAAC,aAAa,CAAC,CAAA;AAChD,MAAM,CAAC,MAAM,mBAAmB,GAAG,MAAM,CAAC,qBAAqB,CAAC,CAAA;AAChE,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,eAAe,CAAC,CAAA;AACpD,MAAM,CAAC,MAAM,wBAAwB,GAAG,MAAM,CAAC,0BAA0B,CAAC,CAAA;AAqe1E;;GAEG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CAA6B,UAAa,EAAsC,EAAE;IACxG,MAAM,QAAS,SAAQ,UAAU;QAC/B,IAAI,CAAe;QACnB,YAAY,CAAM;QAClB,cAAc,CAAU;QAExB,IAAI,GAAG;YACL,OAAO,IAAI,CAAC,IAAI,CAAA;QAClB,CAAC;QAED,IAAI,GAAG,CAAC,KAA+B;YACrC,IAAI,IAAI,CAAC,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,cAAc,KAAK,KAAK,EAAE,CAAC;gBACzD,OAAM;YACR,CAAC;YACD,IAAI,CAAC,cAAc,GAAG,KAAK,CAAA;YAC3B,MAAM,QAAQ,GAAG,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;YACxD,uEAAuE;YACvE,qCAAqC;YACrC,IAAI,CAAC,YAAY,GAAG,EAAE,CAAA;YACtB,IAAI,CAAC,IAAI,GAAG,QAA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;gBACH,CAAC,CAAC,CAAA;YACJ,CAAC;YACD,MAAM,UAAU,GAAG,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAA;YAClD,IAAI,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,UAAU,CAAC,MAAM,EAAE,CAAC;gBACnD,KAAK,MAAM,GAAG,IAAI,UAAU,EAAE,CAAC;oBAC7B,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,YAAY,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;wBAC5D,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,GAAwB,EAAE,IAAI,EAAE,OAAO,CAAC,CAAA;wBACrE,IAAI,KAAK,CAAC,MAAM,EAAE,CAAC;4BACjB,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;wBAC/B,CAAC;oBACH,CAAC;gBACH,CAAC;YACH,CAAC;YACD,OAAO,MAAM,CAAA;QACf,CAAC;KACF;IACD,OAAO,QAA8C,CAAA;AACvD,CAAC,CAAA","sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/no-unused-vars */\n/**\n@license\nCopyright 2018 The Advanced REST client authors <arc@mulesoft.com>\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not\nuse this file except in compliance with the License. You may obtain a copy of\nthe License at\nhttp://www.apache.org/licenses/LICENSE-2.0\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n*/\nimport { AmfModelExpander } from 'amf-json-ld-lib'\nimport {\n IAmfDocument,\n IAmfDomainElement,\n IAmfEndPoint,\n IAmfLdValue,\n IAmfSecurityScheme,\n IAmfShape,\n IAmfWebApi,\n IAmfOperation,\n IAmfAsyncApi,\n IAmfServer,\n IAmfRequest,\n} from './definitions/Amf.js'\nimport { AmfNamespace as ns } from './definitions/Namespace.js'\n\nexport const findAmfType = Symbol('findAmfType')\nexport const findReferenceObject = Symbol('findReferenceObject')\nexport const getArrayItems = Symbol('getArrayItems')\nexport const computeReferenceSecurity = Symbol('computeReferenceSecurity')\n\nexport interface ServersQueryOptions {\n /**\n * An EndPoint to look for the servers in\n */\n endpointId?: string\n /**\n * An Operation to look for the servers in\n */\n methodId?: string\n}\n\nexport interface ServerQueryOptions {\n /**\n * An EndPoint to look for the servers in. Required if Operation is provided\n */\n endpointId?: string\n /**\n * An Operation to look for the servers in\n */\n methodId?: string\n /**\n * Optional selected server id\n */\n id?: string\n}\n\ntype Constructor<T = object> = new (...args: any[]) => T\n\nexport declare class AmfMixinInterface {\n amf?: IAmfDocument\n _amf?: IAmfDocument\n /**\n * This is an abstract method to be implemented by the components.\n * If, instead, the component uses `amf` setter you must use `super.amf` to\n * set the value.\n * @param amf Current AMF model. Can be undefined.\n */\n _amfChanged(amf?: IAmfDocument): void\n\n /**\n * Expands flattened AMF model\n */\n _expand(amf: unknown): IAmfDocument\n\n /**\n * Returns compact model key for given value.\n * @param property AMF original property\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns Compact model property name or the same value if value not found in the context.\n */\n _getAmfKey(property?: string, context?: Record<string, string>): string\n\n /**\n * Ensures that the model is AMF object.\n *\n * @param amf AMF json/ld model\n * @returns The API spec\n */\n _ensureAmfModel(amf: unknown): IAmfDocument | undefined\n\n /**\n * Ensures that the value is an array.\n * It returns undefined when there's no value.\n * It returns the same array if the value is already an array.\n * It returns new array of the item is not an array.\n *\n * @param value An item to test\n */\n _ensureArray(value?: any): unknown[] | undefined\n\n /**\n * Gets a single scalar value from a model.\n * @param model Amf model to extract the value from.\n * @param untrustedKey Model key to search for the value\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns Value for key\n */\n _getValue(\n model: IAmfDomainElement,\n untrustedKey: string,\n context?: Record<string, string>\n ): string | number | boolean | undefined | null\n\n /**\n * Gets values from a model as an array of `@value` properties.\n * @param model Amf model to extract the value from.\n * @param untrustedKey Model key to search for the value\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns The value for key\n */\n _getValueArray(\n model: IAmfDomainElement,\n untrustedKey: string,\n context?: Record<string, string>\n ): (string | number | boolean | null)[] | undefined\n\n /**\n * Reads an array from the model.\n *\n * @param model Amf model to extract the value from.\n * @param untrustedKey Model key to search for the value\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns Value for the key\n */\n [getArrayItems](\n model?: IAmfDomainElement,\n untrustedKey?: string,\n context?: Record<string, string>\n ): IAmfDomainElement[] | undefined\n\n /**\n * Reads the value of the `@id` property.\n * @param model Amf model to extract the value from.\n * @param untrustedKey Model key to search for the @id\n * @param context A context to use. If not set, it looks for the context of the passed model\n */\n _getLinkValue(model: IAmfDomainElement, untrustedKey: string, context?: Record<string, string>): string | undefined\n\n /**\n * Reads the list of value for the `@id` property.\n * @param model Amf model to extract the value from.\n * @param untrustedKey Model key to search for the @id\n * @param context A context to use. If not set, it looks for the context of the passed model\n */\n _getLinkValues(model: IAmfDomainElement, untrustedKey: string, context?: Record<string, string>): string[] | undefined\n\n /**\n * Checks if a model has a type.\n * @param model Model to test\n * @param type Type name\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns True if model has a type.\n */\n _hasType(model?: IAmfDomainElement, type?: string, context?: Record<string, string>): boolean\n\n /**\n * Checks if a shape has a property.\n * @param shape The shape to test\n * @param untrustedKey Property name to test\n * @param context A context to use. If not set, it looks for the context of the passed model\n */\n _hasProperty(shape: IAmfDomainElement, untrustedKey: string, context?: Record<string, string>): boolean\n\n /**\n * Computes array value of a property in a model (shape).\n *\n * @param shape AMF shape object\n * @param untrustedKey Property name\n * @param context A context to use. If not set, it looks for the context of the passed model\n */\n _computePropertyArray(\n shape?: IAmfDomainElement,\n untrustedKey?: string,\n context?: Record<string, string>\n ): (string | number | boolean | null | object)[] | undefined\n\n /**\n * Computes API version from the AMF model.\n *\n * @param amf\n * @param context A context to use. If not set, it looks for the context of the passed model\n */\n _computeApiVersion(amf?: IAmfDocument, context?: Record<string, string>): string | undefined\n\n /**\n * Computes model's `encodes` property.\n *\n * @param model AMF data model\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns List of encodes\n */\n _computeEncodes(model?: IAmfDocument, context?: Record<string, string>): IAmfDomainElement | undefined\n\n /**\n * Computes list of declarations in the AMF api model.\n *\n * @param model AMF json/ld model for an API\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns List of declarations\n */\n _computeDeclares(model?: IAmfDocument, context?: Record<string, string>): IAmfDomainElement[] | undefined\n\n /**\n * Computes list of references in the AMF api model.\n *\n * @param model AMF json/ld model for an API\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns List of declarations\n */\n _computeReferences(model?: IAmfDocument, context?: Record<string, string>): IAmfDomainElement[] | undefined\n\n /**\n * Computes AMF's `http://schema.org/WebAPI` model\n *\n * @param model AMF json/ld model for an API\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns Web API declaration.\n */\n _computeWebApi(model?: IAmfDocument, context?: Record<string, string>): IAmfWebApi | undefined\n\n /**\n * Computes AMF's `http://schema.org/API` model\n *\n * @param model AMF json/ld model for an API\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns API declaration.\n */\n _computeApi(model?: IAmfDocument, context?: Record<string, string>): IAmfAsyncApi | IAmfWebApi | undefined\n\n /**\n * Returns whether an AMF node is a WebAPI node\n *\n * @param model AMF json/ld model for an API\n * @param context A context to use. If not set, it looks for the context of the passed model\n */\n _isWebAPI(model?: IAmfDocument, context?: Record<string, string>): boolean\n\n /**\n * Returns whether an AMF node is an AsyncAPI node\n *\n * @param model AMF json/ld model for an API\n * @param context A context to use. If not set, it looks for the context of the passed model\n */\n _isAsyncAPI(model?: IAmfDocument, context?: Record<string, string>): boolean\n\n /**\n * Returns whether an AMF node is an API node\n *\n * @param model AMF json/ld model for an API\n * @param context A context to use. If not set, it looks for the context of the passed model\n */\n _isAPI(model?: IAmfDocument, context?: Record<string, string>): boolean\n\n /**\n * Determines whether a partial model is valid for reading servers from\n * Current valid values:\n * - Operation\n * - Endpoint\n * @param model The partial model to evaluate\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns Whether the model's type is part of the array of valid node types from which\n * to read servers\n * @private\n */\n _isValidServerPartial(model: IAmfDomainElement | IAmfDomainElement[], context?: Record<string, string>): boolean\n\n /**\n * @param options Server query options\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns List of servers for method, if defined, or endpoint, if defined, or root level\n */\n _getServers(options?: ServersQueryOptions, context?: Record<string, string>): IAmfServer[] | undefined\n\n /**\n * Computes value for the `expects` property.\n *\n * @param method AMF `supportedOperation` model\n * @param context A context to use. If not set, it looks for the context of the passed model\n */\n _computeExpects(method?: IAmfOperation, context?: Record<string, string>): IAmfRequest | undefined\n\n /**\n * Computes list of endpoints from a WebApi model.\n * @param webApi\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns An array of endpoints.\n */\n _computeEndpoints(webApi?: IAmfWebApi, context?: Record<string, string>): IAmfEndPoint[] | undefined\n /**\n * Computes model for an endpoint documentation.\n *\n * @param webApi Current value of `webApi` property\n * @param id Selected shape ID\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns An endpoint definition\n */\n _computeEndpointModel(webApi?: IAmfWebApi, id?: string, context?: Record<string, string>): IAmfEndPoint | undefined\n\n /**\n * Computes method for the method documentation.\n *\n * @param webApi Current value of `webApi` property\n * @param selected Selected shape\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns A method definition\n */\n _computeMethodModel(\n webApi?: IAmfWebApi,\n selected?: string,\n context?: Record<string, string>\n ): IAmfOperation | undefined\n\n /**\n * Computes an endpoint for a method.\n * @param webApi The WebApi AMF model\n * @param methodId Method id\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns An endpoint model of undefined.\n */\n _computeMethodEndpoint(\n webApi?: IAmfWebApi,\n methodId?: string,\n context?: Record<string, string>\n ): IAmfEndPoint | undefined\n\n /**\n * Computes a list of methods for an endpoint that contains a method with\n * given id.\n *\n * @param webApi WebApi model\n * @param methodId Method id.\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns A list of sibling methods or undefined.\n */\n __computeMethodsListForMethod(\n webApi?: IAmfWebApi,\n methodId?: string,\n context?: Record<string, string>\n ): IAmfOperation[] | undefined\n\n /**\n * Computes a type documentation model.\n *\n * @param declares Current value of `declares` property\n * @param references Current value of `references` property\n * @param selected Selected shape\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns A type definition\n */\n _computeType(\n declares?: IAmfDomainElement[],\n references?: IAmfDomainElement[],\n selected?: string,\n context?: Record<string, string>\n ): IAmfShape | undefined\n\n /**\n * Finds a type in the model declares and references.\n * @param domainId The domain id of the type (AMF's shape).\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns The AMF shape or undefined when not found.\n */\n [findAmfType](domainId?: string, context?: Record<string, string>): IAmfShape | undefined\n\n /**\n * Searches for an object in model's references list.\n * It does not resolve the object (useful for handling links correctly).\n *\n * @param domainId The domain of the object to find in the references.\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns The domain object or undefined.\n */\n [findReferenceObject](domainId: string, context?: Record<string, string>): IAmfDomainElement | undefined\n\n /**\n * Computes a type model from a reference (library for example).\n * @param reference AMF model for a reference to extract the data from\n * @param selected Node ID to look for\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns Type definition or undefined if not found.\n */\n _computeReferenceType(\n reference?: IAmfDomainElement,\n selected?: string,\n context?: Record<string, string>\n ): IAmfShape | undefined\n\n /**\n * Computes a documentation model.\n *\n * @param webApi Current value of `webApi` property\n * @param selected Selected shape\n * @param context A context to use. If not set, it looks for the context of the passed model\n */\n _computeDocument(\n webApi?: IAmfDomainElement,\n selected?: string,\n context?: Record<string, string>\n ): IAmfDomainElement | undefined\n\n /**\n * Resolves a reference to an external fragment.\n *\n * @param shape A shape to resolve\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns Resolved shape.\n */\n _resolve(shape: any, context?: Record<string, string>): any\n\n /**\n * @param amf References object to search in\n * @param id Id of the shape to resolve\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns Resolved shape for given reference, undefined otherwise\n */\n _getLinkTarget(amf?: IAmfDocument, id?: string, context?: Record<string, string>): IAmfDomainElement | undefined\n\n /**\n * Resolves the shape of a given reference.\n *\n * @param references References object to search in\n * @param id Id of the shape to resolve\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns Resolved shape for given reference, undefined otherwise\n */\n _obtainShapeFromReferences(\n references?: IAmfDomainElement[],\n id?: string,\n context?: Record<string, string>\n ): IAmfDomainElement | undefined\n\n /**\n * Searches a node with a given ID in an array\n *\n * @param array Array to search for a given ID\n * @param id Id to search for\n * @returns Node with the given ID when found, undefined otherwise\n */\n _findById(array?: IAmfDomainElement[], id?: string): IAmfDomainElement | undefined\n\n _getReferenceId(amf?: IAmfDocument, id?: string, context?: Record<string, string>): IAmfDomainElement | undefined\n\n _resolveRecursive(shape: any, context?: Record<string, string>): void\n\n /**\n * Merge two shapes together. If the resulting shape has one of the \"special merge\" keys,\n * then the special merge function for that key will be used to match that property\n * @param shapeA AMF node\n * @param shapeB AMF node\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns Merged AMF node\n */\n _mergeShapes(shapeA: any, shapeB: any, context?: Record<string, string>): any\n\n /**\n * Obtains source map sources value from two shapes and returns the merged result\n * If neither shape has a sources node, then an empty object will be returned.\n * Result is wrapped in an array as per AMF model standard\n * @param shapeA AMF node\n * @param shapeB AMF node\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns Empty object or resulting merge, wrapped in an array\n * @private\n */\n _mergeSourceMapsSources(shapeA: any, shapeB: any, context?: Record<string, string>): (any | object)[]\n\n /**\n * Expands the key property from compacted mode to full mode.\n * @param value The value to process\n * @returns The expanded value.\n */\n _expandKey(value: string, context?: Record<string, string>): string\n\n /**\n * Computes a security model from a reference (library for example).\n * @param domainId Domain id of the security requirement to find.\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns Type definition or undefined if not found.\n */\n findSecurityScheme(domainId: string, context?: Record<string, string>): IAmfSecurityScheme | undefined\n\n /**\n * Computes a security model from a reference (library for example).\n * @param reference AMF model for a reference to extract the data from\n * @param selected Node ID to look for\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns Type definition or undefined if not found.\n */\n [computeReferenceSecurity](\n reference: IAmfDomainElement,\n selected: string,\n context?: Record<string, string>\n ): IAmfSecurityScheme | undefined\n\n /**\n * Collects domain objects by a domain type.\n * @param source The element to search for declare/encoded objects.\n * @param type The domain type\n * @param context A context to use. If not set, it looks for the context of the passed model\n */\n getByType(source: IAmfDomainElement, type: string, context?: Record<string, string>): IAmfDomainElement[]\n}\n\n/**\n * Common functions used by AMF components to compute AMF values.\n */\nexport const AmfMixin = <T extends Constructor<any>>(superClass: T): Constructor<AmfMixinInterface> & T => {\n class AmfMixin extends superClass {\n _amf?: IAmfDocument\n __cachedKeys?: any\n __lastSetValue?: unknown\n\n get amf(): IAmfDocument | undefined {\n return this._amf\n }\n\n set amf(value: IAmfDocument | undefined) {\n if (this._amf === value || this.__lastSetValue === value) {\n return\n }\n this.__lastSetValue = value\n const expanded = value ? this._expand(value) : undefined\n // Cached keys cannot be static as this element can be used in the sane\n // document with different AMF models\n this.__cachedKeys = {}\n this._amf = expanded\n this._amfChanged(expanded)\n }\n\n /**\n * This is an abstract method to be implemented by the components.\n * If, instead, the component uses `amf` setter you must use `super.amf` to\n * set the value.\n * @param amf Current AMF model. Can be undefined.\n */\n _amfChanged(amf?: IAmfDocument): void {\n // ...\n }\n\n /**\n * Expands flattened AMF model\n */\n _expand(amf: any): IAmfDocument {\n return AmfModelExpander.expand(amf) as IAmfDocument\n }\n\n /**\n * Returns compact model key for given value.\n * @param property AMF original property\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns Compact model property name or the same value if value not found in the context.\n */\n _getAmfKey(property?: string, context?: Record<string, string>): string {\n if (!property) {\n return ''\n }\n let { amf } = this\n if (!amf && !context) {\n return property\n }\n if (Array.isArray(amf)) {\n ;[amf] = amf\n }\n if (!this.__cachedKeys) {\n this.__cachedKeys = {}\n }\n const ctx = (context || (amf && amf['@context'])) as Record<string, string> | undefined\n if (!ctx || !property) {\n return property\n }\n const cache = this.__cachedKeys\n if (property in cache) {\n return cache[property]\n }\n property = String(property)\n const hashIndex = property.indexOf('#')\n const hashProperty = property.substring(0, hashIndex + 1)\n const keys = Object.keys(ctx)\n for (let i = 0, len = keys.length; i < len; i++) {\n const k = keys[i]\n if (ctx[k] === property) {\n cache[property] = k\n return k\n }\n if (hashIndex === -1 && property.indexOf(ctx[k]) === 0) {\n const result = property.replace(ctx[k], `${k}:`)\n cache[property] = result\n return result\n }\n if (ctx[k] === hashProperty) {\n const result = `${k}:${property.substring(hashIndex + 1)}`\n cache[property] = result\n return result\n }\n }\n return property\n }\n\n /**\n * Ensures that the model is AMF object.\n *\n * @param amf AMF json/ld model\n * @returns The API spec\n */\n _ensureAmfModel(amf: any): IAmfDocument | undefined {\n if (!amf) {\n return undefined\n }\n if (Array.isArray(amf)) {\n ;[amf] = amf\n }\n if (this._hasType(amf, ns.aml.vocabularies.document.Document)) {\n return amf\n }\n return undefined\n }\n\n /**\n * Ensures that the value is an array.\n * It returns undefined when there's no value.\n * It returns the same array if the value is already an array.\n * It returns new array of the item is not an array.\n *\n * @param value An item to test\n */\n _ensureArray(value?: any): unknown[] | undefined {\n if (!value) {\n return undefined\n }\n if (value instanceof Array) {\n return value\n }\n return [value]\n }\n\n /**\n * Gets a single scalar value from a model.\n * @param model Amf model to extract the value from.\n * @param untrustedKey Model key to search for the value\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns Value for key\n */\n _getValue(\n model: IAmfDomainElement,\n untrustedKey: string,\n context?: Record<string, string>\n ): string | number | boolean | undefined | null {\n const key = this._getAmfKey(untrustedKey, context)\n if (!key) {\n return undefined\n }\n let data = model && (model[key as keyof IAmfDomainElement] as string | number | boolean | undefined | null)\n if (!data) {\n // This includes \"undefined\", \"false\", \"null\" and \"0\"\n return data\n }\n if (Array.isArray(data)) {\n ;[data] = data\n }\n if (!data) {\n return undefined\n }\n const type = typeof data\n if (['string', 'number', 'boolean', 'undefined'].includes(type)) {\n return data\n }\n return (data as unknown as IAmfLdValue<any>)['@value']\n }\n\n /**\n * Gets values from a model as an array of `@value` properties.\n * @param model Amf model to extract the value from.\n * @param untrustedKey Model key to search for the value\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns The value for key\n */\n _getValueArray(\n model: IAmfDomainElement,\n untrustedKey: string,\n context?: Record<string, string>\n ): (string | number | boolean | null)[] | undefined {\n const key = this._getAmfKey(untrustedKey, context)\n if (!key) {\n return undefined\n }\n const data = model && (this._ensureArray((model as any)[key]) as any[])\n if (!Array.isArray(data)) {\n return undefined\n }\n return data.map((item) => item['@value'] || item)\n }\n\n /**\n * Reads an array from the model.\n *\n * @param model Amf model to extract the value from.\n * @param untrustedKey Model key to search for the value\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns Value for the key\n */\n [getArrayItems](\n model?: IAmfDomainElement,\n untrustedKey?: string,\n context?: Record<string, string>\n ): IAmfDomainElement[] | undefined {\n const k = this._getAmfKey(untrustedKey, context)\n if (!k) {\n return undefined\n }\n const data = model && (this._ensureArray((model as any)[k]) as IAmfDomainElement[])\n if (!Array.isArray(data)) {\n return undefined\n }\n return data\n }\n\n /**\n * Reads the value of the `@id` property.\n * @param model Amf model to extract the value from.\n * @param untrustedKey Model key to search for the @id\n * @param context A context to use. If not set, it looks for the context of the passed model\n */\n _getLinkValue(\n model: IAmfDomainElement,\n untrustedKey: string,\n context?: Record<string, string>\n ): string | undefined {\n const k = this._getAmfKey(untrustedKey, context)\n if (!k) {\n return undefined\n }\n let data = model && (model as any)[k]\n if (!data) {\n return undefined\n }\n if (Array.isArray(data)) {\n ;[data] = data\n }\n if (!data) {\n return undefined\n }\n return data['@id']\n }\n\n /**\n * Reads the list of value for the `@id` property.\n * @param model Amf model to extract the value from.\n * @param untrustedKey Model key to search for the @id\n * @param context A context to use. If not set, it looks for the context of the passed model\n */\n _getLinkValues(\n model: IAmfDomainElement,\n untrustedKey: string,\n context?: Record<string, string>\n ): string[] | undefined {\n const k = this._getAmfKey(untrustedKey, context)\n if (!k) {\n return undefined\n }\n let data = (model && (model as any)[k]) as IAmfDomainElement[] | undefined\n if (!data) {\n return undefined\n }\n if (!Array.isArray(data)) {\n data = [data]\n }\n return data.map((i) => i['@id'])\n }\n\n /**\n * Checks if a model has a type.\n * @param model Model to test\n * @param type Type name\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns True if model has a type.\n */\n _hasType(model?: IAmfDomainElement, type?: string, context?: Record<string, string>): boolean {\n const types = this._ensureArray(model && model['@type'])\n if (!types || !types.length) {\n return false\n }\n const key = this._getAmfKey(type, context)\n for (const type of types) {\n if (type === key) {\n return true\n }\n }\n return false\n }\n\n /**\n * Checks if a shape has a property.\n * @param shape The shape to test\n * @param untrustedKey Property name to test\n * @param context A context to use. If not set, it looks for the context of the passed model\n */\n _hasProperty(shape: IAmfDomainElement, untrustedKey: string, context?: Record<string, string>): boolean {\n const key = this._getAmfKey(untrustedKey, context) as string\n return !!(shape && key && key in shape)\n }\n\n /**\n * Computes array value of a property in a model (shape).\n *\n * @param shape AMF shape object\n * @param untrustedKey Property name\n * @param context A context to use. If not set, it looks for the context of the passed model\n */\n _computePropertyArray(\n shape?: IAmfDomainElement,\n untrustedKey?: string,\n context?: Record<string, string>\n ): (string | number | boolean | null | object)[] | undefined {\n if (!shape) {\n return undefined\n }\n const key = this._getAmfKey(untrustedKey, context)\n if (!key) {\n return undefined\n }\n const data = this._ensureArray(shape && (shape as any)[key])\n if (!data || !Array.isArray(data)) {\n return undefined\n }\n return data as (string | number | boolean | null | object)[]\n }\n\n /**\n * Computes API version from the AMF model.\n *\n * @param amf\n * @param context A context to use. If not set, it looks for the context of the passed model\n */\n _computeApiVersion(amf?: IAmfDocument, context?: Record<string, string>): string | undefined {\n const api = this._computeApi(amf)\n if (!api) {\n return undefined\n }\n return this._getValue(api, ns.aml.vocabularies.core.version, context) as string\n }\n\n /**\n * Computes model's `encodes` property.\n *\n * @param model AMF data model\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns List of encodes\n */\n _computeEncodes(model?: IAmfDocument, context?: Record<string, string>): IAmfDomainElement | undefined {\n if (!model) {\n return undefined\n }\n if (Array.isArray(model)) {\n ;[model] = model\n }\n const key = this._getAmfKey(ns.aml.vocabularies.document.encodes, context)\n if (!key) {\n return undefined\n }\n const data = (model as any)[key]\n if (data) {\n return Array.isArray(data) ? data[0] : data\n }\n return undefined\n }\n\n /**\n * Computes list of declarations in the AMF api model.\n *\n * @param model AMF json/ld model for an API\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns List of declarations\n */\n _computeDeclares(model?: IAmfDocument, context?: Record<string, string>): IAmfDomainElement[] | undefined {\n if (!model) {\n return undefined\n }\n if (Array.isArray(model)) {\n ;[model] = model\n }\n if (!model) {\n return undefined\n }\n const key = this._getAmfKey(ns.aml.vocabularies.document.declares, context)\n if (!key) {\n return undefined\n }\n const data = this._ensureArray((model as any)[key]) as IAmfDomainElement[]\n return Array.isArray(data) ? data : undefined\n }\n\n /**\n * Computes list of references in the AMF api model.\n *\n * @param model AMF json/ld model for an API\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns List of declarations\n */\n _computeReferences(model?: IAmfDocument, context?: Record<string, string>): IAmfDomainElement[] | undefined {\n if (!model) {\n return undefined\n }\n if (Array.isArray(model)) {\n ;[model] = model\n }\n if (!model) {\n return undefined\n }\n const key = this._getAmfKey(ns.aml.vocabularies.document.references, context)\n if (!key) {\n return undefined\n }\n const data = this._ensureArray((model as any)[key]) as IAmfDomainElement[]\n return data instanceof Array ? data : undefined\n }\n\n /**\n * Computes AMF's `http://schema.org/WebAPI` model\n *\n * @param model AMF json/ld model for an API\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns Web API declaration.\n */\n _computeWebApi(model?: IAmfDocument, context?: Record<string, string>): IAmfWebApi | undefined {\n const enc = this._computeEncodes(model, context)\n if (!enc) {\n return undefined\n }\n if (this._hasType(enc, ns.aml.vocabularies.apiContract.WebAPI, context)) {\n return enc\n }\n return undefined\n }\n\n /**\n * Computes AMF's `http://schema.org/API` model\n *\n * @param model AMF json/ld model for an API\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns API declaration.\n */\n _computeApi(model?: IAmfDocument, context?: Record<string, string>): IAmfAsyncApi | IAmfWebApi | undefined {\n const enc = this._computeEncodes(model, context)\n if (!enc) {\n return undefined\n }\n if (this._isAPI(model, context) || this._isWebAPI(model, context) || this._isAsyncAPI(model, context)) {\n return enc\n }\n return undefined\n }\n\n /**\n * Returns whether an AMF node is a WebAPI node\n *\n * @param model AMF json/ld model for an API\n * @param context A context to use. If not set, it looks for the context of the passed model\n */\n _isWebAPI(model?: IAmfDocument, context?: Record<string, string>): boolean {\n const enc = this._computeEncodes(model, context)\n if (!enc) {\n return false\n }\n return this._hasType(enc, ns.aml.vocabularies.apiContract.WebAPI, context)\n }\n\n /**\n * Returns whether an AMF node is an AsyncAPI node\n *\n * @param model AMF json/ld model for an API\n * @param context A context to use. If not set, it looks for the context of the passed model\n */\n _isAsyncAPI(model?: IAmfDocument, context?: Record<string, string>): boolean {\n const enc = this._computeEncodes(model, context)\n if (!enc) {\n return false\n }\n return this._hasType(enc, ns.aml.vocabularies.apiContract.AsyncAPI, context)\n }\n\n /**\n * Returns whether an AMF node is an API node\n *\n * @param model AMF json/ld model for an API\n * @param context A context to use. If not set, it looks for the context of the passed model\n */\n _isAPI(model?: IAmfDocument, context?: Record<string, string>): boolean {\n const enc = this._computeEncodes(model, context)\n if (!enc) {\n return false\n }\n return this._hasType(enc, ns.aml.vocabularies.apiContract.API, context)\n }\n\n /**\n * Determines whether a partial model is valid for reading servers from\n * Current valid values:\n * - Operation\n * - Endpoint\n * @param model The partial model to evaluate\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns Whether the model's type is part of the array of valid node types from which\n * to read servers\n * @private\n */\n _isValidServerPartial(model: IAmfDomainElement | IAmfDomainElement[], context?: Record<string, string>): boolean {\n if (Array.isArray(model)) {\n ;[model] = model\n }\n if (!model) {\n return false\n }\n const oKey = ns.aml.vocabularies.apiContract.Operation\n const eKey = ns.aml.vocabularies.apiContract.EndPoint\n const allowedPartialModelTypes = [this._getAmfKey(oKey, context), this._getAmfKey(eKey, context)]\n const types = model['@type']\n for (const type of types) {\n if (allowedPartialModelTypes.indexOf(type) !== -1) {\n return true\n }\n }\n return false\n }\n\n /**\n * @param options Server query options\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns List of servers for method, if defined, or endpoint, if defined, or root level\n */\n _getServers(options: ServersQueryOptions = {}, context?: Record<string, string>): IAmfServer[] | undefined {\n const { endpointId, methodId } = options\n const { amf } = this\n if (!amf) {\n return undefined\n }\n let api = this._computeApi(amf, context)\n if (Array.isArray(api)) {\n ;[api] = api\n }\n if (!api) {\n if (this._isValidServerPartial(amf, context)) {\n api = amf\n } else {\n return undefined\n }\n }\n\n const serverKey = this._getAmfKey(ns.aml.vocabularies.apiContract.server, context)\n\n const getRootServers = (): IAmfServer[] | undefined =>\n this[getArrayItems](api, serverKey, context) as IAmfServer[]\n const getEndpointServers = (): IAmfServer[] | undefined => {\n const endpoint = this._computeEndpointModel(api, endpointId, context)\n const servers = this[getArrayItems](endpoint, serverKey, context) as IAmfServer[]\n if (servers) {\n return servers\n }\n return getRootServers()\n }\n const getMethodServers = (): IAmfServer[] | undefined => {\n const method = this._computeMethodModel(api, methodId, context)\n const servers = this[getArrayItems](method, serverKey, context) as IAmfServer[]\n if (servers) {\n return servers\n }\n return getEndpointServers()\n }\n\n if (methodId) {\n return getMethodServers()\n }\n if (endpointId) {\n return getEndpointServers()\n }\n return getRootServers()\n }\n\n /**\n * Computes value for the `expects` property.\n *\n * @param method AMF `supportedOperation` model\n * @param context A context to use. If not set, it looks for the context of the passed model\n */\n _computeExpects(method?: IAmfOperation, context?: Record<string, string>): IAmfRequest | undefined {\n const operationKey = ns.aml.vocabularies.apiContract.Operation\n const expectsKey = ns.aml.vocabularies.apiContract.expects\n if (this._hasType(method, operationKey, context)) {\n const key = this._getAmfKey(expectsKey, context) as string\n const expects = this._ensureArray((method as any)[key])\n if (expects) {\n return Array.isArray(expects) ? (expects[0] as IAmfRequest) : (expects as IAmfRequest)\n }\n }\n return undefined\n }\n\n /**\n * Computes list of endpoints from a WebApi model.\n * @param webApi\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns An array of endpoints.\n */\n _computeEndpoints(webApi?: IAmfWebApi, context?: Record<string, string>): IAmfEndPoint[] | undefined {\n if (!webApi) {\n return []\n }\n const endpointKey = ns.aml.vocabularies.apiContract.endpoint\n const key = this._getAmfKey(endpointKey, context) as string\n return this._ensureArray((webApi as any)[key]) as IAmfEndPoint[]\n }\n\n /**\n * Computes model for an endpoint documentation.\n *\n * @param webApi Current value of `webApi` property\n * @param id Selected shape ID\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns An endpoint definition\n */\n _computeEndpointModel(\n webApi?: IAmfWebApi,\n id?: string,\n context?: Record<string, string>\n ): IAmfEndPoint | undefined {\n if (this._hasType(webApi, ns.aml.vocabularies.apiContract.EndPoint, context)) {\n return webApi\n }\n const endpoints = this._computeEndpoints(webApi, context)\n if (!endpoints) {\n return undefined\n }\n return endpoints.find((item) => item['@id'] === id)\n }\n\n /**\n * Computes method for the method documentation.\n *\n * @param webApi Current value of `webApi` property\n * @param selected Selected shape\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns A method definition\n */\n _computeMethodModel(\n webApi?: IAmfWebApi,\n selected?: string,\n context?: Record<string, string>\n ): IAmfOperation | undefined {\n const methods = this.__computeMethodsListForMethod(webApi, selected, context)\n if (!methods) {\n return undefined\n }\n return methods.find((item) => item['@id'] === selected)\n }\n\n /**\n * Computes an endpoint for a method.\n * @param webApi The WebApi AMF model\n * @param methodId Method id\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns An endpoint model of undefined.\n */\n _computeMethodEndpoint(\n webApi?: IAmfWebApi,\n methodId?: string,\n context?: Record<string, string>\n ): IAmfEndPoint | undefined {\n if (!webApi || !methodId) {\n return undefined\n }\n if (this._hasType(webApi, ns.aml.vocabularies.apiContract.EndPoint, context)) {\n return webApi\n }\n const endpoints = this._computeEndpoints(webApi, context)\n if (!endpoints) {\n return undefined\n }\n const opKey = this._getAmfKey(ns.aml.vocabularies.apiContract.supportedOperation, context)\n for (let i = 0, len = endpoints.length; i < len; i++) {\n const endpoint = endpoints[i]\n let methods = (endpoint as any)[opKey] as IAmfOperation[]\n if (!methods) {\n continue\n }\n if (!Array.isArray(methods)) {\n methods = [methods]\n }\n for (let j = 0, jLen = methods.length; j < jLen; j++) {\n if (methods[j]['@id'] === methodId) {\n return endpoint\n }\n }\n }\n return undefined\n }\n\n /**\n * Computes a list of methods for an endpoint that contains a method with\n * given id.\n *\n * @param webApi WebApi model\n * @param methodId Method id.\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns A list of sibling methods or undefined.\n */\n __computeMethodsListForMethod(\n webApi?: IAmfWebApi,\n methodId?: string,\n context?: Record<string, string>\n ): IAmfOperation[] | undefined {\n const endpoint = this._computeMethodEndpoint(webApi, methodId, context)\n if (!endpoint) {\n return undefined\n }\n const opKey = this._getAmfKey(ns.aml.vocabularies.apiContract.supportedOperation, context)\n return this._ensureArray((endpoint as any)[opKey]) as IAmfOperation[] | undefined\n }\n\n /**\n * Computes a type documentation model.\n *\n * @param declares Current value of `declares` property\n * @param references Current value of `references` property\n * @param selected Selected shape\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns A type definition\n */\n _computeType(\n declares?: IAmfDomainElement[],\n references?: IAmfDomainElement[],\n selected?: string,\n context?: Record<string, string>\n ): IAmfShape | undefined {\n if ((!declares && !references) || !selected) {\n return undefined\n }\n // In compact model some IDs are presented in long version (in source maps for examples)\n // This must test for this case as well.\n const compactId = selected.replace('amf://id', '')\n let type = declares && declares.find((item) => item['@id'] === selected || item['@id'] === compactId)\n if (!type && references && references.length) {\n for (let i = 0, len = references.length; i < len; i++) {\n if (!this._hasType(references[i], ns.aml.vocabularies.document.Module)) {\n continue\n }\n type = this._computeReferenceType(references[i], selected, context)\n if (type) {\n break\n }\n }\n }\n return type\n }\n\n /**\n * Finds a type in the model declares and references.\n * @param domainId The domain id of the type (AMF's shape).\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns The AMF shape or undefined when not found.\n */\n [findAmfType](domainId?: string, context?: Record<string, string>): IAmfShape | undefined {\n let { amf } = this\n if (!amf || !domainId) {\n return undefined\n }\n if (Array.isArray(amf)) {\n ;[amf] = amf\n }\n const declares = this._computeDeclares(amf, context)\n const compactId = domainId.replace('amf://id', '')\n if (Array.isArray(declares)) {\n const result = declares.find((item) => item['@id'] === domainId || item['@id'] === compactId)\n if (result) {\n return result\n }\n }\n return this[findReferenceObject](domainId)\n }\n\n /**\n * Searches for an object in model's references list.\n * It does not resolve the object (useful for handling links correctly).\n *\n * @param domainId The domain of the object to find in the references.\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns The domain object or undefined.\n */\n [findReferenceObject](domainId: string, context?: Record<string, string>): IAmfDomainElement | undefined {\n let { amf } = this\n if (Array.isArray(amf)) {\n ;[amf] = amf\n }\n if (!amf) {\n return undefined\n }\n const references = this._computeReferences(amf, context)\n if (!Array.isArray(references) || !references.length) {\n return undefined\n }\n const compactId = domainId.replace('amf://id', '')\n for (let i = 0, len = references.length; i < len; i++) {\n const ref = /** @type IAmfDocument */ references[i]\n const declares = this._computeDeclares(ref, context)\n if (!Array.isArray(declares)) {\n continue\n }\n for (let j = 0, lenDecl = declares.length; j < lenDecl; j++) {\n let declared = declares[j]\n if (Array.isArray(declared)) {\n ;[declared] = declared\n }\n if (declared['@id'] === domainId || declared['@id'] === compactId) {\n return declared\n }\n }\n }\n return undefined\n }\n\n /**\n * Computes a type model from a reference (library for example).\n * @param reference AMF model for a reference to extract the data from\n * @param selected Node ID to look for\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns Type definition or undefined if not found.\n */\n _computeReferenceType(\n reference?: IAmfDomainElement,\n selected?: string,\n context?: Record<string, string>\n ): IAmfShape | undefined {\n const declare = this._computeDeclares(reference, context)\n if (!declare || !selected) {\n return undefined\n }\n // In compact model some IDs are presented in long version (in source maps for examples)\n // This must test for this case as well.\n const compactId = selected.replace('amf://id', '')\n let result = declare.find((item) => {\n if (Array.isArray(item)) {\n ;[item] = item\n }\n return item['@id'] === selected || item['@id'] === compactId\n })\n if (Array.isArray(result)) {\n ;[result] = result\n }\n return this._resolve(result)\n }\n\n /**\n * Computes a documentation model.\n *\n * @param webApi Current value of `webApi` property\n * @param selected Selected shape\n * @param context A context to use. If not set, it looks for the context of the passed model\n */\n _computeDocument(\n webApi?: IAmfDomainElement,\n selected?: string,\n context?: Record<string, string>\n ): IAmfDomainElement | undefined {\n if (!webApi || !selected) {\n return undefined\n }\n const key = this._getAmfKey(ns.aml.vocabularies.core.documentation, context)\n const docs = this._ensureArray((webApi as any)[key]) as IAmfDomainElement[]\n return docs && docs.find((item) => ((item as any)['@id'] as string) === selected)\n }\n\n /**\n * Resolves a reference to an external fragment.\n *\n * @param shape A shape to resolve\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns Resolved shape.\n */\n _resolve(shape: any, context?: Record<string, string>): any {\n const { amf } = this\n if (typeof shape !== 'object' || Array.isArray(shape) || !amf || shape.__apicResolved) {\n return shape\n }\n let refKey = this._getAmfKey(ns.aml.vocabularies.document.linkTarget, context)\n let refValue = this._ensureArray(shape[refKey]) as IAmfDomainElement[]\n let refData\n if (refValue) {\n const rk = refValue[0]['@id']\n if (rk === shape['@id']) {\n // recursive shape.\n shape.__apicResolved = true\n return shape\n }\n refData = this._getLinkTarget(amf, rk, context)\n } else {\n refKey = this._getAmfKey(ns.aml.vocabularies.document.referenceId, context)\n refValue = this._ensureArray(shape[refKey]) as IAmfDomainElement[]\n if (refValue) {\n const rk = refValue[0]['@id']\n if (rk === shape['@id']) {\n // recursive shape.\n shape.__apicResolved = true\n return shape\n }\n refData = this._getReferenceId(amf, rk, context)\n }\n }\n if (!refData) {\n this._resolveRecursive(shape)\n shape.__apicResolved = true\n return shape\n }\n const copy = { ...refData } as any\n delete copy['@id']\n const types = copy['@type']\n if (types) {\n if (shape['@type']) {\n shape['@type'] = shape['@type'].concat(types)\n } else {\n shape['@type'] = types\n }\n delete copy['@type']\n }\n this._mergeShapes(shape, copy, context)\n shape.__apicResolved = true\n this._resolveRecursive(shape)\n return shape\n }\n\n /**\n * @param amf References object to search in\n * @param id Id of the shape to resolve\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns Resolved shape for given reference, undefined otherwise\n */\n _getLinkTarget(amf?: IAmfDocument, id?: string, context?: Record<string, string>): IAmfDomainElement | undefined {\n if (!amf || !id) {\n return undefined\n }\n let target\n const declares = this._computeDeclares(amf, context)\n if (declares) {\n target = this._findById(declares, id)\n }\n if (!target) {\n const references = this._computeReferences(amf, context)\n target = this._obtainShapeFromReferences(references, id, context)\n }\n if (!target) {\n return undefined\n }\n // Declaration may contain references\n target = this._resolve(target)\n return target\n }\n\n /**\n * Resolves the shape of a given reference.\n *\n * @param references References object to search in\n * @param id Id of the shape to resolve\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns Resolved shape for given reference, undefined otherwise\n */\n _obtainShapeFromReferences(\n references?: IAmfDomainElement[],\n id?: string,\n context?: Record<string, string>\n ): IAmfDomainElement | undefined {\n if (!Array.isArray(references) || !references.length) {\n return undefined\n }\n let target\n for (const _ref of references) {\n // case of fragment that encodes the shape\n const encoded = this._computeEncodes(_ref, context)\n if (encoded && encoded['@id'] === id) {\n target = encoded\n break\n }\n // case of a library which declares types\n if (!encoded) {\n target = this._findById(this._computeDeclares(_ref, context), id)\n if (target) break\n }\n }\n return target\n }\n\n /**\n * Searches a node with a given ID in an array\n *\n * @param array Array to search for a given ID\n * @param id Id to search for\n * @returns Node with the given ID when found, undefined otherwise\n */\n _findById(array?: IAmfDomainElement[], id?: string): IAmfDomainElement | undefined {\n if (!array) return undefined\n let target\n for (const _current of array) {\n if (_current && _current['@id'] === id) {\n target = _current\n break\n }\n }\n return target\n }\n\n _getReferenceId(amf?: IAmfDocument, id?: string, context?: Record<string, string>): IAmfDomainElement | undefined {\n if (!amf || !id) {\n return undefined\n }\n const refs = this._computeReferences(amf, context)\n if (!refs) {\n return undefined\n }\n for (const _ref of refs) {\n const enc = this._computeEncodes(_ref, context)\n if (enc) {\n if (enc['@id'] === id) {\n return enc\n }\n }\n }\n return undefined\n }\n\n _resolveRecursive(shape: any, context?: Record<string, string>): void {\n Object.keys(shape).forEach((key) => {\n const currentShape = shape[key]\n if (Array.isArray(currentShape)) {\n for (let i = 0, len = currentShape.length; i < len; i++) {\n currentShape[i] = this._resolve(currentShape[i])\n }\n } else if (typeof currentShape === 'object') {\n shape[key] = this._resolve(currentShape, context)\n }\n })\n }\n\n /**\n * Merge two shapes together. If the resulting shape has one of the \"special merge\" keys,\n * then the special merge function for that key will be used to match that property\n * @param shapeA AMF node\n * @param shapeB AMF node\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns Merged AMF node\n */\n _mergeShapes(shapeA: any, shapeB: any, context?: Record<string, string>): any {\n const merged = { ...shapeA, ...shapeB }\n const specialMerges = [\n {\n key: this._getAmfKey(ns.aml.vocabularies.docSourceMaps.sources, context),\n merger: this._mergeSourceMapsSources.bind(this),\n },\n ]\n specialMerges.forEach(({ key, merger }) => {\n if (this._hasProperty(merged, key, context)) {\n merged[key] = merger(shapeA, shapeB, context)\n }\n })\n return Object.assign(shapeA, merged)\n }\n\n /**\n * Obtains source map sources value from two shapes and returns the merged result\n * If neither shape has a sources node, then an empty object will be returned.\n * Result is wrapped in an array as per AMF model standard\n * @param shapeA AMF node\n * @param shapeB AMF node\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns Empty object or resulting merge, wrapped in an array\n * @private\n */\n _mergeSourceMapsSources(shapeA: any, shapeB: any, context?: Record<string, string>): (any | object)[] {\n const sourcesKey = this._getAmfKey(ns.aml.vocabularies.docSourceMaps.sources, context)\n let aSources = shapeA[sourcesKey] || {}\n if (Array.isArray(aSources)) {\n aSources = aSources[0]\n }\n let bSources = shapeB[sourcesKey] || {}\n if (Array.isArray(bSources)) {\n bSources = bSources[0]\n }\n return [Object.assign(aSources, bSources)]\n }\n\n /**\n * Expands the key property from compacted mode to full mode.\n * @param value The value to process\n * @returns The expanded value.\n */\n _expandKey(value: string, context?: Record<string, string>): string {\n let { amf } = this\n if (!value || typeof value !== 'string' || (!amf && !context)) {\n return value\n }\n if (Array.isArray(amf)) {\n ;[amf] = amf\n }\n const ctx = context || (amf && amf['@context'])\n if (!ctx) {\n return value\n }\n const [root, key] = value.split(':')\n if (!root || !key) {\n return value\n }\n const prefix = ctx[root]\n if (!prefix) {\n return value\n }\n return `${prefix}${key}`\n }\n\n /**\n * Computes a security model from a reference (library for example).\n * @param domainId Domain id of the security requirement to find.\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns Type definition or undefined if not found.\n */\n findSecurityScheme(domainId: string, context?: Record<string, string>): IAmfSecurityScheme | undefined {\n const { amf } = this\n const declares = this._computeDeclares(amf, context)\n let result\n if (declares) {\n result = declares.find((item) => item['@id'] === domainId)\n }\n if (result) {\n result = this._resolve(result)\n return result\n }\n const references = this._computeReferences(amf, context)\n if (Array.isArray(references) && references.length) {\n for (const ref of references) {\n if (this._hasType(ref, ns.aml.vocabularies.document.Module, context)) {\n result = this[computeReferenceSecurity](ref, domainId, context)\n if (result) {\n result = this._resolve(result)\n return result\n }\n }\n }\n }\n return undefined\n }\n\n /**\n * Computes a security model from a reference (library for example).\n * @param reference AMF model for a reference to extract the data from\n * @param selected Node ID to look for\n * @param context A context to use. If not set, it looks for the context of the passed model\n * @returns Type definition or undefined if not found.\n */\n [computeReferenceSecurity](\n reference: IAmfDomainElement,\n selected: string,\n context?: Record<string, string>\n ): IAmfSecurityScheme | undefined {\n const declare = this._computeDeclares(reference, context)\n if (!declare) {\n return undefined\n }\n let result = declare.find((item) => {\n let declared = item\n if (Array.isArray(declared)) {\n ;[declared] = declared\n }\n return declared['@id'] === selected\n })\n if (Array.isArray(result)) {\n ;[result] = result\n }\n return this._resolve(result)\n }\n\n /**\n * Collects domain objects by a domain type.\n * @param source The element to search for declare/encoded objects.\n * @param type The domain type\n * @param context A context to use. If not set, it looks for the context of the passed model\n */\n getByType(source: IAmfDomainElement, type: string, context?: Record<string, string>): IAmfDomainElement[] {\n if (!source) {\n return []\n }\n let result: IAmfDomainElement[] = []\n const declares = this._computeDeclares(source)\n const key = this._getAmfKey(type, context)\n if (declares && declares.length) {\n declares.forEach((declared) => {\n if (this._hasType(declared, key)) {\n result.push(declared as IAmfDomainElement)\n }\n })\n }\n const references = this._computeReferences(source)\n if (Array.isArray(references) && references.length) {\n for (const ref of references) {\n if (this._hasType(ref, ns.aml.vocabularies.document.Module)) {\n const items = this.getByType(ref as IAmfDomainElement, type, context)\n if (items.length) {\n result = result.concat(items)\n }\n }\n }\n }\n return result\n }\n }\n return AmfMixin as Constructor<AmfMixinInterface> & T\n}\n"]}
|
|
@@ -42470,16 +42470,16 @@
|
|
|
42470
42470
|
"@id": "#219"
|
|
42471
42471
|
},
|
|
42472
42472
|
{
|
|
42473
|
-
"@id": "#
|
|
42473
|
+
"@id": "#213"
|
|
42474
42474
|
},
|
|
42475
42475
|
{
|
|
42476
42476
|
"@id": "#210"
|
|
42477
42477
|
},
|
|
42478
42478
|
{
|
|
42479
|
-
"@id": "#
|
|
42479
|
+
"@id": "#216"
|
|
42480
42480
|
},
|
|
42481
42481
|
{
|
|
42482
|
-
"@id": "#
|
|
42482
|
+
"@id": "#219"
|
|
42483
42483
|
}
|
|
42484
42484
|
],
|
|
42485
42485
|
"doc:root": false,
|
|
@@ -43913,7 +43913,7 @@
|
|
|
43913
43913
|
"doc:ExternalDomainElement",
|
|
43914
43914
|
"doc:DomainElement"
|
|
43915
43915
|
],
|
|
43916
|
-
"doc:raw": "
|
|
43916
|
+
"doc:raw": "type: 'GENERAL'\ncountryDialCode : '+32'\nareaCode : '22'\nsubscriberNumber: '12.87.00'\nformatted: '+32-(0)22 000000'\n",
|
|
43917
43917
|
"core:mediaType": "application/yaml",
|
|
43918
43918
|
"sourcemaps:sources": [
|
|
43919
43919
|
{
|
|
@@ -43934,7 +43934,7 @@
|
|
|
43934
43934
|
"doc:ExternalDomainElement",
|
|
43935
43935
|
"doc:DomainElement"
|
|
43936
43936
|
],
|
|
43937
|
-
"doc:raw": "type:
|
|
43937
|
+
"doc:raw": "-\n type: 'GENERAL'\n value: 'info@company.be'\n-\n type: 'IT_DEPT'\n value: 'it-service@company.be'\n",
|
|
43938
43938
|
"core:mediaType": "application/yaml",
|
|
43939
43939
|
"sourcemaps:sources": [
|
|
43940
43940
|
{
|
|
@@ -43955,7 +43955,7 @@
|
|
|
43955
43955
|
"doc:ExternalDomainElement",
|
|
43956
43956
|
"doc:DomainElement"
|
|
43957
43957
|
],
|
|
43958
|
-
"doc:raw": "type:
|
|
43958
|
+
"doc:raw": "type: \"GENERAL\"\nvalue: \"www.company.be\"\n",
|
|
43959
43959
|
"core:mediaType": "application/yaml",
|
|
43960
43960
|
"sourcemaps:sources": [
|
|
43961
43961
|
{
|
|
@@ -44781,17 +44781,17 @@
|
|
|
44781
44781
|
{
|
|
44782
44782
|
"@id": "#215/source-map/lexical/element_0",
|
|
44783
44783
|
"sourcemaps:element": "amf://id#215",
|
|
44784
|
-
"sourcemaps:value": "[(1,0)-(
|
|
44784
|
+
"sourcemaps:value": "[(1,0)-(6,0)]"
|
|
44785
44785
|
},
|
|
44786
44786
|
{
|
|
44787
44787
|
"@id": "#218/source-map/lexical/element_0",
|
|
44788
44788
|
"sourcemaps:element": "amf://id#218",
|
|
44789
|
-
"sourcemaps:value": "[(1,0)-(
|
|
44789
|
+
"sourcemaps:value": "[(1,0)-(7,0)]"
|
|
44790
44790
|
},
|
|
44791
44791
|
{
|
|
44792
44792
|
"@id": "#221/source-map/lexical/element_0",
|
|
44793
44793
|
"sourcemaps:element": "amf://id#221",
|
|
44794
|
-
"sourcemaps:value": "[(1,0)-(
|
|
44794
|
+
"sourcemaps:value": "[(1,0)-(3,0)]"
|
|
44795
44795
|
},
|
|
44796
44796
|
{
|
|
44797
44797
|
"@id": "#338/source-map/synthesized-field/element_1",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@api-client/core",
|
|
3
3
|
"description": "The API Client's core client library. Works in NodeJS and in a ES enabled browser.",
|
|
4
|
-
"version": "0.11.
|
|
4
|
+
"version": "0.11.1",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"exports": {
|
|
7
7
|
"./browser.js": {
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"@pawel-up/data-mock": "^0.3.2",
|
|
59
59
|
"@pawel-up/jexl": "^3.0.0",
|
|
60
60
|
"@xmldom/xmldom": "^0.9.7",
|
|
61
|
-
"amf-json-ld-lib": "^0.0.
|
|
61
|
+
"amf-json-ld-lib": "^0.0.15",
|
|
62
62
|
"console-table-printer": "^2.11.2",
|
|
63
63
|
"dompurify": "^3.1.5",
|
|
64
64
|
"idb-keyval": "^6.2.1",
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
"@web/test-runner": "^0.20.0",
|
|
95
95
|
"@web/test-runner-commands": "^0.9.0",
|
|
96
96
|
"@web/test-runner-playwright": "^0.11.0",
|
|
97
|
-
"amf-client-js": "^5.
|
|
97
|
+
"amf-client-js": "^5.7.0",
|
|
98
98
|
"c8": "^10.1.3",
|
|
99
99
|
"cors": "^2.8.5",
|
|
100
100
|
"eslint": "^9.20.1",
|
|
@@ -121,6 +121,7 @@
|
|
|
121
121
|
"wireit": "^0.14.4"
|
|
122
122
|
},
|
|
123
123
|
"scripts": {
|
|
124
|
+
"build:test": "wireit",
|
|
124
125
|
"build:ts": "wireit",
|
|
125
126
|
"build": "npm run build:ts && npm run lint && npm run copy:assets",
|
|
126
127
|
"lint": "wireit",
|
|
@@ -192,6 +193,19 @@
|
|
|
192
193
|
".tsbuildinfo"
|
|
193
194
|
]
|
|
194
195
|
},
|
|
196
|
+
"build:test": {
|
|
197
|
+
"command": "tsc --project tsconfig.browser.json",
|
|
198
|
+
"clean": "if-file-deleted",
|
|
199
|
+
"files": [
|
|
200
|
+
"src/**/*.ts",
|
|
201
|
+
"test/**/*.ts",
|
|
202
|
+
"tsconfig.browser.json"
|
|
203
|
+
],
|
|
204
|
+
"output": [
|
|
205
|
+
".tmp/testing/**",
|
|
206
|
+
".tsbuildinfo"
|
|
207
|
+
]
|
|
208
|
+
},
|
|
195
209
|
"lint": {
|
|
196
210
|
"command": "eslint --color --cache --cache-location .eslintcache .",
|
|
197
211
|
"files": [
|
package/src/amf/AmfMixin.ts
CHANGED
|
@@ -13,9 +13,7 @@ WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
|
13
13
|
License for the specific language governing permissions and limitations under
|
|
14
14
|
the License.
|
|
15
15
|
*/
|
|
16
|
-
|
|
17
|
-
// @ts-expect-error This library has no proper types defined.
|
|
18
|
-
import { AmfModelExpander, JsonLdOptions, JsonLd } from 'amf-json-ld-lib'
|
|
16
|
+
import { AmfModelExpander } from 'amf-json-ld-lib'
|
|
19
17
|
import {
|
|
20
18
|
IAmfDocument,
|
|
21
19
|
IAmfDomainElement,
|
|
@@ -78,7 +76,7 @@ export declare class AmfMixinInterface {
|
|
|
78
76
|
/**
|
|
79
77
|
* Expands flattened AMF model
|
|
80
78
|
*/
|
|
81
|
-
_expand(amf:
|
|
79
|
+
_expand(amf: unknown): IAmfDocument
|
|
82
80
|
|
|
83
81
|
/**
|
|
84
82
|
* Returns compact model key for given value.
|
|
@@ -94,7 +92,7 @@ export declare class AmfMixinInterface {
|
|
|
94
92
|
* @param amf AMF json/ld model
|
|
95
93
|
* @returns The API spec
|
|
96
94
|
*/
|
|
97
|
-
_ensureAmfModel(amf:
|
|
95
|
+
_ensureAmfModel(amf: unknown): IAmfDocument | undefined
|
|
98
96
|
|
|
99
97
|
/**
|
|
100
98
|
* Ensures that the value is an array.
|
|
@@ -525,31 +523,20 @@ export declare class AmfMixinInterface {
|
|
|
525
523
|
export const AmfMixin = <T extends Constructor<any>>(superClass: T): Constructor<AmfMixinInterface> & T => {
|
|
526
524
|
class AmfMixin extends superClass {
|
|
527
525
|
_amf?: IAmfDocument
|
|
528
|
-
_flattenedAmf?: any
|
|
529
526
|
__cachedKeys?: any
|
|
527
|
+
__lastSetValue?: unknown
|
|
530
528
|
|
|
531
529
|
get amf(): IAmfDocument | undefined {
|
|
532
530
|
return this._amf
|
|
533
531
|
}
|
|
534
532
|
|
|
535
533
|
set amf(value: IAmfDocument | undefined) {
|
|
536
|
-
|
|
537
|
-
if (old === value) {
|
|
534
|
+
if (this._amf === value || this.__lastSetValue === value) {
|
|
538
535
|
return
|
|
539
536
|
}
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
expanded = value
|
|
544
|
-
} else {
|
|
545
|
-
const oldFlattened = this._flattenedAmf
|
|
546
|
-
if (oldFlattened === value) {
|
|
547
|
-
return
|
|
548
|
-
}
|
|
549
|
-
this._flattenedAmf = value
|
|
550
|
-
expanded = this._expand(value)
|
|
551
|
-
}
|
|
552
|
-
// Cached keys cannot be static as this element can be using in the sane
|
|
537
|
+
this.__lastSetValue = value
|
|
538
|
+
const expanded = value ? this._expand(value) : undefined
|
|
539
|
+
// Cached keys cannot be static as this element can be used in the sane
|
|
553
540
|
// document with different AMF models
|
|
554
541
|
this.__cachedKeys = {}
|
|
555
542
|
this._amf = expanded
|
|
@@ -569,16 +556,8 @@ export const AmfMixin = <T extends Constructor<any>>(superClass: T): Constructor
|
|
|
569
556
|
/**
|
|
570
557
|
* Expands flattened AMF model
|
|
571
558
|
*/
|
|
572
|
-
_expand(amf: any):
|
|
573
|
-
AmfModelExpander.
|
|
574
|
-
const linkEmbeddingFilter = (key: string): boolean => !key.endsWith('fixPoint')
|
|
575
|
-
const rootNode = amf['@context'] ? '' : 'amf://id'
|
|
576
|
-
const options = JsonLdOptions.apply()
|
|
577
|
-
.withEmbeddedLinks(linkEmbeddingFilter)
|
|
578
|
-
.withCompactedIris()
|
|
579
|
-
.withExpandedStructure()
|
|
580
|
-
.withRootNode(rootNode)
|
|
581
|
-
return JsonLd.process(amf, options)
|
|
559
|
+
_expand(amf: any): IAmfDocument {
|
|
560
|
+
return AmfModelExpander.expand(amf) as IAmfDocument
|
|
582
561
|
}
|
|
583
562
|
|
|
584
563
|
/**
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
-
// @ts-expect-error Used in testing
|
|
3
|
-
import { AmfModelExpander } from 'amf-json-ld-lib'
|
|
4
1
|
import { readFile } from 'fs/promises'
|
|
5
2
|
import { AmfMixin } from '../../../src/amf/AmfMixin.js'
|
|
6
3
|
import { AmfSerializer } from '../../../src/amf/AmfSerializer.js'
|
|
@@ -56,23 +53,15 @@ export class AmfLoader extends AmfMixin(Object) {
|
|
|
56
53
|
if (opts.noExpand) {
|
|
57
54
|
return result
|
|
58
55
|
}
|
|
59
|
-
let amf = this.
|
|
56
|
+
let amf = this._expand(result)
|
|
60
57
|
if (Array.isArray(amf)) {
|
|
61
58
|
;[amf] = amf
|
|
62
59
|
}
|
|
63
60
|
return amf
|
|
64
61
|
}
|
|
65
62
|
|
|
66
|
-
getExpandedModel(model: any): IAmfDocument {
|
|
67
|
-
let amf = model
|
|
68
|
-
if (!AmfModelExpander.isInExpandedForm(amf)) {
|
|
69
|
-
amf = this._expand(amf)
|
|
70
|
-
}
|
|
71
|
-
return amf
|
|
72
|
-
}
|
|
73
|
-
|
|
74
63
|
lookupEndpoint(model: IAmfDocument, path: string): IAmfEndPoint {
|
|
75
|
-
const amf = this.
|
|
64
|
+
const amf = this._expand(model)
|
|
76
65
|
this.amf = amf
|
|
77
66
|
const webApi = this._computeApi(amf)
|
|
78
67
|
if (!webApi) {
|
|
@@ -92,7 +81,7 @@ export class AmfLoader extends AmfMixin(Object) {
|
|
|
92
81
|
}
|
|
93
82
|
|
|
94
83
|
getEndpoint(model: IAmfDocument, path: string): IApiEndPoint {
|
|
95
|
-
const amf = this.
|
|
84
|
+
const amf = this._expand(model)
|
|
96
85
|
const op = this.lookupEndpoint(amf, path)
|
|
97
86
|
if (!op) {
|
|
98
87
|
throw new Error(`Unknown endpoint for path ${path}`)
|
|
@@ -102,7 +91,7 @@ export class AmfLoader extends AmfMixin(Object) {
|
|
|
102
91
|
}
|
|
103
92
|
|
|
104
93
|
lookupOperation(model: IAmfDocument, endpoint: string, operation: string): IAmfOperation {
|
|
105
|
-
const amf = this.
|
|
94
|
+
const amf = this._expand(model)
|
|
106
95
|
const endPoint = this.lookupEndpoint(amf, endpoint)
|
|
107
96
|
const opKey = this._getAmfKey(ns.aml.vocabularies.apiContract.supportedOperation)
|
|
108
97
|
// @ts-expect-error Used in testing
|
|
@@ -117,7 +106,7 @@ export class AmfLoader extends AmfMixin(Object) {
|
|
|
117
106
|
}
|
|
118
107
|
|
|
119
108
|
getOperation(model: IAmfDocument, endpoint: string, operation: string): IApiOperation {
|
|
120
|
-
const amf = this.
|
|
109
|
+
const amf = this._expand(model)
|
|
121
110
|
const op = this.lookupOperation(amf, endpoint, operation)
|
|
122
111
|
if (!op) {
|
|
123
112
|
throw new Error(`Unknown operation for path ${endpoint} and method ${operation}`)
|
|
@@ -168,7 +157,7 @@ export class AmfLoader extends AmfMixin(Object) {
|
|
|
168
157
|
}
|
|
169
158
|
|
|
170
159
|
getPayloads(model: IAmfDocument, endpoint: string, operation: string): IApiPayload[] {
|
|
171
|
-
const amf = this.
|
|
160
|
+
const amf = this._expand(model)
|
|
172
161
|
|
|
173
162
|
const payloads = this.lookupPayloads(amf, endpoint, operation)
|
|
174
163
|
if (!payloads) {
|
|
@@ -179,7 +168,7 @@ export class AmfLoader extends AmfMixin(Object) {
|
|
|
179
168
|
}
|
|
180
169
|
|
|
181
170
|
lookupSecurity(model: IAmfDocument, name: string): IAmfSecurityScheme | undefined {
|
|
182
|
-
const amf = this.
|
|
171
|
+
const amf = this._expand(model)
|
|
183
172
|
|
|
184
173
|
this.amf = amf
|
|
185
174
|
const declares = this._computeDeclares(amf) || []
|
|
@@ -214,7 +203,7 @@ export class AmfLoader extends AmfMixin(Object) {
|
|
|
214
203
|
}
|
|
215
204
|
|
|
216
205
|
getSecurity(model: IAmfDocument, name: string): IApiSecurityScheme {
|
|
217
|
-
const amf = this.
|
|
206
|
+
const amf = this._expand(model)
|
|
218
207
|
const security = this.lookupSecurity(amf, name)
|
|
219
208
|
if (!security) {
|
|
220
209
|
throw new Error(`No security named ${name}`)
|
|
@@ -224,7 +213,7 @@ export class AmfLoader extends AmfMixin(Object) {
|
|
|
224
213
|
}
|
|
225
214
|
|
|
226
215
|
lookupShape(model: IAmfDocument, name: string): IAmfShape | undefined {
|
|
227
|
-
const amf = this.
|
|
216
|
+
const amf = this._expand(model)
|
|
228
217
|
this.amf = amf
|
|
229
218
|
const declares = this._computeDeclares(amf) || []
|
|
230
219
|
let shape = declares.find((item) => {
|
|
@@ -252,7 +241,7 @@ export class AmfLoader extends AmfMixin(Object) {
|
|
|
252
241
|
}
|
|
253
242
|
|
|
254
243
|
getShape(model: IAmfDocument, name: string): IShapeUnion {
|
|
255
|
-
const amf = this.
|
|
244
|
+
const amf = this._expand(model)
|
|
256
245
|
const shape = this.lookupShape(amf, name)
|
|
257
246
|
if (!shape) {
|
|
258
247
|
throw new Error(`No API shape named ${name}`)
|
|
@@ -262,7 +251,7 @@ export class AmfLoader extends AmfMixin(Object) {
|
|
|
262
251
|
}
|
|
263
252
|
|
|
264
253
|
lookupDocumentation(model: IAmfDocument, name: string): IAmfCreativeWork | undefined {
|
|
265
|
-
const amf = this.
|
|
254
|
+
const amf = this._expand(model)
|
|
266
255
|
this.amf = amf
|
|
267
256
|
const webApi = this._computeApi(amf)
|
|
268
257
|
if (!webApi) {
|
|
@@ -280,7 +269,7 @@ export class AmfLoader extends AmfMixin(Object) {
|
|
|
280
269
|
}
|
|
281
270
|
|
|
282
271
|
getDocumentation(model: IAmfDocument, name: string): IApiDocumentation {
|
|
283
|
-
const amf = this.
|
|
272
|
+
const amf = this._expand(model)
|
|
284
273
|
const shape = this.lookupDocumentation(amf, name)
|
|
285
274
|
if (!shape) {
|
|
286
275
|
throw new Error(`No documentation named ${name}`)
|
|
@@ -290,7 +279,7 @@ export class AmfLoader extends AmfMixin(Object) {
|
|
|
290
279
|
}
|
|
291
280
|
|
|
292
281
|
lookupEncodes(model: IAmfDocument): IAmfWebApi {
|
|
293
|
-
const amf = this.
|
|
282
|
+
const amf = this._expand(model)
|
|
294
283
|
this.amf = amf
|
|
295
284
|
const key = this._getAmfKey(ns.aml.vocabularies.document.encodes) as string
|
|
296
285
|
// @ts-expect-error Used in testing
|
|
@@ -308,7 +297,7 @@ export class AmfLoader extends AmfMixin(Object) {
|
|
|
308
297
|
}
|
|
309
298
|
|
|
310
299
|
getResponses(model: IAmfDocument, endpoint: string, operation: string): IApiResponse[] {
|
|
311
|
-
const amf = this.
|
|
300
|
+
const amf = this._expand(model)
|
|
312
301
|
const responses = this.lookupResponses(amf, endpoint, operation)
|
|
313
302
|
const serializer = new AmfSerializer(amf)
|
|
314
303
|
return responses.map((i) => serializer.response(i))
|
|
@@ -335,7 +324,7 @@ export class AmfLoader extends AmfMixin(Object) {
|
|
|
335
324
|
* @param code The response's status code
|
|
336
325
|
*/
|
|
337
326
|
getResponse(model: IAmfDocument, endpoint: string, operation: string, code: string): IApiResponse {
|
|
338
|
-
const amf = this.
|
|
327
|
+
const amf = this._expand(model)
|
|
339
328
|
const response = this.lookupResponse(amf, endpoint, operation, code)
|
|
340
329
|
const serializer = new AmfSerializer(amf)
|
|
341
330
|
return serializer.response(response)
|
|
@@ -355,7 +344,7 @@ export class AmfLoader extends AmfMixin(Object) {
|
|
|
355
344
|
}
|
|
356
345
|
|
|
357
346
|
getRequest(model: IAmfDocument, endpoint: string, operation: string): IApiRequest {
|
|
358
|
-
const amf = this.
|
|
347
|
+
const amf = this._expand(model)
|
|
359
348
|
const request = this.lookupRequest(amf, endpoint, operation)
|
|
360
349
|
if (!request) {
|
|
361
350
|
throw new Error(`No request found in operation ${operation} and path ${endpoint}`)
|
|
@@ -383,14 +372,14 @@ export class AmfLoader extends AmfMixin(Object) {
|
|
|
383
372
|
* @param code The response's status code
|
|
384
373
|
*/
|
|
385
374
|
getResponsePayloads(model: IAmfDocument, path: string, operation: string, code: string): IApiPayload[] {
|
|
386
|
-
const amf = this.
|
|
375
|
+
const amf = this._expand(model)
|
|
387
376
|
const payloads = this.lookupResponsePayloads(amf, path, operation, code)
|
|
388
377
|
const serializer = new AmfSerializer(amf)
|
|
389
378
|
return payloads.map((p) => serializer.payload(p))
|
|
390
379
|
}
|
|
391
380
|
|
|
392
381
|
lookupServers(model: IAmfDocument): IAmfServer[] | undefined {
|
|
393
|
-
const amf = this.
|
|
382
|
+
const amf = this._expand(model)
|
|
394
383
|
this.amf = amf
|
|
395
384
|
const webApi = this._computeApi(amf)
|
|
396
385
|
if (!webApi) {
|
|
@@ -406,7 +395,7 @@ export class AmfLoader extends AmfMixin(Object) {
|
|
|
406
395
|
}
|
|
407
396
|
|
|
408
397
|
getServers(model: IAmfDocument): IApiServer[] | undefined {
|
|
409
|
-
const amf = this.
|
|
398
|
+
const amf = this._expand(model)
|
|
410
399
|
const servers = this.lookupServers(amf)
|
|
411
400
|
if (servers) {
|
|
412
401
|
const serializer = new AmfSerializer(amf)
|
|
@@ -494,7 +483,7 @@ export class AmfLoader extends AmfMixin(Object) {
|
|
|
494
483
|
* @param param The param name
|
|
495
484
|
*/
|
|
496
485
|
getParameter(model: IAmfDocument, endpoint: string, operation: string, param: string): IApiParameter {
|
|
497
|
-
const amf = this.
|
|
486
|
+
const amf = this._expand(model)
|
|
498
487
|
const expects = this.lookupExpects(amf, endpoint, operation)
|
|
499
488
|
if (!expects) {
|
|
500
489
|
throw new Error(`The operation ${operation} of endpoint ${endpoint} has no request.`)
|