Package-URL Type Definition

Type: object

Schema to specify a Package-URL (PURL) type as a structured definition.

No Additional Properties

JSON schema

Type: constFormat: uri

Contains the URL of the JSON schema for Package-URL type definition.

Specific value: "https://packageurl.org/schemas/purl-type-definition.schema-1.0.json"

PURL type definition id

Type: string

The unique identifier URI for this PURL type definition.

Must match regular expression: ^https:\/\/packageurl\.org/types/[a-z0-9-]+-definition\.json$

PURL type

Type: string

The type string for this Package-URL type.

Must match regular expression: ^[a-z][a-z0-9-\.]+$
Examples:

"maven"
"npm"
"pypi"

Type name

Type: string

The name for this PURL type.


Examples:

"Apache Maven"
"Python Package"

Description

Type: string

The description of this PURL type.

Repository

Type: object

The package repository usage for this PURL type.

No Additional Properties

Use repository

Type: boolean Default: false

true if this PURL type uses a public package repository.

Default repository URL

Type: stringFormat: uri

The default public repository URL for this PURL type

Note

Type: string

Extra note text.

Namespace definition

Type: object

Definition of the namespace component for this PURL type. The PURL namespace component must be required, optional or prohibited for a specific PURL type definition.

Permitted characters in this PURL component

Type: stringFormat: regex

A regular expression (ECMA-262 dialect) defining the 'Permitted characters' for this component of this Package-URL type. If provided, this must be a subset of the 'Permitted characters' defined in the PURL specification.

Case sensitive

Type: boolean Default: true

true if this PURL component is case sensitive. If false, the canonical form must be lowercased.

Normalization rules

Type: array of string

List of rules to normalize this component for this PURL type. These are plain text, unstructured rules as some require programming and cannot be enforced only with a schema. Tools are expected to apply these rules programmatically.

All items must be unique

No Additional Items

Each item of this array must be:

Type: string

Native name

Type: string

The native name of this PURL component in the package ecosystem. For instance, the 'namespace' for the 'maven' type is 'groupId', and 'scope' for the 'npm' PURL type.

Note

Type: string

Extra note text.

Namespace requirement


States that the PURL namespace component is optional, required or prohibited for a PURL type.

Component optional requirement

Type: const

States that this PURL component is optional for a PURL type.

Specific value: "optional"

Component required requirement

Type: const

States that this PURL component is required for a PURL type.

Specific value: "required"

Component prohibited requirement

Type: const

States that this PURL component is prohibited for a PURL type.

Specific value: "prohibited"

Name definition

Type: object

Definition of the name component for this PURL type. The PURL name component is required for all PURL type definitions.

Permitted characters in this PURL component

Type: stringFormat: regex

A regular expression (ECMA-262 dialect) defining the 'Permitted characters' for this component of this Package-URL type. If provided, this must be a subset of the 'Permitted characters' defined in the PURL specification.

Case sensitive

Type: boolean Default: true

true if this PURL component is case sensitive. If false, the canonical form must be lowercased.

Normalization rules

Type: array of string

List of rules to normalize this component for this PURL type. These are plain text, unstructured rules as some require programming and cannot be enforced only with a schema. Tools are expected to apply these rules programmatically.

All items must be unique

No Additional Items

Each item of this array must be:

Type: string

Native name

Type: string

The native name of this PURL component in the package ecosystem. For instance, the 'namespace' for the 'maven' type is 'groupId', and 'scope' for the 'npm' PURL type.

Note

Type: string

Extra note text.

Name component requirement

Type: string

States that the PURL name component is always required.

Specific value: "required"

Version definition

Type: object

Definition of the version component for this PURL type. The PURL version component is optional for a specific PURL type definition.

Permitted characters in this PURL component

Type: stringFormat: regex

A regular expression (ECMA-262 dialect) defining the 'Permitted characters' for this component of this Package-URL type. If provided, this must be a subset of the 'Permitted characters' defined in the PURL specification.

Case sensitive

Type: boolean Default: true

true if this PURL component is case sensitive. If false, the canonical form must be lowercased.

Normalization rules

Type: array of string

List of rules to normalize this component for this PURL type. These are plain text, unstructured rules as some require programming and cannot be enforced only with a schema. Tools are expected to apply these rules programmatically.

All items must be unique

No Additional Items

Each item of this array must be:

Type: string

Native name

Type: string

The native name of this PURL component in the package ecosystem. For instance, the 'namespace' for the 'maven' type is 'groupId', and 'scope' for the 'npm' PURL type.

Note

Type: string

Extra note text.

Version requirement

Type: string

States that the PURL version is optional.

Specific value: "optional"

Qualifiers definition

Type: array of object

Definition of the qualifiers specific to this PURL type. The PURL qualifiers component is optional for a specific PURL type, but a qualifiers key or keys may be required for a specific PURL type.

All items must be unique

No Additional Items

Each item of this array must be:

Qualifiers definition

Type: object

The definition of a qualifier specific to this PURL type.

No Additional Properties

Qualifier key

Type: string

The key for the qualifier.

Qualifier key requirement


States that a PURL qualifier key is optional or required for a PURL type.

Component optional requirement

Type: const

States that this PURL component is optional for a PURL type.

Specific value: "optional"

Component required requirement

Type: const

States that this PURL component is required for a PURL type.

Specific value: "required"

Description

Type: string

The description of this qualifier.

Default value

Type: string

The optional default value of this qualifier if not provided.

Native name

Type: string

The equivalent native name for this qualifier key.

Subpath definition

Type: object

The definition for the subpath for this PURL type. The PURL subpath component is optional for a specific PURL type definition.

Permitted characters in this PURL component

Type: stringFormat: regex

A regular expression (ECMA-262 dialect) defining the 'Permitted characters' for this component of this Package-URL type. If provided, this must be a subset of the 'Permitted characters' defined in the PURL specification.

Case sensitive

Type: boolean Default: true

true if this PURL component is case sensitive. If false, the canonical form must be lowercased.

Normalization rules

Type: array of string

List of rules to normalize this component for this PURL type. These are plain text, unstructured rules as some require programming and cannot be enforced only with a schema. Tools are expected to apply these rules programmatically.

All items must be unique

No Additional Items

Each item of this array must be:

Type: string

Native name

Type: string

The native name of this PURL component in the package ecosystem. For instance, the 'namespace' for the 'maven' type is 'groupId', and 'scope' for the 'npm' PURL type.

Note

Type: string

Extra note text.

Subpath requirement

Type: string

States that the PURL subpath is optional.

Specific value: "optional"

PURL examples

Type: array of string

Example of valid, canonical PURLs for this package type.

Must contain a minimum of 1 items

All items must be unique

No Additional Items

Each item of this array must be:

Type: string
Must match regular expression: ^pkg:[a-z][a-z0-9-\.]+/.*$

Note

Type: string

Note about this PURL type.

Reference URLs

Type: array of string

Optional list of informational reference URLs about this PURL type.

All items must be unique

No Additional Items

Each item of this array must be:

Type: stringFormat: uri