schema

package
v3.25.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 11, 2026 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package schema provides CycloneDX BOM validation against embedded JSON schemas.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SupportedVersions

func SupportedVersions() []string

SupportedVersions returns the list of CDX spec versions supported for validation.

func SupportedVersionsAscending added in v3.25.2

func SupportedVersionsAscending() []string

func ValidateCDX

func ValidateCDX(data []byte) (string, error)

ValidateCDX validates raw CycloneDX JSON against embedded schemas.

Types

type ValidationViolation added in v3.25.2

type ValidationViolation struct {
	Path    string `json:"path"`
	Message string `json:"message"`
}

func ValidateCycloneDX added in v3.25.2

func ValidateCycloneDX(data []byte) (string, []ValidationViolation, error)

ValidateCycloneDX validates raw CycloneDX JSON against the schema declared by bom.specVersion. It mirrors the website upload validator: non-CycloneDX JSON returns specVersion="" with no violations, schema failures return a bounded path/message list, and malformed JSON is fatal.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL