ScimPatch 2.0.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package ScimPatch --version 2.0.2                
NuGet\Install-Package ScimPatch -Version 2.0.2                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ScimPatch" Version="2.0.2" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ScimPatch --version 2.0.2                
#r "nuget: ScimPatch, 2.0.2"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install ScimPatch as a Cake Addin
#addin nuget:?package=ScimPatch&version=2.0.2

// Install ScimPatch as a Cake Tool
#tool nuget:?package=ScimPatch&version=2.0.2                

Commitizen Friendly Semantic Release

scim-patch-dotnet

About

ScimPatch is an open source implementation to facilitate the use of SCIM V2 patch in .net projects.

With this, from a JsonPatch object, we can apply the list of operations on c# objects.

As described in RFC7644:

The general form of the SCIM PATCH request is based on JSON Patch RFC6902. One difference between SCIM PATCH and JSON Patch is that SCIM servers do not support array indexing and do not support RFC6902 operation types relating to array element manipulation, such as "move".

Table of Contents

Features

Installation

Install latest version via package manager:

dotnet add package ScimPatch

Usage

For a json with an array of operations:

[
  {
    "op": "add",
    "path": "IntProperty",
    "value": 123
  },
  {
    "op": "remove",
    "path": "NullableBoolProperty"
  }
]

We just need to parse to the equivalent OperationNodes:

List<bool> results = [];
var operations = OperationTracker.FromJson(targetObject, json);
foreach (var operationNode in operations)
{
    results.Add(await operationNode.TryApplyAsync());
}

After that, the targetObject will have all modifications in memory.

You can code your models (target objects) such that it keeks the state of modified properties so you only persist on your storage what is necessary.

For more detailed examples, refer to the samples project at the repository page.

License

This project is licensed under the Apache 2.0.

See LICENSE.md for more information.

Contributing

We welcome contributions! Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo, make changes and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

This GitHub repository adheres to the principles of GitHub Flow as outlined in the official GitHub documentation. We ensure that all changes are made through branch-based workflows, enabling collaborative development and efficient code review before integration into the main branch.

gitGraph
    commit id:"fix(api): export endpoint should be consistent with output clause"
    branch feature/amazing
    checkout feature/amazing
    commit id:"feat(amazing): implement mvp"
    checkout main
    merge feature/amazing
    branch hotfix/cicd
    checkout hotfix/cicd
    commit id:"fix(cicd): automatic deployment"
    checkout main
    merge hotfix/cicd
    branch feature/incredible
    checkout feature/incredible
    commit id:"feat(incredible): implement mvp"
    checkout main
    merge feature/incredible
  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/amazing)
  3. Commit your Changes (npm run commit)
  4. Push to the Branch (git push origin feature/amazing)
  5. Open a Pull Request

Contact

If you have any questions or feedback, feel free to reach out:

  • Email: guilherme.camara@outlook.com.br
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on ScimPatch:

Package Downloads
Looplex.DotNet.Services.ScimV2.InMemory

Contains a in memory implementation for the User and Group resource types.

Looplex.DotNet.Services.Clients.InMemory

Contains a in memory implementation for the ClientCredential resource type.

Looplex.DotNet.Services.ApiKeys.InMemory

Contains a in memory implementation for the api-keys resource type.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.0.3 350 9/12/2024
2.0.2 183 8/31/2024
2.0.1 229 8/22/2024
2.0.0 130 8/20/2024
1.0.0 114 8/19/2024