We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5ea5c57 commit b0bbd40Copy full SHA for b0bbd40
README.md
@@ -73,6 +73,24 @@ app.UseEndpoints(endpoints =>
73
});
74
```
75
76
+5.更多功能
77
+
78
+为文档添加注释 在项目上右键--属性--生成
79
80
+
81
82
+在AddSwaggerGen方法中添加如下代码
83
84
+```
85
+c.IncludeXmlComments(Path.Combine(AppContext.BaseDirectory, "SwaggerDemo.xml"),true);
86
87
+ 最后一个参数设置为true,代表启用控制器上的注释
88
89
+运行后如看不到控制器上注释显示,请点开文档管理->个性化设置,开启分组tag显示description说明属性
90
91
+
92
93
94
95
### 🔎 效果图
96
运行项目,打开 https://localhost:5001/index.html#/home
0 commit comments