-
Notifications
You must be signed in to change notification settings - Fork 5
Added partial support for interacting with the Groups API through the SDK #34
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
base: master
Are you sure you want to change the base?
Conversation
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.
Hi @2uan2 thank you for the contribution, see my comments.
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.
Pull request overview
This PR adds partial support for the Groups API to the SDK, enabling interaction with group-related endpoints including creation, deletion, user assignment, and role assignment operations.
Key Changes:
- Implemented core GroupsApi class with CRUD operations and user/role assignment methods
- Added supporting model classes (GroupRead, GroupCreate, GroupAssignUser, GroupAddRole) for API interactions
- Created comprehensive E2E tests to validate the Groups API functionality
Reviewed changes
Copilot reviewed 10 out of 12 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| GroupsApi.java | Core API implementation with methods for creating, retrieving, deleting groups, and managing user/role assignments |
| GroupRead.java | Model class representing group data returned from API reads |
| GroupCreate.java | Model class for creating new groups |
| GroupAssignUser.java | Model class for assigning users to groups |
| GroupAddRole.java | Model class for adding roles to groups |
| GroupsApiE2ETest.java | End-to-end tests validating all Groups API operations |
| ApiClient.java | Integration of GroupsApi instance into the main API client |
| ResourceRelationsApi.java | Fixed typo in documentation comment |
| ResourceInstancesApi.java | Added documentation clarifying method alias |
| ResourcesApiE2ETest.java | Updated test comments for accuracy |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/main/java/io/permit/sdk/openapi/models/GroupAssignUser.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <[email protected]>
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.
Pull request overview
Copilot reviewed 10 out of 12 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| * Retrieves a paginated result of groups with the default number of items per page. | ||
| * | ||
| * @param page The page number of the result set to retrieve. | ||
| * @return A PaginatedResultUserRead object representing the retrieved paginated result of groups. |
Copilot
AI
Dec 21, 2025
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 return type documentation is incorrect. The method returns GroupRead[], not PaginatedResultUserRead. This appears to have been copied from a similar method in another API class.
| /** | ||
| * Retrieves a paginated result of groups with default pagination. | ||
| * | ||
| * @return A PaginatedResultUserRead object representing the retrieved paginated result of groups. |
Copilot
AI
Dec 21, 2025
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 return type documentation is incorrect. The method returns GroupRead[], not PaginatedResultUserRead. This appears to have been copied from a similar method in another API class.
Co-authored-by: Copilot <[email protected]>
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.
Pull request overview
Copilot reviewed 10 out of 12 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| assertTrue(Arrays.stream(resources).map(r -> r.key).collect(Collectors.toList()).contains(documentData.key)); | ||
|
|
||
| logger.info("get non existing role -> 404"); | ||
| logger.info("get non existing user -> 404"); |
Copilot
AI
Dec 21, 2025
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 error message refers to 'user' but the test is getting a resource. Should be 'get non existing resource -> 404' to match the context.
| logger.info("get non existing user -> 404"); | |
| logger.info("get non existing resource -> 404"); |
No description provided.