Skip to content

Commit

Permalink
Adding section in readme that maps HTTP requests to Repository methods.
Browse files Browse the repository at this point in the history
NOTE: This section does not describe the supporting endpoints that SCIMple handles automatically
  • Loading branch information
bdemers committed Nov 29, 2023
1 parent 8d3a055 commit 630d2f3
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,32 @@ public class InMemoryUserService implements Respository<ScimUser> {

Implementing the repository interface allows the customization of create, retrieve, update, and delete methods (as well as find). Customization is flexible - if your system implements soft deletes, create a delete method that simply sets a flag and alter the find and retrieve methods to only return "undeleted" resources.

## Requests to Repository Mappings

At a high level SCIMple provides the marshaling and unmarshaling of SCIM requests and responses to and from the appropriate repository methods and supporting endpoints (e.g. `/Schema`, `/ServiceProvider`, and `/ResourceTypes`). The following table shows the mapping of SCIM requests to repository methods:

| SCIM Endpoint | HTTP Method | Repository Method |
|---------------|---------------|-------------------------|
| **Users** | | |
| /Users | GET | `repository.find()` |
| /Users | POST | `repository.create()` |
| /Users/{id} | GET | `repository.get()` |
| /Users/{id} | PUT | `repository.update()` |
| /Users/{id} | PATCH | `repository.patch()` |
| /Users/{id} | DELETE | `repository.delete()` |
| **Groups** | | |
| /Groups | GET | `repository.find()` |
| /Groups | POST | `repository.create()` |
| /Groups/{id} | GET | `repository.get()` |
| /Groups/{id} | PUT | `repository.update()` |
| /Groups/{id} | PATCH | `repository.patch()` |
| /Groups/{id} | DELETE | `repository.delete()` |
| **Other** | | |
| /Bulk | POST | `repository.*` |

> **NOTE:** The `/Bulk` endpoint enables clients to send a potentially large collection of resource operations
in a single request, replacing the need to send multiple requests.

## Building & Contributing

Clone the code and build it!
Expand Down

0 comments on commit 630d2f3

Please sign in to comment.