All Projects → json-patch → json-patch-tests

json-patch / json-patch-tests

Licence: other
Tests for implementations of json-patch

Projects that are alternatives of or similar to json-patch-tests

hifitime
A high fidelity time management library in Rust
Stars: ✭ 67 (+26.42%)
Mutual labels:  ietf
ops-drafts
Applicability and Manageability Statements
Stars: ✭ 21 (-60.38%)
Mutual labels:  ietf
quic-tracker
A test suite for QUIC
Stars: ✭ 59 (+11.32%)
Mutual labels:  ietf
doq-proxy
DNS-over-QUIC to UDP Proxy
Stars: ✭ 57 (+7.55%)
Mutual labels:  ietf
asciidoctor-rfc
AsciiRFC: an AsciiDoc/asciidoctor backend to produce RFC XML v3 (RFC 7991) and v2 (RFC 7749)
Stars: ✭ 14 (-73.58%)
Mutual labels:  ietf
napalm-logs
Cross-vendor normalisation for network syslog messages, following the OpenConfig and IETF YANG models
Stars: ✭ 131 (+147.17%)
Mutual labels:  ietf
braid-spec
Working area for Braid extensions to HTTP
Stars: ✭ 179 (+237.74%)
Mutual labels:  ietf
gl-vsts-tasks-file-patch
Visual Studio Team Services Build and Release Management extensions that help you update files using JSON patch and similar syntax
Stars: ✭ 21 (-60.38%)
Mutual labels:  json-patch
draft-ip-address-privacy
Internet-Draft on IP address privacy
Stars: ✭ 15 (-71.7%)
Mutual labels:  ietf
datagram
In-progress version of draft-ietf-quic-datagram
Stars: ✭ 25 (-52.83%)
Mutual labels:  ietf
load-balancers
In-progress version of draft-ietf-quic-load-balancers
Stars: ✭ 31 (-41.51%)
Mutual labels:  ietf
bromelia
A Python micro framework for building Diameter protocol applications.
Stars: ✭ 26 (-50.94%)
Mutual labels:  ietf
Http2 Spec
Working copy of the HTTP/2 Specification
Stars: ✭ 3,622 (+6733.96%)
Mutual labels:  ietf
qlog
The IETF I-D documents for the qlog format
Stars: ✭ 36 (-32.08%)
Mutual labels:  ietf
xquic
XQUIC Library released by Alibaba is a cross-platform implementation of QUIC and HTTP/3 protocol.
Stars: ✭ 943 (+1679.25%)
Mutual labels:  ietf
rfc.fyi
Browseable, searchable RFC index
Stars: ✭ 79 (+49.06%)
Mutual labels:  ietf
Json
JSON for Modern C++
Stars: ✭ 27,824 (+52398.11%)
Mutual labels:  json-patch
hasura-metadata-patcher
CLI tool to patch Hasura metadata json file. Helps to organize complex CI/CD flows through different environments.
Stars: ✭ 14 (-73.58%)
Mutual labels:  json-patch

JSON Patch Tests

These are test cases for implementations of IETF JSON Patch (RFC6902).

Some implementations can be found at jsonpatch.com.

Test Format

Each test file is a JSON document that contains an array of test records. A test record is an object with the following members:

  • doc: The JSON document to test against
  • patch: The patch(es) to apply
  • expected: The expected resulting document, OR
  • error: A string describing an expected error
  • comment: A string describing the test
  • disabled: True if the test should be skipped

All fields except 'doc' and 'patch' are optional. Test records consisting only of a comment are also OK.

Files

  • tests.json: the main test file
  • spec_tests.json: tests from the RFC6902 spec

Writing Tests

All tests should have a descriptive comment. Tests should be as simple as possible - just what's required to test a specific piece of behavior. If you want to test interacting behaviors, create tests for each behavior as well as the interaction.

If an 'error' member is specified, the error text should describe the error the implementation should raise - not what's being tested. Implementation error strings will vary, but the suggested error should be easily matched to the implementation error string. Try to avoid creating error tests that might pass because an incorrect error was reported.

Please feel free to contribute!

Credits

The seed test set was adapted from Byron Ruth's jsonpatch-js and extended by Mike McCabe.

License

Copyright 2014 The Authors

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].