如何使用Swagger文档化AWS Lambda?

huangapple go评论98阅读模式
英文:

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文档,适用于RESTHTTP 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.

huangapple
  • 本文由 发表于 2023年7月17日 20:22:13
  • 转载请务必保留本文链接:https://go.coder-hub.com/76704414.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定