openapi: "3.0.3"
info:
  title: "YAML document for an anchoring rules table"
  version: "1.0.0"
  description: "The anchoring rules table on this page maps each YAML construct to the column its value ends up in. The default_id foreign key is exactly the case a YAML anchor produces, where one value is shared by several rows. The qty constraint is where a merged YAML key silently overrides a per-row value. The label column shows what happens to a scalar that has no column to land in."
paths: {}
x-domain-id: "spec_yaml"
x-dialect: "postgres"
components:
  schemas:
    defaults:
      type: "object"
      x-primary-key: "id"
      required: ["id", "label"]
      properties:
        id:
          type: "integer"
        label:
          type: "string"
    entities:
      type: "object"
      x-primary-key: "id"
      required: ["id", "label", "default_id", "qty"]
      properties:
        id:
          type: "string"
          format: "uuid"
        label:
          type: "string"
        default_id:
          $ref: "#/components/schemas/defaults"
        qty:
          type: "integer"
          minimum: 0
