@api-components/amf-helper-mixin
Advanced tools
Comparing version 4.3.0 to 4.3.1
{ | ||
"name": "@api-components/amf-helper-mixin", | ||
"description": "A mixin with common functions user by most AMF components to compyte AMF values", | ||
"version": "4.3.0", | ||
"version": "4.3.1", | ||
"license": "Apache-2.0", | ||
@@ -6,0 +6,0 @@ "main": "index.js", |
@@ -177,3 +177,3 @@ import { Namespace } from './Namespace'; | ||
*/ | ||
_computeHeaders(shape: object): object[]|undefined; | ||
_computeHeaders(shape: object): object[]|undefined|object; | ||
/** | ||
@@ -504,2 +504,3 @@ * Computes a list of query parameters | ||
_isAPI(model: object): boolean; | ||
_computeHeaderSchema(shape: object): object | undefined | ||
} |
@@ -334,9 +334,18 @@ /** | ||
* @param {Object} shape | ||
* @return {Array<Object>|undefined} | ||
* @return {Array<Object>|Object|undefined} | ||
*/ | ||
_computeHeaders(shape) { | ||
return (this._computePropertyArray(shape, this.ns.aml.vocabularies.apiContract.header)); | ||
return this._computePropertyArray(shape, this.ns.aml.vocabularies.apiContract.header) || this._computeHeaderSchema(shape); | ||
} | ||
/** | ||
* | ||
* @param {Object} shape | ||
* @return {Object|undefined} | ||
*/ | ||
_computeHeaderSchema(shape) { | ||
return this._computePropertyObject(shape, this.ns.aml.vocabularies.apiContract.headerSchema); | ||
} | ||
/** | ||
* Computes a list of query parameters | ||
@@ -343,0 +352,0 @@ * @param {Object} shape |
@@ -125,2 +125,3 @@ interface Document { | ||
operationId: string; | ||
headerSchema: string; | ||
} | ||
@@ -127,0 +128,0 @@ |
@@ -145,2 +145,3 @@ | ||
ns.aml.vocabularies.apiContract.Message = `${contractKey}Message`; | ||
ns.aml.vocabularies.apiContract.headerSchema = `${contractKey}headerSchema`; | ||
ns.aml.vocabularies.shapes = {}; | ||
@@ -147,0 +148,0 @@ ns.aml.vocabularies.shapes.key = `${ns.aml.vocabularies.key}shapes#`; |
Sorry, the diff of this file is too big to display
288015
2382