mirror of
https://github.com/Redocly/redoc.git
synced 2025-03-03 09:25:47 +03:00
fix: do not ignore path level parameters
This commit is contained in:
parent
d27ba74679
commit
14f8408e8d
|
@ -102,7 +102,7 @@ x-tagGroups:
|
||||||
paths:
|
paths:
|
||||||
/pet:
|
/pet:
|
||||||
parameters:
|
parameters:
|
||||||
- name: pathParam
|
- name: cookieParam
|
||||||
in: cookie
|
in: cookie
|
||||||
description: Some cookie
|
description: Some cookie
|
||||||
required: true
|
required: true
|
||||||
|
|
|
@ -13,7 +13,7 @@ export type TagInfo = OpenAPITag & {
|
||||||
export type ExtendedOpenAPIOperation = {
|
export type ExtendedOpenAPIOperation = {
|
||||||
_$ref: string;
|
_$ref: string;
|
||||||
httpVerb: string;
|
httpVerb: string;
|
||||||
pathParams: Referenced<OpenAPIParameter>[];
|
pathParameters: Referenced<OpenAPIParameter>[];
|
||||||
} & OpenAPIOperation;
|
} & OpenAPIOperation;
|
||||||
|
|
||||||
export type TagsInfoMap = Dict<TagInfo>;
|
export type TagsInfoMap = Dict<TagInfo>;
|
||||||
|
@ -193,7 +193,7 @@ export class MenuBuilder {
|
||||||
...operationInfo,
|
...operationInfo,
|
||||||
_$ref: operationPointer,
|
_$ref: operationPointer,
|
||||||
httpVerb: operationName,
|
httpVerb: operationName,
|
||||||
pathParams: path.parameters || [],
|
pathParameters: path.parameters || [],
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,9 +75,9 @@ export class OperationModel implements IMenuItem {
|
||||||
this.codeSamples = operationSpec['x-code-samples'] || [];
|
this.codeSamples = operationSpec['x-code-samples'] || [];
|
||||||
this.path = JsonPointer.baseName(this._$ref, 2);
|
this.path = JsonPointer.baseName(this._$ref, 2);
|
||||||
|
|
||||||
this.parameters = (operationSpec.parameters || []).map(
|
this.parameters = operationSpec.pathParameters
|
||||||
paramOrRef => new FieldModel(parser, paramOrRef, this._$ref, options),
|
.concat(operationSpec.parameters || [])
|
||||||
);
|
.map(paramOrRef => new FieldModel(parser, paramOrRef, this._$ref, options));
|
||||||
|
|
||||||
let hasSuccessResponses = false;
|
let hasSuccessResponses = false;
|
||||||
this.responses = Object.keys(operationSpec.responses || [])
|
this.responses = Object.keys(operationSpec.responses || [])
|
||||||
|
|
Loading…
Reference in New Issue
Block a user