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.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…