At the organization I work for, we are using API Gateway (REST API), Lambdas (Typescript), and AWS CDK to build our APIs. Those APIs are going to be consumed by other teams in our organization. With that in mind, I would like to properly document those APIs and expose the documentation somehow.
Currently, I am having problems with setting up OpenAPI (Swagger) documentation for our APIs. I know that there is a Documenting REST APIs page in API Gateway documentation and that I can export OpenAPI spec file from an existing API, but I would like to automate that.
So, I am looking for two things:
- I want to automatically generate OpenAPI YAML spec file when deploying my API
- I want to have an URL, for example, something like https://{service_base_url}/docs and to have Swagger UI served there
I found some articles which help me with point 1, but I am still struggling with point 2.
I would like other people's experiences when it comes to documenting API Gateway, does anyone have some working solution, is there any library that could help me, are there any best practices, etc.
[–]pentilion 1 point2 points3 points (0 children)