| | |
| | | model.RouteArea = resourceService.RouteArea; |
| | | model.Route = $"/api/{resourceService.RouteArea ?? "main"}/{controller}/{model.ActionName}"; |
| | | model.Method = |
| | | resourceAttribute.Method.HasValue |
| | | ? resourceAttribute.Method.Value |
| | | resourceAttribute.Method != EnumResourceMethod.None |
| | | ? resourceAttribute.Method |
| | | : request.BaseType?.IsGenericType == true && request.BaseType.GetGenericTypeDefinition() == typeof(PagedListQuery<,>) |
| | | ? EnumResourceMethod.Post |
| | | : new List<string> { "Post", "Add", "Create", "Insert", "Submit" }.Any(it => request.Name.StartsWith(it, StringComparison.OrdinalIgnoreCase)) |