1

Hey I m using openapi version 3.0.3 to add restApi's in Aws gateway. The problem is I have to add a basePath for all my Api's.

The docs says "If the API doesn't contain any basePath variables, the Import API feature checks the server.url string to see if it contains a path beyond "/". If it does, that path is used as the base path".

I tried adding the following basePath in server.url

servers :[
   {
     "url" : "/foo"
   }
]

but the basePath is not getting reflected am I missing something here?

  • AWS API Gateway has the [ignore, prepend, and split](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-import-api-basePath.html#api-gateway-import-api-basePath-ignore) options for handling `basePath` during import. Which one did you use? – Helen Oct 31 '22 at 07:43
  • I did not provide any of these. In that case I guess it defaults to ignore. My problem is I am providing this Api definition as part of cloud formation template. I don't know how to add this option in cloud formation template. – vignesh suresh Oct 31 '22 at 08:03
  • Maybe you need [BasePathMapping](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-basepathmapping.html)? – Helen Oct 31 '22 at 08:16
  • hey tnx but this basePathMapping requires a custom domain, Which in my case is not needed. I would just want the execute-api of Aws. Any idea how can I configure this. – vignesh suresh Oct 31 '22 at 09:12

0 Answers0