Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
245 changes: 0 additions & 245 deletions packages/rs-dpp/schema/meta_schemas/token/v0/token-meta.json

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ use platform_value::{Value, ValueMapHelper};
pub const DATA_CONTRACT_SCHEMA_URI_V0: &str =
"https://github.com/dashpay/platform/blob/master/packages/rs-dpp/schema/meta_schemas/document/v0/document-meta.json";

pub const TOKEN_SCHEMA_URI_V0: &str =
"https://github.com/dashpay/platform/blob/master/packages/rs-dpp/schema/meta_schemas/document/v0/token-meta.json";

pub const PROPERTY_SCHEMA: &str = "$schema";

const SYSTEM_GENERATED_FIELDS: [&str; 9] = [
Expand Down
57 changes: 0 additions & 57 deletions packages/rs-dpp/src/validation/meta_validators/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@ lazy_static! {
"../../../schema/meta_schemas/document/v0/document-meta.json"
))
.unwrap();
static ref TOKEN_META_JSON_V0: Value = serde_json::from_str::<Value>(include_str!(
"../../../schema/meta_schemas/token/v0/token-meta.json"
))
.unwrap();

pub static ref DRAFT_202012_META_SCHEMA: JSONSchema = JSONSchema::options()
.with_draft(Draft::Draft202012)
Expand Down Expand Up @@ -143,57 +139,4 @@ lazy_static! {
.compile(&DOCUMENT_META_JSON_V0)
.expect("Invalid data contract schema");

// Compiled version of token meta schema
pub static ref TOKEN_META_SCHEMA_V0: JSONSchema = JSONSchema::options()
.with_keyword(
"byteArray",
|_, _, _| Ok(Box::new(ByteArrayKeyword)),
)
.with_patterns_regex_engine(RegexEngine::Regex(RegexOptions {
size_limit: Some(5 * (1 << 20)),
..Default::default()
}))
.should_ignore_unknown_formats(false)
.should_validate_formats(true)
.with_patterns_regex_engine(RegexEngine::Regex(Default::default()))
.with_draft(Draft::Draft202012)
.with_document(
"https://json-schema.org/draft/2020-12/meta/applicator".to_string(),
DRAFT202012_APPLICATOR.clone(),
)
.with_document(
"https://json-schema.org/draft/2020-12/meta/core".to_string(),
DRAFT202012_CORE.clone(),
)
.with_document(
"https://json-schema.org/draft/2020-12/meta/applicator".to_string(),
DRAFT202012_APPLICATOR.clone(),
)
.with_document(
"https://json-schema.org/draft/2020-12/meta/unevaluated".to_string(),
DRAFT202012_UNEVALUATED.clone(),
)
.with_document(
"https://json-schema.org/draft/2020-12/meta/validation".to_string(),
DRAFT202012_VALIDATION.clone(),
)
.with_document(
"https://json-schema.org/draft/2020-12/meta/meta-data".to_string(),
DRAFT202012_META_DATA.clone(),
)
.with_document(
"https://json-schema.org/draft/2020-12/meta/format-annotation".to_string(),
DRAFT202012_FORMAT_ANNOTATION.clone(),
)
.with_document(
"https://json-schema.org/draft/2020-12/meta/content".to_string(),
DRAFT202012_CONTENT.clone(),
)
.with_document(
"https://json-schema.org/draft/2020-12/schema".to_string(),
DRAFT202012.clone(),
)
.to_owned()
.compile(&TOKEN_META_JSON_V0)
.expect("Invalid data contract schema");
}
Loading