cancel
Showing results for 
Search instead for 
Did you mean: 

AWS API Gateway Integration questions

Highlighted
New Contributor

AWS API Gateway Integration questions

Hi there

 

What's best practice regarding the base path and host when setting up an AWS integration? We want the api on AWS to run on our own domain (api.domain.io) with a v1 basepath. But, we also want to be able to use the virtual mocking functionality. Is there a conflict here?

 

Currently, the API is running on AWS using the default domain and basepath set by the automock plugin. It looks something like this (where CompanyName is the SwaggerHub organisation);

 

https://api.domain.io/CompanyName/TestApi/1.0.0/inventory

 

When we set up the integration, we set the proxy to the basepath given by the automock plugin. This is because we had issues with directing the domain name when we'd set the proxy to https://api.domain.io/v1. Also because the automock functionality stopped working when we set the base path and domain to our custom settings. 

 

Any tips?


Cheers,


Dave

 

 

1 REPLY 1
Highlighted
Moderator

Re: AWS API Gateway Integration questions

Hi Dave,

 

If I understand your scenario correctly, you need to disable the "Update host setting" option in the API Auto Mocking configuration and then specify your actual host and basePath in the spec. In this case, "Try It Out" and AWS will use the basePath specified in the spec, but the mock will still exist separately at

https://virtserver.swaggerhub.com/<owner>/<api>/<version>

and can be accessed via cURL etc.


Helen Kosova
SmartBear Documentation Team Lead
________________________
Learn SmartBear products in a fun and easy way and prove your knowledge!
>>Participate in the TechCorner Challenge today
New Here?
Join us and watch the welcome video:
Announcements