openapi: "3.0.3"
info:
  title: "Consumer-driven contract fixture"
  version: "1.0.0"
  description: "The verified_at timestamp is null for a broken contract, which is different from a missing column. The status enum has three members and a broken contract is a normal stored value. The provider column is free text so both approaches store the same thing there. The consumer name is unique, so the two approaches differ in row count as soon as more than one fixture is generated."
paths: {}
x-domain-id: "cmp_pact"
x-dialect: "postgres"
components:
  schemas:
    consumers:
      type: "object"
      x-primary-key: "id"
      required: ["id", "name"]
      properties:
        id:
          type: "string"
          format: "uuid"
        name:
          type: "string"
          x-unique: true
    contracts:
      type: "object"
      x-primary-key: "id"
      required: ["id", "consumer_id", "provider", "status"]
      properties:
        id:
          type: "string"
          format: "uuid"
        consumer_id:
          $ref: "#/components/schemas/consumers"
        provider:
          type: "string"
        status:
          type: "string"
          enum: ["pending", "verified", "broken"]
        verified_at:
          type: "string"
          format: "date-time"
          nullable: true
