openapi: "3.0.3"
info:
  title: "Orders API (single-schema generator comparison)"
  version: "1.0.0"
  description: "This fixture has a single top-level schema, which is exactly the case where a per-schema faker is enough. The refund amount has to be positive, and the generator cannot know that without reading the CHECK constraint. A per-schema faker emits refunds with order ids that match no order row. The comparison is fair precisely because the fixture is small enough that both tools can be run on it."
paths: {}
x-domain-id: "alt_orders"
x-dialect: "postgres"
components:
  schemas:
    orders:
      type: "object"
      x-primary-key: "id"
      required: ["id", "customer_email", "status", "amount"]
      properties:
        id:
          type: "string"
          format: "uuid"
        customer_email:
          type: "string"
          format: "email"
        status:
          type: "string"
          enum: ["placed", "paid", "shipped"]
        amount:
          type: "integer"
          minimum: 0
    refunds:
      type: "object"
      x-primary-key: "id"
      required: ["id", "order_id", "amount", "reason"]
      properties:
        id:
          type: "string"
          format: "uuid"
        order_id:
          $ref: "#/components/schemas/orders"
        amount:
          type: "integer"
          minimum: 1
        reason:
          type: "string"
