former2 icon indicating copy to clipboard operation
former2 copied to clipboard

AWS::ApiGateway::Stage MethodSettings ResourcePath must start with a /

Open benbridts opened this issue 3 years ago • 1 comments

I think it is generated here: https://github.com/iann0036/former2/blob/master/js/services/apigateway.js#L2045

The rules for this are confusing (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apitgateway-stage-methodsetting.html#cfn-apigateway-stage-methodsetting-resourcepath):

  • /resource/subresource must be encoded as /~1resource~1subresource
  • all resources must be encoded as /* (and not /~1* or *)

No idea why the resource provider doesn't handle this (although I've only tested that using * throws an error)

benbridts avatar Oct 19 '21 10:10 benbridts

Hey @benbridts,

Thanks heaps for raising!

Unsure why the properties are this way, but in any case I've pushed a change to prepend that leading forward slash, as documented. Let me know if you have any further issues with this one.

iann0036 avatar Oct 20 '21 08:10 iann0036