Fabrica Blog

Simple guides introducing Fabrica with hands-on examples.

View the Project on GitHub OpenCHAMI/fabrica

apis.yaml reference

The apis.yaml file is the single source of truth for API groups, hub/spoke versions, and imported types. It lives in the project root, next to .fabrica.yaml, and is created by fabrica init.

File shape

groups:
  - name: infra.example.io       # API group
    storageVersion: v1           # Hub (storage) version
    versions:                    # All exposed versions, hub included
      - v1alpha1
      - v1beta1
      - v1
    resources:                   # Populated automatically by `fabrica add resource`
      - Device
    imports:                     # Optional: reuse external Spec/Status types
      - module: github.com/org/pkg
        tag: v1.0.0
        packages:
          - path: api/types
            expose:
              - kind: Device
                specFrom: github.com/org/pkg/api/types.DeviceSpec
                statusFrom: github.com/org/pkg/api/types.DeviceStatus

Fields:

Initial workflow

1) fabrica init <name> [--group <group>] [--versions v1alpha1,v1]

Evolving your API

Command expectations