json_schema_test_suite-0.3.0 doesn't have any documentation.
json_schema_test_suite
The crate provides a procedural macro attribute that allow to generate all the test cases described by JSON-Schema-Test-Suite.
The main objective is to ensure that for each test a mock server is started and will be able to
capture all the requests, ensuring that tests can be ran only interacting with cargo test
In order to ude the procedural macro attribute there are few assumptions that are made:
lazy_static
dependency is added into your[dev-dependencies]
section of theCargo.toml
filemockito
dependency is added into your[dev-dependencies]
section of theCargo.toml
fileserde-json
dependency is added into your[dev-dependencies]
section of theCargo.toml
file- the annotated method signature should be:
fn (&str, json_schema_test_suite::TestCase) -> ()
How to use
Cargo.toml
# Ensure that the following lines are present into your Cargo.toml file
[]
= "0"
# Be careful with dependencies version (using `*` version is never recommended).
# The proc-macro uses nothing fancy with the dependencies, so any version should work well :)
= "*"
= "*"
= "*"
Rust test file example
use ;
// If no tests should be ignored
// If some tests needs to be ignored, just defined them into `{ ... }` as follow
License: MIT