openapi: 3.1.0

info:
  description: 'A microservice for Ons API Webhooks. '
  title: Ons API Webhooks
  version: latest
webhooks:
  /events:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Event"
        required: true
      responses:
        "200":
          description: OK
      tags:
        - Open API Specification
components:
  schemas:
    Event:
      type: object
      properties:
        customerCode:
           type: string
           example: TE1002
        eventType:
          type: string
          enum:
            - CREATE
            - UPDATE
            - DELETE
            - CUSTOM
        id:
          type: integer
          format: int64
        modelType:
          type: string
          example: client
        timestamp:
          type: string
          format: date-time
        amountOfRetries:
          type: integer
          format: int32
      required:
        - amountOfRetries
        - customerCode
        - eventType
        - id
        - modelType
        - timestamp


