Skip to content

Commit 5d8a486

Browse files
committed
wip
1 parent 313b638 commit 5d8a486

File tree

4 files changed

+13
-5
lines changed

4 files changed

+13
-5
lines changed

rust/catalyst-signed-doc-macro/src/types_consts.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ pub(crate) fn catalyst_signed_documents_types_consts_impl() -> anyhow::Result<To
1010

1111
let mut consts_definitions = Vec::new();
1212
for (doc_name, doc_spec) in spec.docs {
13+
if doc_spec.draft {
14+
continue;
15+
}
1316
let const_type_name_ident = doc_name.ident();
1417
let doc_name = doc_name.name();
1518
let type_uuid = doc_spec.doc_type;
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
//! 'copyright' field definition
22
33
#[derive(serde::Deserialize)]
4-
pub struct Copyright {
5-
pub versions: Vec<Version>,
4+
pub(crate) struct Copyright {
5+
pub(crate) versions: Vec<Version>,
66
}
77

88
#[derive(serde::Deserialize)]
9-
pub struct Version {
10-
pub version: String,
9+
pub(crate) struct Version {
10+
pub(crate) version: String,
1111
}

rust/catalyst-signed-doc-spec/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ build_info_lib::build_info!(pub(crate) fn build_info);
2020
#[derive(serde::Deserialize)]
2121
pub struct CatalystSignedDocSpec {
2222
pub docs: HashMap<DocumentName, DocSpec>,
23-
pub copyright: Copyright,
23+
copyright: Copyright,
2424
}
2525

2626
// A thin wrapper over the string document name values
@@ -60,6 +60,7 @@ impl DocumentName {
6060
/// Specific document type definition
6161
#[derive(serde::Deserialize)]
6262
pub struct DocSpec {
63+
pub draft: bool,
6364
#[serde(rename = "type")]
6465
pub doc_type: String,
6566
pub headers: Headers,

rust/signed_doc/src/validator/rules/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,10 @@ impl Rules {
118118

119119
let mut doc_rules = Vec::new();
120120
for doc_spec in spec.docs.values() {
121+
if doc_spec.draft {
122+
continue;
123+
}
124+
121125
let rules = Self {
122126
id: IdRule,
123127
ver: VerRule,

0 commit comments

Comments
 (0)