Skip to content

(apigateway): SpecRestApi ignores disableExecuteApiEndpoint property #21295

@caldermc-at-amazon

Description

@caldermc-at-amazon

Describe the bug

In this commit the disableExecuteApiEndpoint property was added to RestApiBaseProps, which is used by both RestApi and SpecRestApi. The property is correctly propagated to the resulting CfnRestApi when specified for a RestApi, but is ignored when specified for a SpecRestApi.

Expected Behavior

"MySpecRestApi": {
  "Type": "AWS::ApiGateway::RestApi",
  "Properties": {
    "Name": "MySpecRestApiName",
    "DisableExecuteApiEndpoint": true
  }
}

Current Behavior

"MySpecRestApi": {
  "Type": "AWS::ApiGateway::RestApi",
  "Properties": {
    "Name": "MySpecRestApiName"
  }
}

Reproduction Steps

new SpecRestApi(myStack, 'MySpecRestApi', {
  restApiName: 'MySpecRestApiName',
  apiDefinition: ApiDefinition.fromInline({
    openapi: '3.0.2'
  }),
  disableExecuteApiEndpoint: true
})

Possible Solution

Pass the parameter along to the CfnRestApi in the SpecRestApi constructor.

Additional Information/Context

No response

CDK CLI Version

2.33.0

Framework Version

No response

Node.js Version

14

OS

OSX

Language

Typescript

Language Version

No response

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/aws-apigatewayRelated to Amazon API GatewaybugThis issue is a bug.effort/smallSmall work item – less than a day of effortp2

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions