Skip to content
This repository has been archived by the owner on Apr 17, 2024. It is now read-only.

Commit

Permalink
Feat(Definitions): Released definitions for keycloak 19
Browse files Browse the repository at this point in the history
  • Loading branch information
DAHAG-ArisNourbakhsh committed Jul 28, 2022
1 parent cf02101 commit a6eb1b4
Show file tree
Hide file tree
Showing 5 changed files with 25,062 additions and 4 deletions.
5 changes: 3 additions & 2 deletions Dahag.Keycloak.OpenApiGenerator/KeycloakRepositoryParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,9 @@ public static class IgnoreHelper
"ClaimValue"
};

public static readonly string[] IgnoredActionParentReturnTypes =
public static readonly Func<RawRxJsResourceAction, bool>[] DisregardAsParentActionFuncs =
{
"AuthorizationService"
action => action.ReturnsType == "AuthorizationService",
action => action.Tag == "RealmAdminResource" && action.ReturnsType == "Object",
};
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Diagnostics;
using System.Diagnostics;
using Dahag.Keycloak.OpenApiGenerator.Parsing.Resource;

namespace Dahag.Keycloak.OpenApiGenerator.PostProcess;
Expand Down Expand Up @@ -35,7 +36,7 @@ private IEnumerable<IAction> GetActions()
List<IRepresentation> representations, List<KeycloakEnum> enums)
{
var parentActions = rawRxJsResource.Actions.Where(x => x.ProbablyParentOfAnotherResource)
.Where(x => !IgnoreHelper.IgnoredActionParentReturnTypes.Contains(x.ReturnsType)).ToList();
.Where(resourceAction => !IgnoreHelper.DisregardAsParentActionFuncs.Any(checkFunc => checkFunc(resourceAction))).ToList();

var convertedParentedActions = new List<(IAction BaseAction, IActionCollection ChildCollection)>();

Expand Down
Loading

0 comments on commit a6eb1b4

Please sign in to comment.