You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(sbom): use annotated data types in Pydantic config
Replace generic `str` fields in SbomSettings and PurlConfig with
Pydantic's built-in types annotated validators to validate input and make the schema
self-documenting.
Added pydantic>=2.12 minimum version for url_preserve_empty_path support.
Changes:
- PurlType: StringConstraints with strip, lowercase, min_length
- UpstreamPurl: AfterValidator with PackageURL.from_string()
- URL fields (namespace, repository_url): use pydantic.AnyUrl directly
- supplier/creators: remain plain str per SPDX 2.3 JSON schema
The @field_validator on PurlConfig.upstream is replaced by the
UpstreamPurl annotated type, moving validation into the type itself.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Closes: #1072
Signed-off-by: Shanmukh Pawan <smoparth@redhat.com>
0 commit comments