diff --git a/cyclonedx/output/__init__.py b/cyclonedx/output/__init__.py index 64265d97..050ee622 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_4 +LATEST_SUPPORTED_SCHEMA_VERSION = SchemaVersion.V1_4 class BaseOutput(ABC): @@ -105,7 +105,7 @@ def output_to_file(self, filename: str, allow_overwrite: bool = False) -> None: def get_instance(bom: Bom, output_format: OutputFormat = OutputFormat.XML, - schema_version: SchemaVersion = DEFAULT_SCHEMA_VERSION) -> BaseOutput: + schema_version: SchemaVersion = LATEST_SUPPORTED_SCHEMA_VERSION) -> BaseOutput: """ Helper method to quickly get the correct output class/formatter. diff --git a/docs/outputting.rst b/docs/outputting.rst index 2b9d7028..50e800d1 100644 --- a/docs/outputting.rst +++ b/docs/outputting.rst @@ -23,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 in XML at Schema Version 1.4. +By default output will be in XML at latest supported schema version - see :py:mod:`cyclonedx.output.LATEST_SUPPORTED_SCHEMA_VERSION`. Supported CycloneDX Schema Versions ----------------------------------- @@ -34,12 +34,12 @@ This library supports the following schema versions: * 1.1 (XML) - `(note, 1.1 schema version has no support for JSON)` * 1.2 (XML, JSON) * 1.3 (XML, JSON) -* 1.4 (XML, JSON) +* 1.4 (XML, JSON) - the latest supported schema version Outputting to JSON ------------------ -The below example relies on the default schema version being 1.4, but sets the output format to JSON. Output is returned +The below example relies on the latest schema version, but sets the output format to JSON. Output is returned as a ``str``. .. code-block:: python