openapi: "3.0.3"
info:
  title: "Webhook sample payloads"
  version: "1.0.0"
  description: "The valid flag is what separates the positive sample from the deliberately broken one. Every sample payload row has to reference a subscription, so the negative samples still need a valid parent. The comparison is between a tool that only samples valid payloads and one that emits both. The body column is json, so a payload written as a quoted string is stored as a JSON string rather than an object."
paths: {}
x-domain-id: "alt_webhook_samples"
x-dialect: "postgres"
components:
  schemas:
    subscriptions:
      type: "object"
      x-primary-key: "id"
      required: ["id", "url", "secret"]
      properties:
        id:
          type: "string"
          format: "uuid"
        url:
          type: "string"
          format: "uri"
        secret:
          type: "string"
    sample_payloads:
      type: "object"
      x-primary-key: "id"
      required: ["id", "subscription_id", "event_type", "body", "valid"]
      properties:
        id:
          type: "string"
          format: "uuid"
        subscription_id:
          $ref: "#/components/schemas/subscriptions"
        event_type:
          type: "string"
        body:
          type: "object"
        valid:
          type: "integer"
          minimum: 0
          maximum: 1
