Skip to content

Configuration Reference ​

diid-push uses a YAML configuration file (by default diid.yaml) to declare integrations, schedules, and API specification sources.

An annotated reference template can be found in examples/diid.example.yaml.

Schema Overview ​

KeyRequiredDescription
apiVersionYesMust be set to diid.dev/v1beta1
kindNoSyncConfig
integrationsNoArray of external integration authentication configs
schedulesNoArray of named cron schedule expressions
specsYesArray of specification sources to synchronize

Environment Variable Expansion ​

All string fields support ${VAR_NAME} syntax for expanding process environment variables at runtime. Undefined variables expand to empty strings.

Example:

yaml
specs:
  - name: payments-api
    type: file
    pushToken: ${DIID_PAYMENTS_TOKEN}
    file:
      path: ./openapi.yaml

Integrations ​

Integrations provide shared authentication parameters referenced by source specifications.

Backstage Integration (type: backstage) ​

yaml
integrations:
  - name: backstage-internal
    type: backstage
    baseUrl: https://backstage.internal.example.com
    auth:
      type: static-token
      token: ${BACKSTAGE_TOKEN}
FieldRequiredDescription
nameYesUnique identifier referenced by specs[].backstage.integrationRef
typeYesMust be backstage
baseUrlYesBase URL of the Backstage API endpoint
auth.typeNoAuthentication type (static-token)
auth.tokenNoBearer token value

GitHub Integration (type: github) ​

yaml
integrations:
  - name: github-org
    type: github
    auth:
      type: token
      token: ${GITHUB_TOKEN}
FieldRequiredDescription
nameYesUnique identifier referenced by specs[].github.integrationRef
typeYesMust be github
auth.typeNoAuthentication type (token)
auth.tokenNoGitHub personal access token or fine-grained repository token

Schedules ​

Schedules define named cron expressions used by specs.

yaml
schedules:
  - name: hourly
    cron: "0 0 * * * *"
  - name: every-15min
    cron: "0 */15 * * * *"
FieldRequiredDescription
nameYesUnique identifier referenced by specs[].scheduleRef
cronYesStandard 5-field cron expression

Specs without a scheduleRef execute once during daemon initialization, or immediately when using --once.


Specs ​

Each item in specs defines an API specification source and target push credentials.

Common Spec Fields ​

FieldRequiredDescription
nameYesUnique human-readable spec identifier
typeYesSource driver (http, file, backstage, github)
pushTokenYesdiid project push token
scheduleRefNoReference to a schedule defined in schedules

Source Drivers ​

HTTP Driver (type: http) ​

Retrieves spec content via HTTP or HTTPS.

yaml
specs:
  - name: payments-api
    type: http
    pushToken: ${DIID_PAYMENTS_TOKEN}
    scheduleRef: hourly
    http:
      url: http://payments.svc.cluster.local/openapi.json
      headers:
        Authorization: "Bearer ${PAYMENTS_TOKEN}"
      timeout: 30s
      skipTlsVerify: false
FieldRequiredDescription
urlYesTarget HTTP/HTTPS endpoint
headersNoKey-value map of HTTP request headers
timeoutNoTimeout duration string (default 30s)
skipTlsVerifyNoDisable TLS certificate verification (default false)

Note: HTTP redirects are intentionally disabled.

File Driver (type: file) ​

Reads spec content from a local disk file.

yaml
specs:
  - name: orders-api
    type: file
    pushToken: ${DIID_ORDERS_TOKEN}
    file:
      path: ./specs/orders-openapi.yaml
FieldRequiredDescription
pathYesAbsolute or relative file path

Backstage Driver (type: backstage) ​

Fetches spec content from a Backstage entity catalog definition (spec.definition).

yaml
specs:
  - name: inventory-api
    type: backstage
    pushToken: ${DIID_INVENTORY_TOKEN}
    scheduleRef: hourly
    backstage:
      integrationRef: backstage-internal
      entityRef: "api:default/inventory-service"
FieldRequiredDescription
integrationRefYesReference to an integration named under integrations
entityRefYesBackstage entity reference (kind:namespace/name)

Entity reference parsing defaults:

  • Default namespace: default
  • Default kind: component

GitHub Driver (type: github) ​

Downloads raw spec files from GitHub using the Repository Contents API.

yaml
specs:
  - name: notifications-api
    type: github
    pushToken: ${DIID_NOTIFICATIONS_TOKEN}
    scheduleRef: every-15min
    github:
      integrationRef: github-org
      owner: my-org
      repo: notifications-service
      path: docs/openapi.yaml
      ref: main
FieldRequiredDescription
integrationRefYesReference to an integration named under integrations
ownerYesGitHub user or organization name
repoYesRepository name
pathYesRepository file path
refNoGit ref (branch, tag, or commit SHA; defaults to default branch)