tooltest_core/
schema_dialect.rs1pub const DRAFT202012: &str = "https://json-schema.org/draft/2020-12/schema";
2pub const DRAFT201909: &str = "https://json-schema.org/draft/2019-09/schema";
3pub const DRAFT7_HTTP: &str = "http://json-schema.org/draft-07/schema";
4pub const DRAFT7_HTTPS: &str = "https://json-schema.org/draft-07/schema";
5pub const DRAFT6_HTTP: &str = "http://json-schema.org/draft-06/schema";
6pub const DRAFT6_HTTPS: &str = "https://json-schema.org/draft-06/schema";
7pub const DRAFT4_HTTP: &str = "http://json-schema.org/draft-04/schema";
8pub const DRAFT4_HTTPS: &str = "https://json-schema.org/draft-04/schema";
9
10pub const DEFAULT_JSON_SCHEMA_DIALECT: &str = DRAFT202012;
11pub(crate) const DEFAULT_SCHEMA_ID: &str = DRAFT202012;
12
13pub(crate) fn normalize_schema_id(value: &str) -> &str {
14 let trimmed = value.trim();
15 trimmed.strip_suffix('#').unwrap_or(trimmed)
16}