Files
reuse-surface/schemas/federation.schema.yaml
tegwick e8797b2e91
Some checks failed
ci / validate-registry (push) Has been cancelled
Complete WP-0010: HTTP remote federation with cache
Extend federation manifest schema for url sources with auth and TTL metadata.
Fetch remote capability indexes over HTTP(S), cache under
registry/federation/cache/, and fall back to stale cache on fetch failure.
Add --refresh flag, seven federation tests, and updated federation docs.
2026-06-15 02:28:44 +02:00

69 lines
1.9 KiB
YAML

$schema: https://json-schema.org/draft/2020-12/schema
$id: https://reuse-surface.local/schemas/federation.schema.yaml
title: Registry Federation Manifest
description: >
Schema for registry/federation/sources.yaml. Describes local filesystem and
remote HTTP capability index sources to compose into a federated index.
type: object
additionalProperties: false
required: [version, domain, collision_policy, sources]
properties:
version:
type: integer
minimum: 1
domain:
type: string
collision_policy:
type: string
enum: [warn, fail]
sources:
type: array
minItems: 1
items:
$ref: '#/$defs/source'
$defs:
source:
type: object
additionalProperties: false
required: [repo, enabled]
properties:
repo:
type: string
minLength: 1
index:
type: string
minLength: 1
description: Local path to capabilities.yaml (repo-relative or ~/...)
url:
type: string
format: uri
pattern: '^https?://'
description: Remote HTTP(S) URL to a capabilities.yaml index
enabled:
type: boolean
required:
type: boolean
default: false
domain:
type: string
description:
type: string
cache_ttl_seconds:
type: integer
minimum: 0
default: 86400
description: >
Seconds to reuse a cached remote index. 0 always refetches when
compose runs (stale cache still used as fallback on fetch failure).
auth_env:
type: string
minLength: 1
description: Environment variable holding an Authorization token or full header value
auth_header:
type: string
minLength: 1
default: Authorization
description: HTTP header name for auth_env value when fetching url sources
oneOf:
- required: [index]
- required: [url]