Skip to content

Commit 20ce3c4

Browse files
authored
Merge pull request #635 from pvdrz/deduplicate-modules
Deduplicate specs modules
2 parents 943b1d7 + ded762e commit 20ce3c4

File tree

62 files changed

+110
-3200
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+110
-3200
lines changed

cyclonedx-bom/src/specs/v1_3/code.rs renamed to cyclonedx-bom/src/specs/common/code.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use crate::{
2020
errors::XmlReadError,
2121
external_models::{date_time::DateTime, normalized_string::NormalizedString, uri::Uri},
2222
models,
23-
specs::v1_3::attached_text::AttachedText,
23+
specs::common::attached_text::AttachedText,
2424
utilities::{convert_optional, convert_optional_vec, convert_vec},
2525
xml::{
2626
attribute_or_error, read_lax_validation_list_tag, read_lax_validation_tag, read_list_tag,
@@ -872,7 +872,7 @@ impl FromXml for Source {
872872
#[cfg(test)]
873873
pub(crate) mod test {
874874
use crate::{
875-
specs::v1_3::attached_text::test::{corresponding_attached_text, example_attached_text},
875+
specs::common::attached_text::test::{corresponding_attached_text, example_attached_text},
876876
xml::test::{read_element_from_string, write_element_to_string},
877877
};
878878

cyclonedx-bom/src/specs/v1_3/external_reference.rs renamed to cyclonedx-bom/src/specs/common/external_reference.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ use crate::{
2828
models,
2929
utilities::{convert_optional, convert_vec},
3030
};
31-
use crate::{specs::v1_3::hash::Hashes, xml::to_xml_write_error};
31+
use crate::{specs::common::hash::Hashes, xml::to_xml_write_error};
3232
use serde::{Deserialize, Serialize};
3333
use xml::{reader, writer::XmlEvent};
3434

@@ -213,7 +213,7 @@ impl FromXml for ExternalReference {
213213
pub(crate) mod test {
214214
use super::*;
215215
use crate::{
216-
specs::v1_3::hash::test::{corresponding_hashes, example_hashes},
216+
specs::common::hash::test::{corresponding_hashes, example_hashes},
217217
xml::test::{read_element_from_string, write_element_to_string},
218218
};
219219

File renamed without changes.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
pub(crate) mod attached_text;
2+
pub(crate) mod code;
3+
pub(crate) mod dependency;
4+
pub(crate) mod external_reference;
5+
pub(crate) mod hash;
6+
pub(crate) mod organization;
7+
pub(crate) mod property;
8+
pub(crate) mod tool;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
source: cyclonedx-bom/src/specs/v1_4/attached_text.rs
2+
source: cyclonedx-bom/src/specs/common/attached_text.rs
33
expression: xml_output
44
---
55
<?xml version="1.0" encoding="utf-8"?>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
source: cyclonedx-bom/src/specs/v1_4/attached_text.rs
2+
source: cyclonedx-bom/src/specs/common/attached_text.rs
33
expression: xml_output
44
---
55
<?xml version="1.0" encoding="utf-8"?>

0 commit comments

Comments
 (0)