gpt4 book ai didi

firebase - 在Firebase Cloud Functions项目中生成Swagger文档

转载 作者:行者123 更新时间:2023-12-04 01:13:54 25 4
gpt4 key购买 nike

是否可以从Firebase云函数中的函数注释生成Swagger Spec文件?如果是这样,我们该怎么做?

我看到云功能代码更像是无服务器的,所以想知道这是否可能。

最佳答案

我还没有找到一种自动方式,但是有很多库可供选择。

我在Firebase Function实现中使用express和nodejs,对我来说,
可以通过以下库来实现Swagger文档生成:
https://github.com/scottie1984/swagger-ui-express
https://github.com/Surnet/swagger-jsdoc

您可以在以下位置找到其他库:
https://swagger.io/tools/open-source/open-source-integrations/

这将创建一个新的HTTP终结点,该终结点将服务于招摇文档的HTML页面。

关于firebase - 在Firebase Cloud Functions项目中生成Swagger文档,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49573560/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com