openapi: "3.0.3"
info:
  title: "Webhook payload fuzzing fixture"
  version: "1.0.0"
  description: "Fuzzing a webhook means mutating a payload that was already valid, so the endpoint and delivery rows are the fixed part of the fixture. The payload column is json, so a mutation that removes a required key is caught by the validator rather than by Postgres. The status enum has three members and the failed member is the interesting one after a fuzz run. The secret is what the mutation must not leak, so it stays constant across the run."
paths: {}
x-domain-id: "prob_fuzz"
x-dialect: "postgres"
components:
  schemas:
    endpoints:
      type: "object"
      x-primary-key: "id"
      required: ["id", "url", "secret"]
      properties:
        id:
          type: "string"
          format: "uuid"
        url:
          type: "string"
          format: "uri"
        secret:
          type: "string"
    deliveries:
      type: "object"
      x-primary-key: "id"
      required: ["id", "endpoint_id", "payload", "status"]
      properties:
        id:
          type: "string"
          format: "uuid"
        endpoint_id:
          $ref: "#/components/schemas/endpoints"
        payload:
          type: "object"
        status:
          type: "string"
          enum: ["pending", "delivered", "failed"]
