From fd6171b93afc83ed0b42ffecaebd34d8c8640a0c Mon Sep 17 00:00:00 2001 From: romanhotsiy Date: Mon, 26 Oct 2020 14:11:11 +0200 Subject: [PATCH] chore: fix typo in method name --- src/services/OpenAPIParser.ts | 2 +- src/services/models/MediaType.ts | 2 +- src/utils/openapi.ts | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) 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]; });