diff --git a/src/services/OpenAPIParser.ts b/src/services/OpenAPIParser.ts index 489769ee..51a7ce07 100644 --- a/src/services/OpenAPIParser.ts +++ b/src/services/OpenAPIParser.ts @@ -175,7 +175,7 @@ export class OpenAPIParser { return obj; } - shalowDeref(obj: OpenAPIRef | T): T { + shallowDeref(obj: OpenAPIRef | T): T { if (this.isRef(obj)) { return this.byRef(obj.$ref)!; } diff --git a/src/services/models/MediaType.ts b/src/services/models/MediaType.ts index eda76e32..78a2fd21 100644 --- a/src/services/models/MediaType.ts +++ b/src/services/models/MediaType.ts @@ -38,7 +38,7 @@ export class MediaTypeModel { this.examples = { default: new ExampleModel( parser, - { value: parser.shalowDeref(info.example) }, + { value: parser.shallowDeref(info.example) }, name, info.encoding, ), diff --git a/src/utils/openapi.ts b/src/utils/openapi.ts index e20dbef9..53beb3ed 100644 --- a/src/utils/openapi.ts +++ b/src/utils/openapi.ts @@ -489,13 +489,13 @@ export function mergeParams( ): Array> { const operationParamNames = {}; operationParams.forEach(param => { - param = parser.shalowDeref(param); + param = parser.shallowDeref(param); operationParamNames[param.name + '_' + param.in] = true; }); // filter out path params overridden by operation ones with the same name pathParams = pathParams.filter(param => { - param = parser.shalowDeref(param); + param = parser.shallowDeref(param); return !operationParamNames[param.name + '_' + param.in]; });