chore: fix typo in method name

This commit is contained in:
romanhotsiy 2020-10-26 14:11:11 +02:00
parent 7ffaf9ff72
commit fd6171b93a
No known key found for this signature in database
GPG Key ID: 0BC2221278CCBBB8
3 changed files with 4 additions and 4 deletions

View File

@ -175,7 +175,7 @@ export class OpenAPIParser {
return obj; return obj;
} }
shalowDeref<T extends object>(obj: OpenAPIRef | T): T { shallowDeref<T extends object>(obj: OpenAPIRef | T): T {
if (this.isRef(obj)) { if (this.isRef(obj)) {
return this.byRef<T>(obj.$ref)!; return this.byRef<T>(obj.$ref)!;
} }

View File

@ -38,7 +38,7 @@ export class MediaTypeModel {
this.examples = { this.examples = {
default: new ExampleModel( default: new ExampleModel(
parser, parser,
{ value: parser.shalowDeref(info.example) }, { value: parser.shallowDeref(info.example) },
name, name,
info.encoding, info.encoding,
), ),

View File

@ -489,13 +489,13 @@ export function mergeParams(
): Array<Referenced<OpenAPIParameter>> { ): Array<Referenced<OpenAPIParameter>> {
const operationParamNames = {}; const operationParamNames = {};
operationParams.forEach(param => { operationParams.forEach(param => {
param = parser.shalowDeref(param); param = parser.shallowDeref(param);
operationParamNames[param.name + '_' + param.in] = true; operationParamNames[param.name + '_' + param.in] = true;
}); });
// filter out path params overridden by operation ones with the same name // filter out path params overridden by operation ones with the same name
pathParams = pathParams.filter(param => { pathParams = pathParams.filter(param => {
param = parser.shalowDeref(param); param = parser.shallowDeref(param);
return !operationParamNames[param.name + '_' + param.in]; return !operationParamNames[param.name + '_' + param.in];
}); });