openapi: 3.1.0
info:
  title: Records API
  version: 1.0.0
paths:
  /records/{record_id}:
    get:
      summary: Get a record
      description: Returns one record.
      operationId: getRecord
      parameters:
        - name: record_id
          in: path
          required: true
          schema:
            type: integer
            minimum: 1
      responses:
        "200":
          description: Record found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Record"
        "404":
          description: Record not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Problem"
components:
  schemas:
    Record:
      type: object
      required: [id, title]
      properties:
        id:
          type: integer
        title:
          type: string
    Problem:
      type: object
      required: [code, message]
      properties:
        code:
          type: string
        message:
          type: string
