openapi: "3.0.3"
info:
  title: "Petstore-style client fixture"
  version: "1.0.0"
  description: "The pet status enum is the field that every OpenAPI tutorial uses to demonstrate an enum. The photo_urls column is a space-separated list rather than a JSON array, which is a deliberate oddity. The category reference is the part that breaks when a client library is asked to produce database rows. A code generator emits a client, not rows, so the comparison is about what artefact each tool produces."
paths: {}
x-domain-id: "cmp_petstore"
x-dialect: "postgres"
components:
  schemas:
    categories:
      type: "object"
      x-primary-key: "id"
      required: ["id", "name"]
      properties:
        id:
          type: "integer"
        name:
          type: "string"
          x-unique: true
    pets:
      type: "object"
      x-primary-key: "id"
      required: ["id", "category_id", "name", "status", "photo_urls"]
      properties:
        id:
          type: "integer"
        category_id:
          $ref: "#/components/schemas/categories"
        name:
          type: "string"
        status:
          type: "string"
          enum: ["available", "pending", "sold"]
        photo_urls:
          type: "string"
