Skip to content

Sample project for RESTful services with HTTP PATCH variants

License

Notifications You must be signed in to change notification settings

marhan/rest-patch-sample

Repository files navigation

RESTful service with HTTP PATCH Method Build Status

The intention of this project is to experiment with RFC7386 (JSONMerge Patch) and RFC 6902 (JSON Patch) implementations. None of the implemented variants are meant to be best or good practices.

Run tests

./gradlew clean test

Run application

./gradlew bootRun

Use application

Please find some HTTP PATCH example calls for the three different endpoints. HTTPie is used to call the API. Therefore, you need to install it, if you want to use the commands below directly in your terminal.

There is also a Postman collection in /doc folder.

JSON MERGE PATCH - V1

 http PATCH :10000/v1/persons/1 name="Test Name" Content-Type:application/merge-patch+json

JSON MERGE PATCH - V2

 http PATCH :10000/v2/persons/1 name="Test Name" Content-Type:application/merge-patch+json

JSON PATCH - V3

 echo '[{ "op": "replace", "path": "/name", "value": "Test Name" }]' | http PATCH :10000/v3/persons/1 Content-Type:application/json-patch+json

Continuous Integration

Used components / technologies

About

Sample project for RESTful services with HTTP PATCH variants

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published