Swagger amazon api gateway extensions with http events

Hi,

I have an existing API with a rich swagger doc. I want to expose this as a serverless app on AWS using Java. I want to re-use the swagger doc albeit with mods and configure the gateway using x-amazon-apigateway extensions. I can do this by setting the RestApi body to point to my JSON doc in the resources section.

This works fine, but I can no longer use any of the http event settings. If I try to specify say ‘private: true’ then I get this error:

‘ApiGatewayResourceMyApi - Another resource with the same parent already has this name: myApi (Service: AmazonApiGateway; Status Code: 409; Error Code: ConflictException’.

Is there any way I can use swagger + extensions + serverless http events settings together or is this just not possible? I’d also be happy to remove the extensions and just use swagger + serverless http events to configure the gateway…