openapi: "3.0.3"
info:
  title: "Contract test fixture for a zero-code walkthrough"
  version: "1.0.0"
  description: "The fixture is deliberately a registry, because a registry is what a contract gate actually reads. The endpoint path is required and free text, which is the field a contract test asserts on. The spec version is a string, not an integer, because versions in the wild carry a v prefix. The method enum has four members and an unknown method is an invalid instance rather than a runtime error."
paths: {}
x-domain-id: "tut_contracts"
x-dialect: "postgres"
components:
  schemas:
    specs:
      type: "object"
      x-primary-key: "id"
      required: ["id", "name", "version"]
      properties:
        id:
          type: "string"
          format: "uuid"
        name:
          type: "string"
          x-unique: true
        version:
          type: "string"
    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", "put", "delete"]
        path:
          type: "string"
