Swagger-Web Api 文档(Swashbuckle 中缺少 Bootstrapper) [英] Swagger-Web Api Documentation(Bootstrapper is missing in Swashbuckle)

查看:46
本文介绍了Swagger-Web Api 文档(Swashbuckle 中缺少 Bootstrapper)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将 swagger 用于我的 web api 文档,为此我已经从 nuget 包安装了 Swashbuckle,但我无法在 swaggerconfig.cs 类中获取 Bootstrapper 包.那么还有没有其他替代方法可以在 swaggerconfig.cs 类中获取 Bootstrapper 包.请帮帮我.谢谢你.

I am trying to use swagger for my web api documentation, For that i have installed Swashbuckle from nuget packages but i am unable to get the Bootstrapper package in the swaggerconfig.cs class. so is there any other alternative to get the Bootstrapper package in the swaggerconfig.cs class. Please help me out. Thank you.

推荐答案

如果您的服务托管在 IIS 中,您只需安装以下 Nuget 包即可开始公开 Swagger 文档和相应的 swagger-ui:

If your service is hosted in IIS, you can start exposing Swagger docs and a corresponding swagger-ui by simply installing the following Nuget package:

安装包 Swashbuckle

Install-Package Swashbuckle

这将添加对 Swashbuckle.Core 的引用并自动安装引导程序

This will add a reference to Swashbuckle.Core and also install a bootstrapper automatically

https://github.com/domaindrivendev/Swashbuckle

谢谢.

这篇关于Swagger-Web Api 文档(Swashbuckle 中缺少 Bootstrapper)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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