openapi: 3.1.0
info:
  title: Records API
  version: 1.1.0
paths:
  /record/{id}:
    get:
      summary: Get a record
      description: Returns one record. Rate limiting may apply.
      operationId: getRecord
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Record found or absent
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: "#/components/schemas/Record"
                  - type: "null"
        "429":
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Problem"
components:
  schemas:
    Record:
      type: object
      required: [id, title, owner_id]
      properties:
        id:
          type: string
        title:
          type: string
        owner_id:
          type: string
        archived_at:
          type: [string, "null"]
          format: date-time
    Problem:
      type: object
      required: [code, message]
      properties:
        code:
          type: string
        message:
          type: string
