openapi: "3.0.3"
info:
  title: "Contract test fixture"
  version: "1.0.0"
  description: "The spec name is unique, so a generator that appends a suffix on collision produces a different row count. The format enum is the field that separates an OpenAPI document from a Swagger document. The method enum here is deliberately reduced to two members to keep the fixture readable. The foreign key from endpoints to specs is the part that only a contract-aware tool resolves."
paths: {}
x-domain-id: "cmp_contracts"
x-dialect: "postgres"
components:
  schemas:
    specs:
      type: "object"
      x-primary-key: "id"
      required: ["id", "name", "format"]
      properties:
        id:
          type: "string"
          format: "uuid"
        name:
          type: "string"
          x-unique: true
        format:
          type: "string"
          enum: ["openapi", "swagger"]
    endpoints:
      type: "object"
      x-primary-key: "id"
      required: ["id", "spec_id", "method", "path"]
      properties:
        id:
          type: "string"
          format: "uuid"
        spec_id:
          $ref: "#/components/schemas/specs"
        method:
          type: "string"
          enum: ["get", "post"]
        path:
          type: "string"
