Skip to content

Commit 9b6ce4b

Browse files
authored
BREAKING CHANGE: Updated default schema version to 1.4 from 1.3 (#164)
Signed-off-by: Paul Horton <[email protected]>
1 parent 2938a6c commit 9b6ce4b

File tree

9 files changed

+106
-8
lines changed

9 files changed

+106
-8
lines changed

cyclonedx/output/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def to_version(self) -> str:
5050
return f'{self.value[1]}.{self.value[5]}'
5151

5252

53-
DEFAULT_SCHEMA_VERSION = SchemaVersion.V1_3
53+
DEFAULT_SCHEMA_VERSION = SchemaVersion.V1_4
5454

5555

5656
class BaseOutput(ABC):

docs/architecture.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
.. # Licensed under the Apache License, Version 2.0 (the "License");
2+
# you may not use this file except in compliance with the License.
3+
# You may obtain a copy of the License at
4+
#
5+
# http://www.apache.org/licenses/LICENSE-2.0
6+
#
7+
# Unless required by applicable law or agreed to in writing, software
8+
# distributed under the License is distributed on an "AS IS" BASIS,
9+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10+
# See the License for the specific language governing permissions and
11+
# limitations under the License.
12+
#
13+
# SPDX-License-Identifier: Apache-2.0
14+
115
Architecture
216
============
317

docs/changelog.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,15 @@
1+
.. # Licensed under the Apache License, Version 2.0 (the "License");
2+
# you may not use this file except in compliance with the License.
3+
# You may obtain a copy of the License at
4+
#
5+
# http://www.apache.org/licenses/LICENSE-2.0
6+
#
7+
# Unless required by applicable law or agreed to in writing, software
8+
# distributed under the License is distributed on an "AS IS" BASIS,
9+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10+
# See the License for the specific language governing permissions and
11+
# limitations under the License.
12+
#
13+
# SPDX-License-Identifier: Apache-2.0
14+
115
.. mdinclude:: ../CHANGELOG.md

docs/install.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
.. # Licensed under the Apache License, Version 2.0 (the "License");
2+
# you may not use this file except in compliance with the License.
3+
# You may obtain a copy of the License at
4+
#
5+
# http://www.apache.org/licenses/LICENSE-2.0
6+
#
7+
# Unless required by applicable law or agreed to in writing, software
8+
# distributed under the License is distributed on an "AS IS" BASIS,
9+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10+
# See the License for the specific language governing permissions and
11+
# limitations under the License.
12+
#
13+
# SPDX-License-Identifier: Apache-2.0
14+
115
Installation
216
============
317

docs/modelling.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
.. # Licensed under the Apache License, Version 2.0 (the "License");
2+
# you may not use this file except in compliance with the License.
3+
# You may obtain a copy of the License at
4+
#
5+
# http://www.apache.org/licenses/LICENSE-2.0
6+
#
7+
# Unless required by applicable law or agreed to in writing, software
8+
# distributed under the License is distributed on an "AS IS" BASIS,
9+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10+
# See the License for the specific language governing permissions and
11+
# limitations under the License.
12+
#
13+
# SPDX-License-Identifier: Apache-2.0
14+
115
Modelling
216
=========
317

docs/outputting.rst

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
.. # Licensed under the Apache License, Version 2.0 (the "License");
2+
# you may not use this file except in compliance with the License.
3+
# You may obtain a copy of the License at
4+
#
5+
# http://www.apache.org/licenses/LICENSE-2.0
6+
#
7+
# Unless required by applicable law or agreed to in writing, software
8+
# distributed under the License is distributed on an "AS IS" BASIS,
9+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10+
# See the License for the specific language governing permissions and
11+
# limitations under the License.
12+
#
13+
# SPDX-License-Identifier: Apache-2.0
14+
115
Outputting
216
==========
317

@@ -9,7 +23,7 @@ We provide two helper methods:
923
* Output to string (for you to do with as you require)
1024
* Output directly to a filename you provide
1125

12-
The default output will be XML at Schema Version 1.3.
26+
The default output will be in XML at Schema Version 1.4.
1327

1428
Supported CycloneDX Schema Versions
1529
-----------------------------------
@@ -25,7 +39,7 @@ This library supports the following schema versions:
2539
Outputting to JSON
2640
------------------
2741

28-
The below example relies on the default schema version being 1.3, but sets the output format to JSON. Output is returned
42+
The below example relies on the default schema version being 1.4, but sets the output format to JSON. Output is returned
2943
as a ``str``.
3044

3145
.. code-block:: python

docs/schema-support.rst

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
.. # Licensed under the Apache License, Version 2.0 (the "License");
2+
# you may not use this file except in compliance with the License.
3+
# You may obtain a copy of the License at
4+
#
5+
# http://www.apache.org/licenses/LICENSE-2.0
6+
#
7+
# Unless required by applicable law or agreed to in writing, software
8+
# distributed under the License is distributed on an "AS IS" BASIS,
9+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10+
# See the License for the specific language governing permissions and
11+
# limitations under the License.
12+
#
13+
# SPDX-License-Identifier: Apache-2.0
14+
115
Schema Support
216
==============
317

@@ -14,7 +28,7 @@ supported in prior versions of the CycloneDX schema.
1428
+----------------------------+---------------+---------------------------------------------------------------------------------------------------+
1529
| ``bom[@serialNumber]`` | Yes | |
1630
+----------------------------+---------------+---------------------------------------------------------------------------------------------------+
17-
| ``bom.metadata`` | Yes (partial) | Not supported: ``authors``, ``manufacture``, ``supplier``, ``licenses``, ``properties``. |
31+
| ``bom.metadata`` | Yes | |
1832
+----------------------------+---------------+---------------------------------------------------------------------------------------------------+
1933
| ``bom.components`` | Yes | Not supported: ``modified`` (as it is deprecated), ``signature``. |
2034
+----------------------------+---------------+---------------------------------------------------------------------------------------------------+

docs/support.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
.. # Licensed under the Apache License, Version 2.0 (the "License");
2+
# you may not use this file except in compliance with the License.
3+
# You may obtain a copy of the License at
4+
#
5+
# http://www.apache.org/licenses/LICENSE-2.0
6+
#
7+
# Unless required by applicable law or agreed to in writing, software
8+
# distributed under the License is distributed on an "AS IS" BASIS,
9+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10+
# See the License for the specific language governing permissions and
11+
# limitations under the License.
12+
#
13+
# SPDX-License-Identifier: Apache-2.0
14+
115
Support
216
=======
317

tests/test_output_generic.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
from cyclonedx.model.bom import Bom
2323
from cyclonedx.model.component import Component
2424
from cyclonedx.output import get_instance, OutputFormat, SchemaVersion
25-
from cyclonedx.output.xml import XmlV1Dot3
25+
from cyclonedx.output.xml import XmlV1Dot3, XmlV1Dot4
2626

2727

2828
class TestOutputGeneric(TestCase):
@@ -34,11 +34,11 @@ def setUpClass(cls) -> None:
3434

3535
def test_get_instance_default(self) -> None:
3636
i = get_instance(bom=TestOutputGeneric._bom)
37-
self.assertIsInstance(i, XmlV1Dot3)
37+
self.assertIsInstance(i, XmlV1Dot4)
3838

39-
def test_get_instance_xml(self) -> None:
39+
def test_get_instance_xml_default(self) -> None:
4040
i = get_instance(bom=TestOutputGeneric._bom, output_format=OutputFormat.XML)
41-
self.assertIsInstance(i, XmlV1Dot3)
41+
self.assertIsInstance(i, XmlV1Dot4)
4242

4343
def test_get_instance_xml_v1_3(self) -> None:
4444
i = get_instance(bom=TestOutputGeneric._bom, output_format=OutputFormat.XML, schema_version=SchemaVersion.V1_3)

0 commit comments

Comments
 (0)