英文:
How to document AWS Lambda with Swagger?
问题
我是一名初级Java开发者,被要求在我们这里的AWS Lambdas上实现OpenAPI(Swagger)文档。我已经在网上搜索了一些相关资料,但没有找到什么真正有实质性内容的东西。
任何形式的指导都会有帮助。
英文:
I am a Junior Java Developer and was asked to implement OpenAPI (Swagger) documentation on the AWS Lambdas we have here. I've been searching online for some material about this but didn't find anything really substantial.
Any kind of guidance would be helpful.
答案1
得分: 2
你不需要使用Swagger来记录Lambda函数,而是需要记录一个API。这个API可能由AWS Lambda函数支持,但这个技术细节对API文档来说并不重要。你应该关注如何记录你的AWS API Gateway,而不是Lambda函数。
另外,Swagger是现在被称为OpenAPI的旧名称。
AWS API Gateway支持导出OpenAPI文档,适用于REST和HTTP API。
英文:
You don't document Lambda functions with Swagger, you document an API. That API may be backed by AWS Lambda functions, but that technical detail is really irrelevant to the API documentation. You should be looking at how to document your AWS API Gateway, not your Lambda functions.
Also, Swagger is the old name for what is now called OpenAPI.
AWS API Gateway supports exporting OpenAPI documentation for both REST and HTTP APIs.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论