Skip to content

Commit fe032c0

Browse files
committed
chore: remove unused token meta schema and references
1 parent bab21b3 commit fe032c0

File tree

3 files changed

+0
-304
lines changed
  • packages/rs-dpp
    • schema/meta_schemas/token/v0
    • src
      • data_contract/document_type/schema/enrich_with_base_schema/v0
      • validation/meta_validators

3 files changed

+0
-304
lines changed

packages/rs-dpp/schema/meta_schemas/token/v0/token-meta.json

Lines changed: 0 additions & 245 deletions
This file was deleted.

packages/rs-dpp/src/data_contract/document_type/schema/enrich_with_base_schema/v0/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ use platform_value::{Value, ValueMapHelper};
66
pub const DATA_CONTRACT_SCHEMA_URI_V0: &str =
77
"https://github.com/dashpay/platform/blob/master/packages/rs-dpp/schema/meta_schemas/document/v0/document-meta.json";
88

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

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

packages/rs-dpp/src/validation/meta_validators/mod.rs

Lines changed: 0 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,6 @@ lazy_static! {
4040
"../../../schema/meta_schemas/document/v0/document-meta.json"
4141
))
4242
.unwrap();
43-
static ref TOKEN_META_JSON_V0: Value = serde_json::from_str::<Value>(include_str!(
44-
"../../../schema/meta_schemas/token/v0/token-meta.json"
45-
))
46-
.unwrap();
4743

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

146-
// Compiled version of token meta schema
147-
pub static ref TOKEN_META_SCHEMA_V0: JSONSchema = JSONSchema::options()
148-
.with_keyword(
149-
"byteArray",
150-
|_, _, _| Ok(Box::new(ByteArrayKeyword)),
151-
)
152-
.with_patterns_regex_engine(RegexEngine::Regex(RegexOptions {
153-
size_limit: Some(5 * (1 << 20)),
154-
..Default::default()
155-
}))
156-
.should_ignore_unknown_formats(false)
157-
.should_validate_formats(true)
158-
.with_patterns_regex_engine(RegexEngine::Regex(Default::default()))
159-
.with_draft(Draft::Draft202012)
160-
.with_document(
161-
"https://json-schema.org/draft/2020-12/meta/applicator".to_string(),
162-
DRAFT202012_APPLICATOR.clone(),
163-
)
164-
.with_document(
165-
"https://json-schema.org/draft/2020-12/meta/core".to_string(),
166-
DRAFT202012_CORE.clone(),
167-
)
168-
.with_document(
169-
"https://json-schema.org/draft/2020-12/meta/applicator".to_string(),
170-
DRAFT202012_APPLICATOR.clone(),
171-
)
172-
.with_document(
173-
"https://json-schema.org/draft/2020-12/meta/unevaluated".to_string(),
174-
DRAFT202012_UNEVALUATED.clone(),
175-
)
176-
.with_document(
177-
"https://json-schema.org/draft/2020-12/meta/validation".to_string(),
178-
DRAFT202012_VALIDATION.clone(),
179-
)
180-
.with_document(
181-
"https://json-schema.org/draft/2020-12/meta/meta-data".to_string(),
182-
DRAFT202012_META_DATA.clone(),
183-
)
184-
.with_document(
185-
"https://json-schema.org/draft/2020-12/meta/format-annotation".to_string(),
186-
DRAFT202012_FORMAT_ANNOTATION.clone(),
187-
)
188-
.with_document(
189-
"https://json-schema.org/draft/2020-12/meta/content".to_string(),
190-
DRAFT202012_CONTENT.clone(),
191-
)
192-
.with_document(
193-
"https://json-schema.org/draft/2020-12/schema".to_string(),
194-
DRAFT202012.clone(),
195-
)
196-
.to_owned()
197-
.compile(&TOKEN_META_JSON_V0)
198-
.expect("Invalid data contract schema");
199142
}

0 commit comments

Comments
 (0)