Skip to content

Commit

Permalink
fix(useNamedParameters): use operationName instead of operationId (#953)
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcel-G authored Oct 19, 2023
1 parent 69280a3 commit 8a458ca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/core/src/generators/verbs-options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ const generateVerbOptions = async ({
queryParams,
params,
headers,
operationId,
operationName,
context,
});

Expand Down
6 changes: 3 additions & 3 deletions packages/core/src/getters/props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ export const getProps = ({
body,
queryParams,
params,
operationId,
operationName,
headers,
context,
}: {
body: GetterBody;
queryParams?: GetterQueryParam;
params: GetterParams;
operationId: string;
operationName: string;
headers?: GetterQueryParam;
context: ContextSpecs;
}): GetterProps => {
Expand Down Expand Up @@ -62,7 +62,7 @@ export const getProps = ({

let paramGetterProps: GetterProps;
if (context.override.useNamedParameters && params.length > 0) {
const parameterTypeName = `${pascal(operationId)}PathParameters`;
const parameterTypeName = `${pascal(operationName)}PathParameters`;

const name = 'pathParams';

Expand Down

1 comment on commit 8a458ca

@vercel
Copy link

@vercel vercel bot commented on 8a458ca Oct 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.