Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@atomiq/json-schema-test-suite
Advanced tools
Exposes JSON Schema Test Suite as a Node.js package
** This is the node
branch of JSON Schema Test Suite.**
Node-specific support is maintained on GitHub on the node branch. See NODE-README.md for more information on using this package.
This repository contains a set of JSON objects that implementors of JSON Schema validation libraries can use to test their validators.
It is meant to be language agnostic and should require only a JSON parser.
The conversion of the JSON objects into tests within your test framework of choice is still the job of the validator implementor.
If you're going to use this suite, you need to know how tests are laid out. The
tests are contained in the tests
directory at the root of this repository.
Inside that directory is a subdirectory for each draft or version of the
schema. We'll use draft3
as an example.
If you look inside the draft directory, there are a number of .json
files,
which logically group a set of test cases together. Often the grouping is by
property under test, but not always, especially within optional test files
(discussed below).
Inside each .json
file is a single array containing objects. It's easiest to
illustrate the structure of these with an example:
{
"description": "the description of the test case",
"schema": {"the schema that should" : "be validated against"},
"tests": [
{
"description": "a specific test of a valid instance",
"data": "the instance",
"valid": true
},
{
"description": "another specific test this time, invalid",
"data": 15,
"valid": false
}
]
}
So a description, a schema, and some tests, where tests is an array containing one or more objects with descriptions, data, and a boolean indicating whether they should be valid or invalid.
Draft 3 and 4 should have full coverage. If you see anything missing or think there is a useful test missing, please send a pull request or open an issue.
This suite is being used by:
The JSON Schema Test Suite is also available as an npm package. Node-specific support is maintained on the node branch. See NODE-README.md for more information.
If you use it as well, please fork and send a pull request adding yourself to the list :).
If you see something missing or incorrect, a pull request is most welcome!
There are some sanity checks in place for testing the test suite. You can run
them with bin/jsonschema_suite check
. They will be run automatically by
Travis CI as well.
FAQs
Exposes JSON Schema Test Suite as a Node.js package
The npm package @atomiq/json-schema-test-suite receives a total of 1 weekly downloads. As such, @atomiq/json-schema-test-suite popularity was classified as not popular.
We found that @atomiq/json-schema-test-suite demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.