schema

package
v3.33.1 Latest Latest
Warning

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

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

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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