openapi: "3.0.3"
info:
  title: "Order status enum API"
  version: "1.0.0"
  description: "Six enum members is enough that the near-miss cases stop being obvious. The near-miss classes are a different case, a trailing space, and a hyphenated variant, and each one is a distinct invalid instance. The status field is what most business rules branch on, so a wrong enum member silently changes behaviour. The unique reference gives the fixture a second constraint to assert against."
paths: {}
x-domain-id: "prob_enums"
x-dialect: "postgres"
components:
  schemas:
    orders:
      type: "object"
      x-primary-key: "id"
      required: ["id", "reference", "status", "total_cents"]
      properties:
        id:
          type: "string"
          format: "uuid"
        reference:
          type: "string"
          x-unique: true
        status:
          type: "string"
          enum: ["placed", "paid", "packed", "shipped", "delivered", "cancelled"]
        total_cents:
          type: "integer"
          minimum: 0
