Jc.ApiDescriptor
1.2.1
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Jc.ApiDescriptor --version 1.2.1
NuGet\Install-Package Jc.ApiDescriptor -Version 1.2.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Jc.ApiDescriptor" Version="1.2.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Jc.ApiDescriptor --version 1.2.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Jc.ApiDescriptor, 1.2.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Jc.ApiDescriptor as a Cake Addin #addin nuget:?package=Jc.ApiDescriptor&version=1.2.1 // Install Jc.ApiDescriptor as a Cake Tool #tool nuget:?package=Jc.ApiDescriptor&version=1.2.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Jc.ApiDescriptor
.net web api 控制器,接口,参数的结构信息
使用方法 1
1.加入中间件
app.UseJcApiDescriptor();
2.获取结构信息
启用中间件后会自动 注册接口:/JcApiDescriptor/GetApiDescriptor
支持:Post和Get
返回对象类型:List<ControllerModel>
http://ip:port/JcApiDescriptor/GetApiDescriptor
使用方法 2
1.注入依赖
Services.AddJcApiDescriptor();
2.获取信息
/// <summary>
/// 获取数据
/// </summary>
/// <returns></returns>
JcApiDescriptor.GetApiDescriptor()
/// <summary>
/// 将配置信息保存到本地文件
/// </summary>
/// <param name="fileName"></param>
JcApiDescriptor.SaveApiDescriptor(string fileName)
3.返回结构示例
[{
"Id": "T:atestApi.Controllers.TestController",
"AreaName": null,
"ControllerName": "Test",
"FullName": "atestApi.Controllers.TestController",
"AssemblyName": null,
"ModuleName": "atestApi.dll",
"Summary": "测试控制器",
"NoteModel": {
"Name": "T:atestApi.Controllers.TestController",
"Summary": "测试控制器",
"ParamList": {},
"Returns": null
},
"CustomAttrList": [{
"Name": "NullableContext",
"TypeId": "T:System.Runtime.CompilerServices.NullableContextAttribute",
"TypeName": "NullableContextAttribute",
"HasChildList": false,
"Summary": null,
"Position": 0,
"ConstructorArgumentsList": [{
"Id": null,
"Name": "p1",
"TypeId": "T:System.Byte",
"TypeName": "Byte",
"IsEnum": false,
"IsGeneric": false,
"IsIEnumerable": false,
"EnumItemId": null,
"EnumItemName": null,
"HasChildList": false,
"Summary": null,
"ParamValue": 1,
"Position": 0,
"IsOptional": null,
"DefaultValue": null,
"AttrList": null,
"ChildList": null
}],
"NamedArgumentsList": []
}, {
"Name": "Nullable",
"TypeId": "T:System.Runtime.CompilerServices.NullableAttribute",
"TypeName": "NullableAttribute",
"HasChildList": false,
"Summary": null,
"Position": 0,
"ConstructorArgumentsList": [{
"Id": null,
"Name": "p1",
"TypeId": "T:System.Byte",
"TypeName": "Byte",
"IsEnum": false,
"IsGeneric": false,
"IsIEnumerable": false,
"EnumItemId": null,
"EnumItemName": null,
"HasChildList": false,
"Summary": null,
"ParamValue": 0,
"Position": 0,
"IsOptional": null,
"DefaultValue": null,
"AttrList": null,
"ChildList": null
}],
"NamedArgumentsList": []
}, {
"Name": "ApiController",
"TypeId": "T:Microsoft.AspNetCore.Mvc.ApiControllerAttribute",
"TypeName": "ApiControllerAttribute",
"HasChildList": false,
"Summary": null,
"Position": 0,
"ConstructorArgumentsList": [],
"NamedArgumentsList": []
}, {
"Name": "ActionLog",
"TypeId": "T:Jc.ActionFilter.ActionLog",
"TypeName": "ActionLog",
"HasChildList": true,
"Summary": "拦截器 日志输出",
"Position": 0,
"ConstructorArgumentsList": [],
"NamedArgumentsList": []
}, {
"Name": "Route",
"TypeId": "T:Microsoft.AspNetCore.Mvc.RouteAttribute",
"TypeName": "RouteAttribute",
"HasChildList": false,
"Summary": null,
"Position": 0,
"ConstructorArgumentsList": [{
"Id": null,
"Name": "p1",
"TypeId": "T:System.String",
"TypeName": "String",
"IsEnum": false,
"IsGeneric": false,
"IsIEnumerable": false,
"EnumItemId": null,
"EnumItemName": null,
"HasChildList": false,
"Summary": null,
"ParamValue": "[controller]",
"Position": 0,
"IsOptional": null,
"DefaultValue": null,
"AttrList": null,
"ChildList": null
}],
"NamedArgumentsList": []
}],
"ActionList": [{
"Id": "M:atestApi.Controllers.TestController.createtoken(System.Int32,System.String,System.String)",
"AreaName": null,
"ControllerName": "Test",
"ActionName": "createtoken",
"ActionFullName": "atestApi.Controllers.TestController.createtoken (atestApi)",
"RouteTemplate": "test/createtoken",
"Summary": "创建Token",
"NoteModel": {
"Name": "M:atestApi.Controllers.TestController.createtoken(System.Int32,System.String,System.String)",
"Summary": "创建Token",
"ParamList": {
"seconds": "秒",
"tokenid": "tokenID",
"tokenInfo": "token信息"
},
"Returns": ""
},
"CustomAttrList": [{
"Name": "HttpPost",
"TypeId": "T:Microsoft.AspNetCore.Mvc.HttpPostAttribute",
"TypeName": "HttpPostAttribute",
"HasChildList": false,
"Summary": null,
"Position": 0,
"ConstructorArgumentsList": [{
"Id": null,
"Name": "p1",
"TypeId": "T:System.String",
"TypeName": "String",
"IsEnum": false,
"IsGeneric": false,
"IsIEnumerable": false,
"EnumItemId": null,
"EnumItemName": null,
"HasChildList": false,
"Summary": null,
"ParamValue": "/test/createtoken",
"Position": 0,
"IsOptional": null,
"DefaultValue": null,
"AttrList": null,
"ChildList": null
}],
"NamedArgumentsList": []
}],
"InputParameters": [{
"Id": null,
"Name": "seconds",
"TypeId": "T:System.Int32",
"TypeName": "Int32",
"IsEnum": false,
"IsGeneric": false,
"IsIEnumerable": false,
"EnumItemId": null,
"EnumItemName": null,
"HasChildList": false,
"Summary": "秒",
"ParamValue": null,
"Position": 1,
"IsOptional": null,
"DefaultValue": "",
"AttrList": null,
"ChildList": null
}, {
"Id": null,
"Name": "tokenid",
"TypeId": "T:System.String",
"TypeName": "String",
"IsEnum": false,
"IsGeneric": false,
"IsIEnumerable": false,
"EnumItemId": null,
"EnumItemName": null,
"HasChildList": false,
"Summary": "tokenID",
"ParamValue": null,
"Position": 2,
"IsOptional": null,
"DefaultValue": "",
"AttrList": null,
"ChildList": null
}, {
"Id": null,
"Name": "tokenInfo",
"TypeId": "T:System.String",
"TypeName": "String",
"IsEnum": false,
"IsGeneric": false,
"IsIEnumerable": false,
"EnumItemId": null,
"EnumItemName": null,
"HasChildList": false,
"Summary": "token信息",
"ParamValue": null,
"Position": 3,
"IsOptional": null,
"DefaultValue": "",
"AttrList": null,
"ChildList": null
}],
"ReturnParameter": {
"Id": null,
"Name": null,
"TypeId": "T:Microsoft.AspNetCore.Mvc.IActionResult",
"TypeName": "IActionResult",
"IsEnum": false,
"IsGeneric": false,
"IsIEnumerable": false,
"EnumItemId": null,
"EnumItemName": null,
"HasChildList": false,
"Summary": "",
"ParamValue": null,
"Position": 0,
"IsOptional": null,
"DefaultValue": null,
"AttrList": null,
"ChildList": null
}
}, {
"Id": "M:atestApi.Controllers.TestController.checktoken(System.String)",
"AreaName": null,
"ControllerName": "Test",
"ActionName": "checktoken",
"ActionFullName": "atestApi.Controllers.TestController.checktoken (atestApi)",
"RouteTemplate": "test/checktoken",
"Summary": "检查Token",
"NoteModel": {
"Name": "M:atestApi.Controllers.TestController.checktoken(System.String)",
"Summary": "检查Token",
"ParamList": {
"token": ""
},
"Returns": ""
},
"CustomAttrList": [{
"Name": "HttpPost",
"TypeId": "T:Microsoft.AspNetCore.Mvc.HttpPostAttribute",
"TypeName": "HttpPostAttribute",
"HasChildList": false,
"Summary": null,
"Position": 0,
"ConstructorArgumentsList": [{
"Id": null,
"Name": "p1",
"TypeId": "T:System.String",
"TypeName": "String",
"IsEnum": false,
"IsGeneric": false,
"IsIEnumerable": false,
"EnumItemId": null,
"EnumItemName": null,
"HasChildList": false,
"Summary": null,
"ParamValue": "/test/checktoken",
"Position": 0,
"IsOptional": null,
"DefaultValue": null,
"AttrList": null,
"ChildList": null
}],
"NamedArgumentsList": []
}],
"InputParameters": [{
"Id": null,
"Name": "typ",
"TypeId": "T:System.String",
"TypeName": "String",
"IsEnum": false,
"IsGeneric": false,
"IsIEnumerable": false,
"EnumItemId": null,
"EnumItemName": null,
"HasChildList": false,
"Summary": null,
"ParamValue": null,
"Position": 1,
"IsOptional": null,
"DefaultValue": "",
"AttrList": null,
"ChildList": null
}],
"ReturnParameter": {
"Id": null,
"Name": null,
"TypeId": "T:Microsoft.AspNetCore.Mvc.IActionResult",
"TypeName": "IActionResult",
"IsEnum": false,
"IsGeneric": false,
"IsIEnumerable": false,
"EnumItemId": null,
"EnumItemName": null,
"HasChildList": false,
"Summary": "",
"ParamValue": null,
"Position": 0,
"IsOptional": null,
"DefaultValue": null,
"AttrList": null,
"ChildList": null
}
}, {
"Id": "M:atestApi.Controllers.TestController.snowid(System.Int32)",
"AreaName": null,
"ControllerName": "Test",
"ActionName": "snowid",
"ActionFullName": "atestApi.Controllers.TestController.snowid (atestApi)",
"RouteTemplate": "test/snowid",
"Summary": "生成SnowID",
"NoteModel": {
"Name": "M:atestApi.Controllers.TestController.snowid(System.Int32)",
"Summary": "生成SnowID",
"ParamList": {
"idCount": ""
},
"Returns": ""
},
"CustomAttrList": [{
"Name": "HttpPost",
"TypeId": "T:Microsoft.AspNetCore.Mvc.HttpPostAttribute",
"TypeName": "HttpPostAttribute",
"HasChildList": false,
"Summary": null,
"Position": 0,
"ConstructorArgumentsList": [{
"Id": null,
"Name": "p1",
"TypeId": "T:System.String",
"TypeName": "String",
"IsEnum": false,
"IsGeneric": false,
"IsIEnumerable": false,
"EnumItemId": null,
"EnumItemName": null,
"HasChildList": false,
"Summary": null,
"ParamValue": "/test/snowid",
"Position": 0,
"IsOptional": null,
"DefaultValue": null,
"AttrList": null,
"ChildList": null
}],
"NamedArgumentsList": []
}],
"InputParameters": [{
"Id": null,
"Name": "idCount",
"TypeId": "T:System.Int32",
"TypeName": "Int32",
"IsEnum": false,
"IsGeneric": false,
"IsIEnumerable": false,
"EnumItemId": null,
"EnumItemName": null,
"HasChildList": false,
"Summary": "",
"ParamValue": null,
"Position": 1,
"IsOptional": null,
"DefaultValue": "",
"AttrList": null,
"ChildList": null
}],
"ReturnParameter": {
"Id": null,
"Name": null,
"TypeId": "T:Microsoft.AspNetCore.Mvc.IActionResult",
"TypeName": "IActionResult",
"IsEnum": false,
"IsGeneric": false,
"IsIEnumerable": false,
"EnumItemId": null,
"EnumItemName": null,
"HasChildList": false,
"Summary": "",
"ParamValue": null,
"Position": 0,
"IsOptional": null,
"DefaultValue": null,
"AttrList": null,
"ChildList": null
}
}, {
"Id": "M:atestApi.Controllers.TestController.getid",
"AreaName": null,
"ControllerName": "Test",
"ActionName": "getid",
"ActionFullName": "atestApi.Controllers.TestController.getid (atestApi)",
"RouteTemplate": "test/getid",
"Summary": "ID测试",
"NoteModel": {
"Name": "M:atestApi.Controllers.TestController.getid",
"Summary": "ID测试",
"ParamList": {},
"Returns": ""
},
"CustomAttrList": [{
"Name": "HttpPost",
"TypeId": "T:Microsoft.AspNetCore.Mvc.HttpPostAttribute",
"TypeName": "HttpPostAttribute",
"HasChildList": false,
"Summary": null,
"Position": 0,
"ConstructorArgumentsList": [{
"Id": null,
"Name": "p1",
"TypeId": "T:System.String",
"TypeName": "String",
"IsEnum": false,
"IsGeneric": false,
"IsIEnumerable": false,
"EnumItemId": null,
"EnumItemName": null,
"HasChildList": false,
"Summary": null,
"ParamValue": "/test/getid",
"Position": 0,
"IsOptional": null,
"DefaultValue": null,
"AttrList": null,
"ChildList": null
}],
"NamedArgumentsList": []
}],
"InputParameters": [],
"ReturnParameter": {
"Id": null,
"Name": null,
"TypeId": "T:Microsoft.AspNetCore.Mvc.IActionResult",
"TypeName": "IActionResult",
"IsEnum": false,
"IsGeneric": false,
"IsIEnumerable": false,
"EnumItemId": null,
"EnumItemName": null,
"HasChildList": false,
"Summary": "",
"ParamValue": null,
"Position": 0,
"IsOptional": null,
"DefaultValue": null,
"AttrList": null,
"ChildList": null
}
}, {
"Id": "M:atestApi.Controllers.TestController.getinfo",
"AreaName": null,
"ControllerName": "Test",
"ActionName": "getinfo",
"ActionFullName": "atestApi.Controllers.TestController.getinfo (atestApi)",
"RouteTemplate": "test/getinfo",
"Summary": "获取信息测试",
"NoteModel": {
"Name": "M:atestApi.Controllers.TestController.getinfo",
"Summary": "获取信息测试",
"ParamList": {},
"Returns": ""
},
"CustomAttrList": [{
"Name": "HttpPost",
"TypeId": "T:Microsoft.AspNetCore.Mvc.HttpPostAttribute",
"TypeName": "HttpPostAttribute",
"HasChildList": false,
"Summary": null,
"Position": 0,
"ConstructorArgumentsList": [{
"Id": null,
"Name": "p1",
"TypeId": "T:System.String",
"TypeName": "String",
"IsEnum": false,
"IsGeneric": false,
"IsIEnumerable": false,
"EnumItemId": null,
"EnumItemName": null,
"HasChildList": false,
"Summary": null,
"ParamValue": "/test/getinfo",
"Position": 0,
"IsOptional": null,
"DefaultValue": null,
"AttrList": null,
"ChildList": null
}],
"NamedArgumentsList": []
}],
"InputParameters": [],
"ReturnParameter": {
"Id": null,
"Name": null,
"TypeId": "T:Microsoft.AspNetCore.Mvc.IActionResult",
"TypeName": "IActionResult",
"IsEnum": false,
"IsGeneric": false,
"IsIEnumerable": false,
"EnumItemId": null,
"EnumItemName": null,
"HasChildList": false,
"Summary": "",
"ParamValue": null,
"Position": 0,
"IsOptional": null,
"DefaultValue": null,
"AttrList": null,
"ChildList": null
}
}]
}]
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.1
- Microsoft.AspNetCore.Mvc (>= 2.2.0)
- Newtonsoft.Json (>= 13.0.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.