-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ADMINAPI-1117] - Adds /v2/resourceClaimActions and /v2/resourceClaimActionAuthStrategies endpoints. #221
Conversation
Test Results6 tests 6 ✅ 0s ⏱️ Results for commit 7f40067. ♻️ This comment has been updated with latest results. |
Hi @jasonh-edfi . We have a question on these changes. |
CreateMap<EdFi.Security.DataAccess.Models.ResourceClaimAction, ResourceClaimActionModel>() | ||
.ForMember(dst => dst.ResourceClaimName, opt => opt.MapFrom(src => src.ResourceClaim.ResourceName)) | ||
.ForMember(dst => dst.ActionName, opt => opt.MapFrom(src => src.Action.ActionName)); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am curious: am I the only one who hates Automapper? I am not suggesting a change right now, because Automapper is how the application already does things. I just think it would be easier to debug and think about things if we wrote the following function inside the ResourceClaimAction
class:
public ResourceClaimActionModel ToModel()
{
return new
{
ResourceClaimName = this.ResourceClaim.ResourceClaimName,
ActionName = this.Action.ActionName
};
}
When things go wrong, it is very hard to debug if the object at runtime is flowing through AutoMapper. Plus, AutoMapper adds a little overhead to the mapping process. In other words, it will take longer to process that conversion than just using the plain code.
}; | ||
} | ||
|
||
public List<ResourceClaimActionAuthorizationStrategies> Execute(CommonQueryParams commonQueryParams) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The class that needs to access this: does it need to modify the list contents? If not, then may I suggest returning as IReadOnlyList
instead of returning as List
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jasonh-edfi @stephenfuqua
Would it be right for you if this branch contains some initial adminconsole implementation (including swagger definition)?
If not, we have to create a new branch from the tag v2.2.1 (not from the main branch) and issue a new PR.
Just saw this question from yesterday. As far as I'm concerned, everything for Admin Console should be going into |
@@ -16,8 +16,8 @@ | |||
"AllowRegistration": true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you undo the changes on this file?
…rategies Endpoints
90a254b
to
ba6f714
Compare
…ce-OSS/AdminAPI-2.x into ADMINAPI-1117-David
No description provided.