有没有办法在打字稿中为 Azure Functions 自动生成 swagger 文档? [英] Is there a way to auto-generate swagger documentation for Azure Functions in typescript?

查看:32
本文介绍了有没有办法在打字稿中为 Azure Functions 自动生成 swagger 文档?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为我的项目使用带有 azure 函数的 typescript 和 node.我想为我的项目自动生成 openAPI 定义文件,而不是手动创建一个.我看到了 https://www.nuget.org/packages/Aliencube.AzureFunctions.Extensions.OpenApi/ 包,用于使用 C# 处理此问题,但我目前找不到等效的打字稿.是否有等效的打字稿或我需要手动创建定义文件?

I'm using typescript and node with azure functions for my project. I want to auto-generate the openAPI definition file for my project rather than create one manually. I saw the https://www.nuget.org/packages/Aliencube.AzureFunctions.Extensions.OpenApi/ package for handling this with C#, but I cannot currently find a typescript equivalent. Is there a typescript equivalent or do I need to manually create the definition file?

推荐答案

不,没有对应的打字稿.Microsoft 尚未正式支持此操作.

No, there is not a typescript equivalent. Microsoft has not officially supported this.

您展示的软件包由 justinyoo 本人(社区贡献者)编写.

The package you show is written by justinyoo himself, a community contributor.

这是他的原创博客:

https://devkimchi.com/2019/02/02/introducing-swagger-ui-on-azure-functions/

(可以看到他只做了一个nuget扩展库.)

(You can see that he only made a nuget extension library.)

所以我认为您需要手动创建定义文件.

So I think you need to manually create the definition file.

这篇关于有没有办法在打字稿中为 Azure Functions 自动生成 swagger 文档?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆