I have created API using AWS Api Gateway. Then i have documented documentation parts for all the entities ( like API, RESOURCE, METHOD, MODEL etc). Then using AWS Gateway Console i have published the documentation to dev
stage with version 1
But i am not sure how do i (or the consumer of the API) going to access the documentation?
There is an Export
option that can export documentation as Swagger
or OpenAPI3
. This will create .json
or .yaml
file and then consumer has to import these files into swagger UI. However this is not user-friendly option to provide swagger file every time i update documentation to all consumers.
I was wondering, after publishing the documentation is there anyway consumer can access documentation directly via http. So lets assume my dev
stage api URL is
https://devapi.example.com/v1
so something like https://devapi.example.com/v1/help
should launch Swagger UI
with latest published swagger file.
Update 1
In ASP.NET Web API or .NET Core you can include Swashbuckle
that creates swagger files and also has embedded version of the Swagger UI tool. So after deploying API user can access documentation directly from UI something like https://devapi.example.com/swagger
.
I was hoping the same thing from AWS gateway. After publishing the documentation it should make that documentation available via some predefined resource path.
It is a fully managed platform which allows users to build, deploy and manage APIs at any scale. The important aspect of the Amazon API Gateway is that it supports the Swagger definition format for designing and building RESTful APIs, and as you know, SwaggerHub is all about the Swagger!
Navigate to S3 in AWS console and create a bucket with some name like swagger-bucket . Under the properties tab, enable Static website hosting and make a note of the link provided. In the Index Document, enter the name of the document as index.
If the Swagger API documentation does not display automatically, in the Swagger Explore field, type the URL to the location of the Swagger documentation: https://<SnapCenter_IP_address_or_name>:8146/Content/swagger/SnapCenter.yaml or https://<vCenter_host_IP_address>:8146/Content/swagger/SnapCenter.yaml, and click ...
AWS API Gateway can only make documentation exportable but won't render a UI app. There is no endpoint that you can use in the gateway to render the documentation. You may wish to use third party tools or AWS API Gateway Developer Portal to allow users browse API documentation. You may find this blog helpful.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With