Jc.ApiDescriptor 1.2.6

dotnet add package Jc.ApiDescriptor --version 1.2.6
NuGet\Install-Package Jc.ApiDescriptor -Version 1.2.6
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.6" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Jc.ApiDescriptor --version 1.2.6
#r "nuget: Jc.ApiDescriptor, 1.2.6"
#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.6

// Install Jc.ApiDescriptor as a Cake Tool
#tool nuget:?package=Jc.ApiDescriptor&version=1.2.6

Jc.ApiDescriptor

.net web api 控制器,接口,参数的结构信息

使用方法 1

1.加入中间件
 
//所有模块xml注释文件
List<string> summaryFiles = new List<string>()
{
    "YTK25SaleInf.xml", "YTK2DBLogical.xml", "YTK2DBInstance.xml"
};
app.UseJcApiDescriptor(summaryFiles);
2.获取结构信息

启用中间件后会自动 注册接口:/JcApiDescriptor/GetApiDescriptor

支持:Post和Get

返回对象类型:List<ControllerModel>

http://ip:port/JcApiDescriptor/GetApiDescriptor

返回Markdown接口文档

http://ip:port/JcApiDescriptor/GetApiDescriptorMd

使用方法 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 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.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.2.6 248 10/20/2023
1.2.5 117 9/25/2023
1.2.4 101 9/25/2023
1.2.3 104 9/20/2023
1.2.2 140 7/12/2023
1.2.1 547 3/24/2022
1.0.1 506 3/23/2022