File: schema_for_schema.rs

package info (click to toggle)
rust-schemars 0.8.21-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 1,308 kB
  • sloc: makefile: 2
file content (19 lines) | stat: -rw-r--r-- 512 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
mod util;
use schemars::gen::SchemaSettings;
use schemars::schema::RootSchema;
use util::*;

#[test]
fn schema_matches_draft07() -> TestResult {
    test_generated_schema::<RootSchema>("schema", SchemaSettings::draft07())
}

#[test]
fn schema_matches_2019_09() -> TestResult {
    test_generated_schema::<RootSchema>("schema-2019_09", SchemaSettings::draft2019_09())
}

#[test]
fn schema_matches_openapi3() -> TestResult {
    test_generated_schema::<RootSchema>("schema-openapi3", SchemaSettings::openapi3())
}