diff --git a/README.md b/README.md index 1fb3416e..c42e4fff 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Yi框架-一套与SqlSugar一样爽的.Net6低代码开源框架。 适合.Net6学习、Sqlsugar学习 、项目二次开发。 集大成者,终究轮子 -Yi框架最新版本标签:`v1.0.1` 更新时间:2022/4/15 +Yi框架最新版本标签:`v1.0.2` 更新时间:2022/4/16 (项目与Sqlsugar同步更新,但这作者老杰哥代码天天爆肝到凌晨两点,我们也尽量会跟上他的脚步。更新频繁,所以可watching持续关注。) diff --git a/WebFirst/database/sqlite.db b/WebFirst/database/sqlite.db index b2cc0ab3..54a747c1 100644 Binary files a/WebFirst/database/sqlite.db and b/WebFirst/database/sqlite.db differ diff --git a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Config/SwaggerDoc.xml b/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Config/SwaggerDoc.xml index cd8585fa..de3a063a 100644 --- a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Config/SwaggerDoc.xml +++ b/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Config/SwaggerDoc.xml @@ -93,11 +93,5 @@ - - - 自由导航属性 - - - diff --git a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Controllers/RoleController.cs b/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Controllers/RoleController.cs new file mode 100644 index 00000000..cd030960 --- /dev/null +++ b/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Controllers/RoleController.cs @@ -0,0 +1,28 @@ +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.Logging; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Yi.Framework.Common.Models; +using Yi.Framework.Interface; +using Yi.Framework.Model.Models; +using Yi.Framework.Repository; +using Yi.Framework.WebCore; +using Yi.Framework.WebCore.AttributeExtend; +using Yi.Framework.WebCore.AuthorizationPolicy; + +namespace Yi.Framework.ApiMicroservice.Controllers +{ + [ApiController] + [Route("api/[controller]/[action]")] + public class RoleController : BaseCrudController + { + private IRoleService _iRoleService; + public RoleController(ILogger logger, IRoleService iRoleService) : base(logger, iRoleService) + { + _iRoleService = iRoleService; + } + } +} diff --git a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/yi-sqlsugar-dev.db b/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/yi-sqlsugar-dev.db index a7bd1cea..b852b0be 100644 Binary files a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/yi-sqlsugar-dev.db and b/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/yi-sqlsugar-dev.db differ diff --git a/Yi.Framework.Net6/Yi.Framework.WebCore/MiddlewareExtend/SwaggerExtension.cs b/Yi.Framework.Net6/Yi.Framework.WebCore/MiddlewareExtend/SwaggerExtension.cs index 5eb04bca..fb3657c7 100644 --- a/Yi.Framework.Net6/Yi.Framework.WebCore/MiddlewareExtend/SwaggerExtension.cs +++ b/Yi.Framework.Net6/Yi.Framework.WebCore/MiddlewareExtend/SwaggerExtension.cs @@ -62,16 +62,16 @@ namespace Yi.Framework.WebCore.MiddlewareExtend }, Array.Empty() } }); - c.AddServer(new OpenApiServer() - { - Url = "https://ccnetcore.com", - Description = "Yi-Framework" - }); - c.CustomOperationIds(apiDesc => - { - var controllerAction = apiDesc.ActionDescriptor as ControllerActionDescriptor; - return controllerAction.ActionName; - }); + //c.AddServer(new OpenApiServer() + //{ + // Url = "https://ccnetcore.com", + // Description = "Yi-Framework" + //}); + //c.CustomOperationIds(apiDesc => + //{ + // var controllerAction = apiDesc.ActionDescriptor as ControllerActionDescriptor; + // return controllerAction.ActionName; + //}); }); #endregion @@ -85,27 +85,12 @@ namespace Yi.Framework.WebCore.MiddlewareExtend app.UseSwagger(); - app.UseKnife4UI(c => - { - c.RoutePrefix = "swagger"; // serve the UI at root - if (swaggerModels.Length == 0) - { - c.SwaggerEndpoint("/v1/swagger.json", "Yi.Framework"); - } - else - { - foreach (var k in swaggerModels) - { - c.SwaggerEndpoint(k.url, k.name); - } - } - }); - - //app.UseSwaggerUI(c => + //app.UseKnife4UI(c => //{ + // c.RoutePrefix = "swagger"; // serve the UI at root // if (swaggerModels.Length == 0) // { - // c.SwaggerEndpoint("/swagger/v1/swagger.json", "Yi.Framework"); + // c.SwaggerEndpoint("/v1/swagger.json", "Yi.Framework"); // } // else // { @@ -114,10 +99,25 @@ namespace Yi.Framework.WebCore.MiddlewareExtend // c.SwaggerEndpoint(k.url, k.name); // } // } + //}); - //} + app.UseSwaggerUI(c => + { + if (swaggerModels.Length == 0) + { + c.SwaggerEndpoint("/swagger/v1/swagger.json", "Yi.Framework"); + } + else + { + foreach (var k in swaggerModels) + { + c.SwaggerEndpoint(k.url, k.name); + } + } - //); + } + + ); } }