Skip to content

SBOM: use annotated data types in Pydantic config #1072

@tiran

Description

@tiran

PR #1032 added new Pydantic models that use generic str like upstream_purl and repository_url. Define more specialized, annotated string types with validators to make the schema self-documenting.

Example:

BuildDirectory = typing.Annotated[
    pathlib.Path,
    pydantic.BeforeValidator(_before_builddirectory),
]

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions