Skip to content
Weik.ioDocs
2026.2
Try Weik.io

How the YAML files look

Weik.io 2026.2

Every record you write except an integration is a YAML document with apiVersion, kind, metadata and spec, kept in a project folder in Git. Product page · Video

Watch: How the YAML files look, 3:44

The video walks through the YAML files of a project, from their kinds and metadata to where each file goes in the folder.

On this page

You keep each project’s records in Git as YAML documents, and its integrations as folders of Camel files.

A project folder#

The folder of the finance project looks like this:

the finance folder
finance/
  project.yaml
  variables/
    erp-url.yaml                  the default value
  production/
    variables/
      erp-url.yaml                production's own value
    deployments/
      erp-invoice-export.yaml     which version runs in production
  erp-invoice-export/             an integration: a folder of Camel files
    integration.yaml
    routes/
      fetch-invoices.camel.yaml
    beans/
      InvoiceMapper.java
    application.properties
    README.md
  transfers/
    supplier-invoices.yaml        a file transfer, one document

project.yaml gives the project’s name once, so no file below it has to repeat it.

An integration is a folder, but every other record is a YAML document. Several documents can share a file, separated by ---.

Parts of a document#

finance/variables/erp-url.yaml
apiVersion: weik.io/v1
kind: variable
metadata: { name: erp-url, project: finance }
spec: { value: https://erp-test.example.internal }
Part What it has
apiVersion weik.io/v1
kind What the document describes, such as variable or deployment, from the list in Document kinds
metadata The record’s name and project, and for a value or a deployment of one environment, that environment
spec The fields of the kind

A misspelled field in spec is an error.

Values per environment#

A variable without an environment is the default. A variable with environment in its metadata overrides it in that environment. Each environment’s value is a separate document, so a developer can edit devtest’s values without seeing production’s.

finance/production/variables/erp-url.yaml
apiVersion: weik.io/v1
kind: variable
metadata: { name: erp-url, project: finance, environment: production }
spec: { value: https://erp.example.internal }

Secrets have the same shape, but you set their values with weikio secret set and never write them in a file.

A deployment document contains only which version runs where. To promote, change its version line:

finance/production/deployments/erp-invoice-export.yaml
apiVersion: weik.io/v1
kind: deployment
metadata: { name: erp-invoice-export, project: finance, environment: production }
spec: { version: 1.1.0, state: started }

Which project a command uses#

A command looks for the project in order and uses the first it finds:

  1. metadata.project in the document
  2. The --project flag
  3. The nearest project.yaml above the file
  4. The CLI’s context

When a document and a flag disagree, the command stops with an error.

Names#

Names use lower-case alphanumeric characters and hyphens, such as erp-invoice-export. Variables and secrets follow Camel’s spelling instead, so {{erp.url}} and {{AWS_ACCESS_KEY}} work as written.

In commands, an integration or an API is written <project>/<name>, such as finance/erp-invoice-export, or as the bare name when the project comes from the context.

Check files in your editor#

Weik.io serves a JSON schema for each kind. An editor that runs the YAML language server checks a file against it and marks a misspelled field as you type, before you apply the file. Save the schema of each kind you use into the repository:

Terminal
$ curl -fsS --create-dirs -o schemas/variable.json -H "Authorization: Bearer $WEIKIO_API_KEY" https://hub.example/api/v1/schemas/variable

Then point a file at it with a comment on its first line:

finance/production/variables/erp-url.yaml
# yaml-language-server: $schema=../../../schemas/variable.json
apiVersion: weik.io/v1
kind: variable
metadata: { name: erp-url, project: finance, environment: production }
spec: { value: https://erp.example.internal }

weikio validate -f ./finance checks each file against its kind’s schema on the command line, before anything is built.

Sign in to the live demo

Sign in with the shared viewer account. It can open every screen of the example projects but can't change anything.

E-mail
viewer@demo.weik.io
Password
try-weikio-live-demo
Open the live demo