.net core swagger grouping and group hiding

.net core swagger grouping and group hiding

Since there are many swagger interfaces, it is better to divide them into groups. It is more intuitive to view them in the form of pictures and texts

Define groups

Add group

Board display two groups

I want to hide the v1 group, first understand the ApplicationModel

ApplicationModel describes various objects and behaviors in the application, including Application, Controller, Action, Parameter, Router, Page, Property, Filter, etc., and the Asp.Net Core framework itself has a built-in set of rules to process these models , and also provides interfaces for us to customize conventions to extend the model to implement applications that better meet our needs.
ModelConvention defines the entrance to the operating model, through which the model can be modified. Commonly used ones include:

IApplicationModelConvention
IControllerModelConvention
IActionModelConvention
IParameterModelConvention
IPageRouteModelConvention

These interfaces provide a common method Apply, and the method parameters are the respective application models. And it will only be executed once when the program starts

(Text quoted from: https://blog.csdn.net/laosunlaiye/article/details/122174543)

Injection

This article is from the internet and does not represent1024programmerPosition, please indicate the source when reprinting:https://www.1024programmer.com/net-core-swagger-grouping-and-group-hiding-2/

author: admin

Previous article
Next article

Leave a Reply

Your email address will not be published. Required fields are marked *

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: 34331943@QQ.com

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索