@@ -81,8 +81,8 @@ namespace YhCore.WebApi.Controllers.Api.DocPrint
|
||||
=> await _classify.DictionaryTypeListAsync(SchSerID(), name, showAll, typeID);
|
||||
|
||||
/// <summary>添加公共类别(复用字典添加逻辑)。前端 api/index.js 固定以 x-www-form-urlencoded 提交
|
||||
/// (TypeId/Name/typeName 表单字段,大小写不敏感绑定到 typeID/Name/typeName),故用 [FromForm]——
|
||||
/// [FromForm] 会因 Content-Type 不符返回 415。</summary>
|
||||
/// (TypeId/Name/typeName 表单字段,大小写不敏感绑定到 typeID/Name/typeName),故用 [FromForm];
|
||||
/// 若误用 [FromBody],Content-Type 不符会返回 415。</summary>
|
||||
[HttpPost("AddDictionaryType")]
|
||||
public async Task AddDictionaryType([FromForm] Common_Dictionary model)
|
||||
{
|
||||
|
||||
@@ -185,6 +185,12 @@ namespace YhCore.WebApi
|
||||
In = ParameterLocation.Header,
|
||||
Description = "登录后携带的令牌(对接 CAS SSO 后使用)"
|
||||
});
|
||||
// 加载 XML 注释:控制器/动作的 summary 中文描述展示到 Swagger(csproj GenerateDocumentationFile)
|
||||
var xml = $"{System.AppContext.BaseDirectory}{System.Reflection.Assembly.GetExecutingAssembly().GetName().Name}.xml";
|
||||
if (System.IO.File.Exists(xml))
|
||||
{
|
||||
c.IncludeXmlComments(xml, includeControllerXmlComments: true);
|
||||
}
|
||||
});
|
||||
|
||||
// 任务调度:Quartz 宿主 + Job 模板(对应 Java scheduler 包)
|
||||
|
||||
@@ -6,6 +6,9 @@
|
||||
<AssemblyName>YhCore.WebApi</AssemblyName>
|
||||
<LangVersion>9.0</LangVersion>
|
||||
<Nullable>disable</Nullable>
|
||||
<!-- 生成 XML 注释文件供 Swagger 展示接口描述;1591=无 XML 注释的公共成员告警(大量 DTO 属性无注释,忽略) -->
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<NoWarn>$(NoWarn);1591</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
Reference in New Issue
Block a user