mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-10 19:06:34 +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:
|
||||
/pet:
|
||||
parameters:
|
||||
- name: pathParam
|
||||
- name: cookieParam
|
||||
in: cookie
|
||||
description: Some cookie
|
||||
required: true
|
||||
|
|
|
@ -13,7 +13,7 @@ export type TagInfo = OpenAPITag & {
|
|||
export type ExtendedOpenAPIOperation = {
|
||||
_$ref: string;
|
||||
httpVerb: string;
|
||||
pathParams: Referenced<OpenAPIParameter>[];
|
||||
pathParameters: Referenced<OpenAPIParameter>[];
|
||||
} & OpenAPIOperation;
|
||||
|
||||
export type TagsInfoMap = Dict<TagInfo>;
|
||||
|
@ -193,7 +193,7 @@ export class MenuBuilder {
|
|||
...operationInfo,
|
||||
_$ref: operationPointer,
|
||||
httpVerb: operationName,
|
||||
pathParams: path.parameters || [],
|
||||
pathParameters: path.parameters || [],
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -75,9 +75,9 @@ export class OperationModel implements IMenuItem {
|
|||
this.codeSamples = operationSpec['x-code-samples'] || [];
|
||||
this.path = JsonPointer.baseName(this._$ref, 2);
|
||||
|
||||
this.parameters = (operationSpec.parameters || []).map(
|
||||
paramOrRef => new FieldModel(parser, paramOrRef, this._$ref, options),
|
||||
);
|
||||
this.parameters = operationSpec.pathParameters
|
||||
.concat(operationSpec.parameters || [])
|
||||
.map(paramOrRef => new FieldModel(parser, paramOrRef, this._$ref, options));
|
||||
|
||||
let hasSuccessResponses = false;
|
||||
this.responses = Object.keys(operationSpec.responses || [])
|
||||
|
|
Loading…
Reference in New Issue
Block a user