Skip to content

Commit

Permalink
fixing integrations
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbarbour committed Dec 22, 2024
1 parent c19e527 commit 36027ac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/cli/generators/middy/templates/middy-templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export function handlerMethodType(method: Method): string {
export function route(path: Path, method: Method): string {
return `{
method: '${method.method.toUpperCase()}',
path: '/{stage}${path.pathString()}',
path: '${path.pathString()}',
handler: this.${method.operationId}()
}`;
}
Expand Down
4 changes: 2 additions & 2 deletions src/open-api-builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ export class OpenApiSpecificationBuilder<
}

get awsLambdaApiGatewayIntegration(): Record<T['apiIntegrations'][number], {'$ref': string}> {
const schemes = this.parts.schemes.reduce((prev, key) => {
const apiIntegrations = this.parts.apiIntegrations.reduce((prev, key) => {
return {...prev, [key]: {"$ref": `#/components/x-amazon-apigateway-integrations/${key}`}}
},{} as any) as any;
return schemes;
return apiIntegrations;
}

withPath(name: string, builder: (path: PathBuilder, oas: this) => PathBuilder): this {
Expand Down

0 comments on commit 36027ac

Please sign in to comment.