swagger: "2.0"
info: { version: "", title: "" }

paths:

  /logs/{reference}:
    get:
      tags: [ "logs" ]
      summary: "Get log entries"
      operationId: "getLogs"
      parameters:
        - { name: "reference", in: "path", description: "Reference", required: true, type: string, x-example: "tickets%2F294511" }
      responses:
        "200":
          description: "successful operation"
          schema: { type: array, items: { $ref: "#/definitions/LogEntry" } }
          examples:
            test:
              - { type: "manual", "created": "2021-12-12T12:12:12.000000012Z","creator": "bob","reference": "tickets/294511","message": "Fail run account resist lend solve incident centre priority temperature. Cause change distribution examine location technique shape partner milk customer. Rail tea plate soil report cook railway interpretation breath action. Exercise dream accept park conclusion addition shoot assistance may answer. Gold writer link stop combine hear power name commitment operation. Determine lifespan support grow degree henry exclude detail set religion. Direct library policy convention chain retain discover ride walk student. Gather proposal select march aspect play noise avoid encourage employ. Assessment preserve transport combine wish influence income guess run stand. Charge limit crime ignore statement foundation study issue stop claim." }
      security: [ { roles: [ "log:read" ] } ]

definitions:
  LogEntry:
    type: object
    required: [ type, reference, creator, created, message ]
    properties:
      type: { type: string }
      reference: { type: string }
      creator: { type: string }
      created: { type: string, format: "date-time" }
      message: { type: string }
