openapi: 3.0.3
info:
  title: Example Webhooks API
  version: 1.0.0
servers:
  - url: https://api.example.com
paths:
  /webhooks/{id}:
    get:
      operationId: getWebhook
      tags: [Webhooks]
      security:
        - bearerAuth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Webhook details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Webhook'
        '401':
          description: Missing or invalid token
        '404':
          description: Webhook not found
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
  schemas:
    Webhook:
      type: object
      required: [id, status]
      properties:
        id:
          type: string
        status:
          type: string
          enum: [active, paused]
