diff --git a/cyclonedx/output/__init__.py b/cyclonedx/output/__init__.py index 37211e81..64265d97 100644 --- a/cyclonedx/output/__init__.py +++ b/cyclonedx/output/__init__.py @@ -50,7 +50,7 @@ def to_version(self) -> str: return f'{self.value[1]}.{self.value[5]}' -DEFAULT_SCHEMA_VERSION = SchemaVersion.V1_3 +DEFAULT_SCHEMA_VERSION = SchemaVersion.V1_4 class BaseOutput(ABC): diff --git a/docs/architecture.rst b/docs/architecture.rst index 833989a6..3cf16d7c 100644 --- a/docs/architecture.rst +++ b/docs/architecture.rst @@ -1,3 +1,17 @@ +.. # Licensed under the Apache License, Version 2.0 (the "License"); + # you may not use this file except in compliance with the License. + # You may obtain a copy of the License at + # + # http://www.apache.org/licenses/LICENSE-2.0 + # + # Unless required by applicable law or agreed to in writing, software + # distributed under the License is distributed on an "AS IS" BASIS, + # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + # See the License for the specific language governing permissions and + # limitations under the License. + # + # SPDX-License-Identifier: Apache-2.0 + Architecture ============ diff --git a/docs/changelog.rst b/docs/changelog.rst index 5ec4a0ec..5941b19b 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -1 +1,15 @@ +.. # Licensed under the Apache License, Version 2.0 (the "License"); + # you may not use this file except in compliance with the License. + # You may obtain a copy of the License at + # + # http://www.apache.org/licenses/LICENSE-2.0 + # + # Unless required by applicable law or agreed to in writing, software + # distributed under the License is distributed on an "AS IS" BASIS, + # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + # See the License for the specific language governing permissions and + # limitations under the License. + # + # SPDX-License-Identifier: Apache-2.0 + .. mdinclude:: ../CHANGELOG.md \ No newline at end of file diff --git a/docs/install.rst b/docs/install.rst index ed72965d..43123c61 100644 --- a/docs/install.rst +++ b/docs/install.rst @@ -1,3 +1,17 @@ +.. # Licensed under the Apache License, Version 2.0 (the "License"); + # you may not use this file except in compliance with the License. + # You may obtain a copy of the License at + # + # http://www.apache.org/licenses/LICENSE-2.0 + # + # Unless required by applicable law or agreed to in writing, software + # distributed under the License is distributed on an "AS IS" BASIS, + # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + # See the License for the specific language governing permissions and + # limitations under the License. + # + # SPDX-License-Identifier: Apache-2.0 + Installation ============ diff --git a/docs/modelling.rst b/docs/modelling.rst index 68626f4b..119f9b8f 100644 --- a/docs/modelling.rst +++ b/docs/modelling.rst @@ -1,3 +1,17 @@ +.. # Licensed under the Apache License, Version 2.0 (the "License"); + # you may not use this file except in compliance with the License. + # You may obtain a copy of the License at + # + # http://www.apache.org/licenses/LICENSE-2.0 + # + # Unless required by applicable law or agreed to in writing, software + # distributed under the License is distributed on an "AS IS" BASIS, + # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + # See the License for the specific language governing permissions and + # limitations under the License. + # + # SPDX-License-Identifier: Apache-2.0 + Modelling ========= diff --git a/docs/outputting.rst b/docs/outputting.rst index a8f2ee01..2b9d7028 100644 --- a/docs/outputting.rst +++ b/docs/outputting.rst @@ -1,3 +1,17 @@ +.. # Licensed under the Apache License, Version 2.0 (the "License"); + # you may not use this file except in compliance with the License. + # You may obtain a copy of the License at + # + # http://www.apache.org/licenses/LICENSE-2.0 + # + # Unless required by applicable law or agreed to in writing, software + # distributed under the License is distributed on an "AS IS" BASIS, + # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + # See the License for the specific language governing permissions and + # limitations under the License. + # + # SPDX-License-Identifier: Apache-2.0 + Outputting ========== @@ -9,7 +23,7 @@ We provide two helper methods: * Output to string (for you to do with as you require) * Output directly to a filename you provide -The default output will be XML at Schema Version 1.3. +The default output will be in XML at Schema Version 1.4. Supported CycloneDX Schema Versions ----------------------------------- @@ -25,7 +39,7 @@ This library supports the following schema versions: Outputting to JSON ------------------ -The below example relies on the default schema version being 1.3, but sets the output format to JSON. Output is returned +The below example relies on the default schema version being 1.4, but sets the output format to JSON. Output is returned as a ``str``. .. code-block:: python diff --git a/docs/schema-support.rst b/docs/schema-support.rst index db648597..bd317868 100644 --- a/docs/schema-support.rst +++ b/docs/schema-support.rst @@ -1,3 +1,17 @@ +.. # Licensed under the Apache License, Version 2.0 (the "License"); + # you may not use this file except in compliance with the License. + # You may obtain a copy of the License at + # + # http://www.apache.org/licenses/LICENSE-2.0 + # + # Unless required by applicable law or agreed to in writing, software + # distributed under the License is distributed on an "AS IS" BASIS, + # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + # See the License for the specific language governing permissions and + # limitations under the License. + # + # SPDX-License-Identifier: Apache-2.0 + Schema Support ============== @@ -14,7 +28,7 @@ supported in prior versions of the CycloneDX schema. +----------------------------+---------------+---------------------------------------------------------------------------------------------------+ | ``bom[@serialNumber]`` | Yes | | +----------------------------+---------------+---------------------------------------------------------------------------------------------------+ -| ``bom.metadata`` | Yes (partial) | Not supported: ``authors``, ``manufacture``, ``supplier``, ``licenses``, ``properties``. | +| ``bom.metadata`` | Yes | | +----------------------------+---------------+---------------------------------------------------------------------------------------------------+ | ``bom.components`` | Yes | Not supported: ``modified`` (as it is deprecated), ``signature``. | +----------------------------+---------------+---------------------------------------------------------------------------------------------------+ diff --git a/docs/support.rst b/docs/support.rst index 62b441a2..48773249 100644 --- a/docs/support.rst +++ b/docs/support.rst @@ -1,3 +1,17 @@ +.. # Licensed under the Apache License, Version 2.0 (the "License"); + # you may not use this file except in compliance with the License. + # You may obtain a copy of the License at + # + # http://www.apache.org/licenses/LICENSE-2.0 + # + # Unless required by applicable law or agreed to in writing, software + # distributed under the License is distributed on an "AS IS" BASIS, + # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + # See the License for the specific language governing permissions and + # limitations under the License. + # + # SPDX-License-Identifier: Apache-2.0 + Support ======= diff --git a/tests/test_output_generic.py b/tests/test_output_generic.py index 5d8d9441..b0be42e0 100644 --- a/tests/test_output_generic.py +++ b/tests/test_output_generic.py @@ -22,7 +22,7 @@ from cyclonedx.model.bom import Bom from cyclonedx.model.component import Component from cyclonedx.output import get_instance, OutputFormat, SchemaVersion -from cyclonedx.output.xml import XmlV1Dot3 +from cyclonedx.output.xml import XmlV1Dot3, XmlV1Dot4 class TestOutputGeneric(TestCase): @@ -34,11 +34,11 @@ def setUpClass(cls) -> None: def test_get_instance_default(self) -> None: i = get_instance(bom=TestOutputGeneric._bom) - self.assertIsInstance(i, XmlV1Dot3) + self.assertIsInstance(i, XmlV1Dot4) - def test_get_instance_xml(self) -> None: + def test_get_instance_xml_default(self) -> None: i = get_instance(bom=TestOutputGeneric._bom, output_format=OutputFormat.XML) - self.assertIsInstance(i, XmlV1Dot3) + self.assertIsInstance(i, XmlV1Dot4) def test_get_instance_xml_v1_3(self) -> None: i = get_instance(bom=TestOutputGeneric._bom, output_format=OutputFormat.XML, schema_version=SchemaVersion.V1_3)