openapi: 3.0.2
info:
  title: The Learnspot API
  description: The Learnspot API documentation.
  version: 1.0.0
servers:
  - url: '{serverUrl}'
    variables:
      serverUrl:
        default: https://app.thelearnspot.nl/api/v1
paths:
  /oauth/token:
    post:
      security: []
      tags:
        - OAuth
      summary: Get an access token
      description: Get an access token using client credentials
      operationId: oauth.token
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                grant_type:
                  type: string
                  enum:
                    - client_credentials
                client_id:
                  type: string
                client_secret:
                  type: string
                scope:
                  type: string
                  description: >-
                    The scopes to request. Available scopes: get_modules,
                    mutate_modules, get_subjects, mutate_subjects, get_chapters,
                    mutate_chapters
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  token_type:
                    type: string
                  expires_in:
                    type: integer
                  access_token:
                    type: string
                  refresh_token:
                    type: string
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  error_description:
                    type: string
                  hint:
                    type: string
                  message:
                    type: string
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  error_description:
                    type: string
                  message:
                    type: string
  /modules:
    get:
      tags:
        - Modules
      summary: Get all modules
      description: ''
      operationId: modules.index
      parameters:
        - name: page[size]
          in: query
          description: The page size for paginated results
          required: false
          allowEmptyValue: false
          schema:
            type: integer
        - name: page[number]
          in: query
          description: The page number for paginated results
          required: false
          allowEmptyValue: false
          schema:
            type: integer
        - name: sort
          in: query
          required: false
          allowEmptyValue: false
          schema:
            type: array
            items:
              enum:
                - id
                - '-id'
                - title
                - '-title'
                - created_at
                - '-created_at'
                - updated_at
                - '-updated_at'
              type: string
        - name: filter[id]
          in: query
          description: A list of ids to filter by.
          required: false
          allowEmptyValue: false
          style: form
          explode: false
          schema:
            default: []
            type: array
            items:
              type: string
          examples:
            empty:
              value: []
            63fa853f-2769-4682-a0ec-600858474b26:
              value:
                - 63fa853f-2769-4682-a0ec-600858474b26
            a6760ecb-20fe-4f34-bbde-bb5b4b68a18b:
              value:
                - a6760ecb-20fe-4f34-bbde-bb5b4b68a18b
            6c163f9d-ea45-481b-964e-1c1c13401744:
              value:
                - 6c163f9d-ea45-481b-964e-1c1c13401744
        - name: filter[title]
          in: query
          description: Filters the records
          required: false
          allowEmptyValue: false
          schema:
            default: ''
            type: string
          examples:
            Dit is een test:
              value: Dit is een test
            Ondersteunen (en coördineren) op maat MZ KD2022:
              value: Ondersteunen (en coördineren) op maat MZ KD2022
            Maatschappelijke zorg KD2016:
              value: Maatschappelijke zorg KD2016
        - name: filter[external_id]
          in: query
          description: Filters the records
          required: false
          allowEmptyValue: false
          schema:
            default: ''
            type: string
          examples:
            edition-traject-mz-kd2022:
              value: edition-traject-mz-kd2022
            edition-traject-ondersteunen-coordineren-mz-kd2022:
              value: edition-traject-ondersteunen-coordineren-mz-kd2022
            edition-traject-mz-kd2016:
              value: edition-traject-mz-kd2016
      responses:
        '200':
          description: Index modules
          content:
            application/vnd.api+json:
              schema:
                type: object
                required:
                  - jsonapi
                  - data
                properties:
                  jsonapi:
                    type: object
                    properties:
                      version:
                        title: version
                        type: string
                        example: '1.0'
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/resources.modules.resource.fetch'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
      security:
        - OAuth2:
            - get_modules
    post:
      tags:
        - Modules
      summary: Store one module
      description: ''
      operationId: modules.store
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              type: object
              required:
                - data
              properties:
                data:
                  $ref: '#/components/schemas/resources.modules.resource.store'
      responses:
        '200':
          description: Store modules
          content:
            application/vnd.api+json:
              schema:
                type: object
                required:
                  - jsonapi
                  - data
                properties:
                  jsonapi:
                    type: object
                    properties:
                      version:
                        title: version
                        type: string
                        example: '1.0'
                  data:
                    $ref: '#/components/schemas/resources.modules.resource.fetch'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '404':
          $ref: '#/components/responses/404'
      security:
        - OAuth2:
            - mutate_modules
  /modules/{module}:
    get:
      tags:
        - Modules
      summary: Show one module
      description: ''
      operationId: modules.show
      parameters:
        - name: module
          in: path
          required: true
          allowEmptyValue: false
          schema:
            type: string
          examples:
            63fa853f-2769-4682-a0ec-600858474b26:
              value: 63fa853f-2769-4682-a0ec-600858474b26
            a6760ecb-20fe-4f34-bbde-bb5b4b68a18b:
              value: a6760ecb-20fe-4f34-bbde-bb5b4b68a18b
            6c163f9d-ea45-481b-964e-1c1c13401744:
              value: 6c163f9d-ea45-481b-964e-1c1c13401744
      responses:
        '200':
          description: Show modules
          content:
            application/vnd.api+json:
              schema:
                type: object
                required:
                  - jsonapi
                  - data
                properties:
                  jsonapi:
                    type: object
                    properties:
                      version:
                        title: version
                        type: string
                        example: '1.0'
                  data:
                    $ref: '#/components/schemas/resources.modules.resource.fetch'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '404':
          $ref: '#/components/responses/404'
      security:
        - OAuth2:
            - get_modules
    patch:
      tags:
        - Modules
      summary: Update one module
      description: ''
      operationId: modules.update
      parameters:
        - name: module
          in: path
          required: true
          allowEmptyValue: false
          schema:
            type: string
          examples:
            63fa853f-2769-4682-a0ec-600858474b26:
              value: 63fa853f-2769-4682-a0ec-600858474b26
            a6760ecb-20fe-4f34-bbde-bb5b4b68a18b:
              value: a6760ecb-20fe-4f34-bbde-bb5b4b68a18b
            6c163f9d-ea45-481b-964e-1c1c13401744:
              value: 6c163f9d-ea45-481b-964e-1c1c13401744
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              type: object
              required:
                - data
              properties:
                data:
                  $ref: '#/components/schemas/resources.modules.resource.update'
      responses:
        '200':
          description: Update modules
          content:
            application/vnd.api+json:
              schema:
                type: object
                required:
                  - jsonapi
                  - data
                properties:
                  jsonapi:
                    type: object
                    properties:
                      version:
                        title: version
                        type: string
                        example: '1.0'
                  data:
                    $ref: '#/components/schemas/resources.modules.resource.fetch'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '404':
          $ref: '#/components/responses/404'
      security:
        - OAuth2:
            - mutate_modules
  /modules/{module}/subjects:
    get:
      tags:
        - Modules
      summary: Show subjects
      description: ''
      operationId: modules.subjects
      parameters:
        - name: module
          in: path
          required: true
          allowEmptyValue: false
          schema:
            type: string
          examples:
            63fa853f-2769-4682-a0ec-600858474b26:
              value: 63fa853f-2769-4682-a0ec-600858474b26
            a6760ecb-20fe-4f34-bbde-bb5b4b68a18b:
              value: a6760ecb-20fe-4f34-bbde-bb5b4b68a18b
            6c163f9d-ea45-481b-964e-1c1c13401744:
              value: 6c163f9d-ea45-481b-964e-1c1c13401744
      responses:
        '200':
          description: ShowRelated modules
          content:
            application/vnd.api+json:
              schema:
                type: object
                required:
                  - jsonapi
                  - data
                properties:
                  jsonapi:
                    type: object
                    properties:
                      version:
                        title: version
                        type: string
                        example: '1.0'
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/resources.subjects.resource.fetch'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '404':
          $ref: '#/components/responses/404'
      security:
        - OAuth2:
            - get_modules
  /modules/{module}/relationships/subjects:
    get:
      tags:
        - Modules
      summary: Show subjects relation
      description: ''
      operationId: modules.subjects.show
      parameters:
        - name: module
          in: path
          required: true
          allowEmptyValue: false
          schema:
            type: string
          examples:
            63fa853f-2769-4682-a0ec-600858474b26:
              value: 63fa853f-2769-4682-a0ec-600858474b26
            a6760ecb-20fe-4f34-bbde-bb5b4b68a18b:
              value: a6760ecb-20fe-4f34-bbde-bb5b4b68a18b
            6c163f9d-ea45-481b-964e-1c1c13401744:
              value: 6c163f9d-ea45-481b-964e-1c1c13401744
      responses:
        '200':
          description: Show modules
          content:
            application/vnd.api+json:
              schema:
                type: object
                required:
                  - jsonapi
                  - data
                properties:
                  jsonapi:
                    type: object
                    properties:
                      version:
                        title: version
                        type: string
                        example: '1.0'
                  data:
                    type: array
                    items:
                      $ref: >-
                        #/components/schemas/resources.modules.relationship.subjects.fetch
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '404':
          $ref: '#/components/responses/404'
      security:
        - OAuth2:
            - get_modules
  /subjects:
    get:
      tags:
        - Subjects
      summary: Get all subjects
      description: ''
      operationId: subjects.index
      parameters:
        - name: page[size]
          in: query
          description: The page size for paginated results
          required: false
          allowEmptyValue: false
          schema:
            type: integer
        - name: page[number]
          in: query
          description: The page number for paginated results
          required: false
          allowEmptyValue: false
          schema:
            type: integer
        - name: sort
          in: query
          required: false
          allowEmptyValue: false
          schema:
            type: array
            items:
              enum:
                - id
                - '-id'
                - created_at
                - '-created_at'
                - updated_at
                - '-updated_at'
              type: string
        - name: filter[id]
          in: query
          description: A list of ids to filter by.
          required: false
          allowEmptyValue: false
          style: form
          explode: false
          schema:
            default: []
            type: array
            items:
              type: string
          examples:
            empty:
              value: []
            2f94483e-dd7b-4fb7-8f97-f7c91433eeba:
              value:
                - 2f94483e-dd7b-4fb7-8f97-f7c91433eeba
            c9b44316-411a-4bcc-a767-27a9e487084b:
              value:
                - c9b44316-411a-4bcc-a767-27a9e487084b
            e28b07db-19c0-4143-a0f3-347853657c3b:
              value:
                - e28b07db-19c0-4143-a0f3-347853657c3b
        - name: filter[title]
          in: query
          description: Filters the records
          required: false
          allowEmptyValue: false
          schema:
            default: ''
            type: string
          examples:
            Dit is een test:
              value: Dit is een test
            Communicatie en ondersteunen:
              value: Communicatie en ondersteunen
            Methodiek en gedragsbevordering:
              value: Methodiek en gedragsbevordering
        - name: filter[external_id]
          in: query
          description: Filters the records
          required: false
          allowEmptyValue: false
          schema:
            default: ''
            type: string
          examples:
            thip.a897b758-04aa-49ff-9017-347ab78267b9:
              value: thip.a897b758-04aa-49ff-9017-347ab78267b9
            thip.17c3e4df-1d43-4ff5-9aac-f1cc42c0a18e:
              value: thip.17c3e4df-1d43-4ff5-9aac-f1cc42c0a18e
            thip.5f9bc11e-33e5-4d81-9b19-7de60c82e969:
              value: thip.5f9bc11e-33e5-4d81-9b19-7de60c82e969
      responses:
        '200':
          description: Index subjects
          content:
            application/vnd.api+json:
              schema:
                type: object
                required:
                  - jsonapi
                  - data
                properties:
                  jsonapi:
                    type: object
                    properties:
                      version:
                        title: version
                        type: string
                        example: '1.0'
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/resources.subjects.resource.fetch'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
      security:
        - OAuth2:
            - get_subjects
    post:
      tags:
        - Subjects
      summary: Store one subject
      description: ''
      operationId: subjects.store
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              type: object
              required:
                - data
              properties:
                data:
                  $ref: '#/components/schemas/resources.subjects.resource.store'
      responses:
        '200':
          description: Store subjects
          content:
            application/vnd.api+json:
              schema:
                type: object
                required:
                  - jsonapi
                  - data
                properties:
                  jsonapi:
                    type: object
                    properties:
                      version:
                        title: version
                        type: string
                        example: '1.0'
                  data:
                    $ref: '#/components/schemas/resources.subjects.resource.fetch'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '404':
          $ref: '#/components/responses/404'
      security:
        - OAuth2:
            - mutate_subjects
  /subjects/{subject}:
    get:
      tags:
        - Subjects
      summary: Show one subject
      description: ''
      operationId: subjects.show
      parameters:
        - name: subject
          in: path
          required: true
          allowEmptyValue: false
          schema:
            type: string
          examples:
            2f94483e-dd7b-4fb7-8f97-f7c91433eeba:
              value: 2f94483e-dd7b-4fb7-8f97-f7c91433eeba
            c9b44316-411a-4bcc-a767-27a9e487084b:
              value: c9b44316-411a-4bcc-a767-27a9e487084b
            e28b07db-19c0-4143-a0f3-347853657c3b:
              value: e28b07db-19c0-4143-a0f3-347853657c3b
      responses:
        '200':
          description: Show subjects
          content:
            application/vnd.api+json:
              schema:
                type: object
                required:
                  - jsonapi
                  - data
                properties:
                  jsonapi:
                    type: object
                    properties:
                      version:
                        title: version
                        type: string
                        example: '1.0'
                  data:
                    $ref: '#/components/schemas/resources.subjects.resource.fetch'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '404':
          $ref: '#/components/responses/404'
      security:
        - OAuth2:
            - get_subjects
    patch:
      tags:
        - Subjects
      summary: Update one subject
      description: ''
      operationId: subjects.update
      parameters:
        - name: subject
          in: path
          required: true
          allowEmptyValue: false
          schema:
            type: string
          examples:
            2f94483e-dd7b-4fb7-8f97-f7c91433eeba:
              value: 2f94483e-dd7b-4fb7-8f97-f7c91433eeba
            c9b44316-411a-4bcc-a767-27a9e487084b:
              value: c9b44316-411a-4bcc-a767-27a9e487084b
            e28b07db-19c0-4143-a0f3-347853657c3b:
              value: e28b07db-19c0-4143-a0f3-347853657c3b
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              type: object
              required:
                - data
              properties:
                data:
                  $ref: '#/components/schemas/resources.subjects.resource.update'
      responses:
        '200':
          description: Update subjects
          content:
            application/vnd.api+json:
              schema:
                type: object
                required:
                  - jsonapi
                  - data
                properties:
                  jsonapi:
                    type: object
                    properties:
                      version:
                        title: version
                        type: string
                        example: '1.0'
                  data:
                    $ref: '#/components/schemas/resources.subjects.resource.fetch'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '404':
          $ref: '#/components/responses/404'
      security:
        - OAuth2:
            - mutate_subjects
  /subjects/{subject}/module:
    get:
      tags:
        - Subjects
      summary: Show module
      description: ''
      operationId: subjects.module
      parameters:
        - name: subject
          in: path
          required: true
          allowEmptyValue: false
          schema:
            type: string
          examples:
            2f94483e-dd7b-4fb7-8f97-f7c91433eeba:
              value: 2f94483e-dd7b-4fb7-8f97-f7c91433eeba
            c9b44316-411a-4bcc-a767-27a9e487084b:
              value: c9b44316-411a-4bcc-a767-27a9e487084b
            e28b07db-19c0-4143-a0f3-347853657c3b:
              value: e28b07db-19c0-4143-a0f3-347853657c3b
      responses:
        '200':
          description: ShowRelated subjects
          content:
            application/vnd.api+json:
              schema:
                type: object
                required:
                  - jsonapi
                  - data
                properties:
                  jsonapi:
                    type: object
                    properties:
                      version:
                        title: version
                        type: string
                        example: '1.0'
                  data:
                    $ref: '#/components/schemas/resources.modules.resource.fetch'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '404':
          $ref: '#/components/responses/404'
      security:
        - OAuth2:
            - get_subjects
  /subjects/{subject}/relationships/module:
    get:
      tags:
        - Subjects
      summary: Show module relation
      description: ''
      operationId: subjects.module.show
      parameters:
        - name: subject
          in: path
          required: true
          allowEmptyValue: false
          schema:
            type: string
          examples:
            2f94483e-dd7b-4fb7-8f97-f7c91433eeba:
              value: 2f94483e-dd7b-4fb7-8f97-f7c91433eeba
            c9b44316-411a-4bcc-a767-27a9e487084b:
              value: c9b44316-411a-4bcc-a767-27a9e487084b
            e28b07db-19c0-4143-a0f3-347853657c3b:
              value: e28b07db-19c0-4143-a0f3-347853657c3b
      responses:
        '200':
          description: Show subjects
          content:
            application/vnd.api+json:
              schema:
                type: object
                required:
                  - jsonapi
                  - data
                properties:
                  jsonapi:
                    type: object
                    properties:
                      version:
                        title: version
                        type: string
                        example: '1.0'
                  data:
                    $ref: >-
                      #/components/schemas/resources.subjects.relationship.module.fetch
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '404':
          $ref: '#/components/responses/404'
      security:
        - OAuth2:
            - get_subjects
  /subjects/{subject}/chapters:
    get:
      tags:
        - Subjects
      summary: Show chapters
      description: ''
      operationId: subjects.chapters
      parameters:
        - name: subject
          in: path
          required: true
          allowEmptyValue: false
          schema:
            type: string
          examples:
            2f94483e-dd7b-4fb7-8f97-f7c91433eeba:
              value: 2f94483e-dd7b-4fb7-8f97-f7c91433eeba
            c9b44316-411a-4bcc-a767-27a9e487084b:
              value: c9b44316-411a-4bcc-a767-27a9e487084b
            e28b07db-19c0-4143-a0f3-347853657c3b:
              value: e28b07db-19c0-4143-a0f3-347853657c3b
      responses:
        '200':
          description: ShowRelated subjects
          content:
            application/vnd.api+json:
              schema:
                type: object
                required:
                  - jsonapi
                  - data
                properties:
                  jsonapi:
                    type: object
                    properties:
                      version:
                        title: version
                        type: string
                        example: '1.0'
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/resources.chapters.resource.fetch'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '404':
          $ref: '#/components/responses/404'
      security:
        - OAuth2:
            - get_subjects
  /subjects/{subject}/relationships/chapters:
    get:
      tags:
        - Subjects
      summary: Show chapters relation
      description: ''
      operationId: subjects.chapters.show
      parameters:
        - name: subject
          in: path
          required: true
          allowEmptyValue: false
          schema:
            type: string
          examples:
            2f94483e-dd7b-4fb7-8f97-f7c91433eeba:
              value: 2f94483e-dd7b-4fb7-8f97-f7c91433eeba
            c9b44316-411a-4bcc-a767-27a9e487084b:
              value: c9b44316-411a-4bcc-a767-27a9e487084b
            e28b07db-19c0-4143-a0f3-347853657c3b:
              value: e28b07db-19c0-4143-a0f3-347853657c3b
      responses:
        '200':
          description: Show subjects
          content:
            application/vnd.api+json:
              schema:
                type: object
                required:
                  - jsonapi
                  - data
                properties:
                  jsonapi:
                    type: object
                    properties:
                      version:
                        title: version
                        type: string
                        example: '1.0'
                  data:
                    type: array
                    items:
                      $ref: >-
                        #/components/schemas/resources.subjects.relationship.chapters.fetch
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '404':
          $ref: '#/components/responses/404'
      security:
        - OAuth2:
            - get_subjects
  /chapters:
    post:
      tags:
        - Chapters
      summary: Store one chapter
      description: Create a chapter
      operationId: chapters.store
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              type: object
              required:
                - data
              properties:
                data:
                  $ref: '#/components/schemas/resources.chapters.resource.store'
      responses:
        '200':
          description: Store chapters
          content:
            application/vnd.api+json:
              schema:
                type: object
                required:
                  - jsonapi
                  - data
                properties:
                  jsonapi:
                    type: object
                    properties:
                      version:
                        title: version
                        type: string
                        example: '1.0'
                  data:
                    $ref: '#/components/schemas/resources.chapters.resource.fetch'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '404':
          $ref: '#/components/responses/404'
      security:
        - OAuth2:
            - mutate_chapters
  /chapters/{chapter}:
    get:
      tags:
        - Chapters
      summary: Show one chapter
      description: Read a chapter
      operationId: chapters.show
      parameters:
        - name: chapter
          in: path
          required: true
          allowEmptyValue: false
          schema:
            type: string
          examples:
            849b39ee-fe8e-46fb-bc9d-d98930ee6afb:
              value: 849b39ee-fe8e-46fb-bc9d-d98930ee6afb
            3027c35b-df35-400b-8af2-d2e5dc050cb5:
              value: 3027c35b-df35-400b-8af2-d2e5dc050cb5
            9e3718d1-b439-4e38-afa1-9863a9dd4c5d:
              value: 9e3718d1-b439-4e38-afa1-9863a9dd4c5d
      responses:
        '200':
          description: Show chapters
          content:
            application/vnd.api+json:
              schema:
                type: object
                required:
                  - jsonapi
                  - data
                properties:
                  jsonapi:
                    type: object
                    properties:
                      version:
                        title: version
                        type: string
                        example: '1.0'
                  data:
                    $ref: '#/components/schemas/resources.chapters.resource.fetch'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '404':
          $ref: '#/components/responses/404'
      security:
        - OAuth2:
            - get_chapters
    patch:
      tags:
        - Chapters
      summary: Update one chapter
      description: Update a chapter
      operationId: chapters.update
      parameters:
        - name: chapter
          in: path
          required: true
          allowEmptyValue: false
          schema:
            type: string
          examples:
            849b39ee-fe8e-46fb-bc9d-d98930ee6afb:
              value: 849b39ee-fe8e-46fb-bc9d-d98930ee6afb
            3027c35b-df35-400b-8af2-d2e5dc050cb5:
              value: 3027c35b-df35-400b-8af2-d2e5dc050cb5
            9e3718d1-b439-4e38-afa1-9863a9dd4c5d:
              value: 9e3718d1-b439-4e38-afa1-9863a9dd4c5d
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              type: object
              required:
                - data
              properties:
                data:
                  $ref: '#/components/schemas/resources.chapters.resource.update'
      responses:
        '200':
          description: Update chapters
          content:
            application/vnd.api+json:
              schema:
                type: object
                required:
                  - jsonapi
                  - data
                properties:
                  jsonapi:
                    type: object
                    properties:
                      version:
                        title: version
                        type: string
                        example: '1.0'
                  data:
                    $ref: '#/components/schemas/resources.chapters.resource.fetch'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '404':
          $ref: '#/components/responses/404'
      security:
        - OAuth2:
            - mutate_chapters
  /chapters/{chapter}/subject:
    get:
      tags:
        - Chapters
      summary: Show subject
      description: ''
      operationId: chapters.subject
      parameters:
        - name: chapter
          in: path
          required: true
          allowEmptyValue: false
          schema:
            type: string
          examples:
            849b39ee-fe8e-46fb-bc9d-d98930ee6afb:
              value: 849b39ee-fe8e-46fb-bc9d-d98930ee6afb
            3027c35b-df35-400b-8af2-d2e5dc050cb5:
              value: 3027c35b-df35-400b-8af2-d2e5dc050cb5
            9e3718d1-b439-4e38-afa1-9863a9dd4c5d:
              value: 9e3718d1-b439-4e38-afa1-9863a9dd4c5d
      responses:
        '200':
          description: ShowRelated chapters
          content:
            application/vnd.api+json:
              schema:
                type: object
                required:
                  - jsonapi
                  - data
                properties:
                  jsonapi:
                    type: object
                    properties:
                      version:
                        title: version
                        type: string
                        example: '1.0'
                  data:
                    $ref: '#/components/schemas/resources.subjects.resource.fetch'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '404':
          $ref: '#/components/responses/404'
      security:
        - OAuth2:
            - get_chapters
  /chapters/{chapter}/relationships/subject:
    get:
      tags:
        - Chapters
      summary: Show subject relation
      description: ''
      operationId: chapters.subject.show
      parameters:
        - name: chapter
          in: path
          required: true
          allowEmptyValue: false
          schema:
            type: string
          examples:
            849b39ee-fe8e-46fb-bc9d-d98930ee6afb:
              value: 849b39ee-fe8e-46fb-bc9d-d98930ee6afb
            3027c35b-df35-400b-8af2-d2e5dc050cb5:
              value: 3027c35b-df35-400b-8af2-d2e5dc050cb5
            9e3718d1-b439-4e38-afa1-9863a9dd4c5d:
              value: 9e3718d1-b439-4e38-afa1-9863a9dd4c5d
      responses:
        '200':
          description: Show chapters
          content:
            application/vnd.api+json:
              schema:
                type: object
                required:
                  - jsonapi
                  - data
                properties:
                  jsonapi:
                    type: object
                    properties:
                      version:
                        title: version
                        type: string
                        example: '1.0'
                  data:
                    $ref: >-
                      #/components/schemas/resources.chapters.relationship.subject.fetch
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '404':
          $ref: '#/components/responses/404'
      security:
        - OAuth2:
            - get_chapters
components:
  schemas:
    helper.errors:
      title: Helper/Errors
      type: array
      items:
        title: Error
        type: object
        required:
          - status
          - title
        properties:
          detail:
            type: string
          status:
            type: string
          title:
            type: string
          source:
            type: object
            properties:
              pointer:
                type: string
    helper.jsonapi:
      title: Helper/JSONAPI
      type: object
      required:
        - version
      properties:
        version:
          title: version
          type: string
          example: '1.0'
    resources.chapters.relationship.subject.fetch:
      title: Resource/Chapter/Relationship/Subject/Fetch
      type: object
      required:
        - type
        - id
      properties:
        type:
          title: type
          default: subjects
          type: string
        id:
          title: id
          type: string
          example: 2f94483e-dd7b-4fb7-8f97-f7c91433eeba
    resources.chapters.resource.fetch:
      title: Resource/Chapter/Fetch
      type: object
      required:
        - type
        - id
        - attributes
      properties:
        type:
          title: type
          default: chapters
          type: string
        id:
          type: string
          example: 849b39ee-fe8e-46fb-bc9d-d98930ee6afb
        attributes:
          type: object
          properties:
            title:
              title: title
              type: string
              example: Module 1 Oriëntatie op het beroep
            deeplink:
              title: deeplink
              type: string
              example: >-
                https://edition.thiememeulenhoff.nl/secure/d/stream/traject_3_4_mz_bop/link/thip_id/thip.f6f15d45-aec1-4450-b5ec-cff9c74a2983
            external_id:
              title: external_id
              type: string
              example: thip.f6f15d45-aec1-4450-b5ec-cff9c74a2983
            createdAt:
              title: createdAt
              type: string
              readOnly: true
              example: '2024-11-05T13:32:24.000000Z'
            updatedAt:
              title: updatedAt
              type: string
              readOnly: true
              example: '2024-11-05T13:32:24.000000Z'
        relationships:
          type: object
          properties:
            subject:
              title: subject
              type: object
              properties:
                links:
                  type: object
                  properties:
                    related:
                      title: related
                      type: string
                      example: >-
                        http://localhost/api/v1/subjects/849b39ee-fe8e-46fb-bc9d-d98930ee6afb
                    self:
                      title: self
                      type: string
                      example: >-
                        http://localhost/api/v1/subjects/849b39ee-fe8e-46fb-bc9d-d98930ee6afb
                  readOnly: true
    resources.chapters.resource.store:
      title: Resource/Chapter/Store
      type: object
      required:
        - type
        - attributes
      properties:
        type:
          title: type
          default: chapters
          type: string
        attributes:
          type: object
          properties:
            title:
              title: title
              type: string
              example: Module 1 Oriëntatie op het beroep
            deeplink:
              title: deeplink
              type: string
              example: >-
                https://edition.thiememeulenhoff.nl/secure/d/stream/traject_3_4_mz_bop/link/thip_id/thip.f6f15d45-aec1-4450-b5ec-cff9c74a2983
            external_id:
              title: external_id
              type: string
              example: thip.f6f15d45-aec1-4450-b5ec-cff9c74a2983
            createdAt:
              title: createdAt
              type: string
              readOnly: true
              example: '2024-11-05T13:32:24.000000Z'
            updatedAt:
              title: updatedAt
              type: string
              readOnly: true
              example: '2024-11-05T13:32:24.000000Z'
        relationships:
          type: object
          properties:
            subject:
              title: subject
              type: object
              properties:
                links:
                  type: object
                  properties:
                    related:
                      title: related
                      type: string
                      example: >-
                        http://localhost/api/v1/subjects/849b39ee-fe8e-46fb-bc9d-d98930ee6afb
                    self:
                      title: self
                      type: string
                      example: >-
                        http://localhost/api/v1/subjects/849b39ee-fe8e-46fb-bc9d-d98930ee6afb
                  readOnly: true
    resources.chapters.resource.update:
      title: Resource/Chapter/Update
      type: object
      required:
        - type
        - id
        - attributes
      properties:
        type:
          title: type
          default: chapters
          type: string
        id:
          type: string
          example: 849b39ee-fe8e-46fb-bc9d-d98930ee6afb
        attributes:
          type: object
          properties:
            title:
              title: title
              type: string
              example: Module 1 Oriëntatie op het beroep
            deeplink:
              title: deeplink
              type: string
              example: >-
                https://edition.thiememeulenhoff.nl/secure/d/stream/traject_3_4_mz_bop/link/thip_id/thip.f6f15d45-aec1-4450-b5ec-cff9c74a2983
            external_id:
              title: external_id
              type: string
              example: thip.f6f15d45-aec1-4450-b5ec-cff9c74a2983
            createdAt:
              title: createdAt
              type: string
              readOnly: true
              example: '2024-11-05T13:32:24.000000Z'
            updatedAt:
              title: updatedAt
              type: string
              readOnly: true
              example: '2024-11-05T13:32:24.000000Z'
        relationships:
          type: object
          properties:
            subject:
              title: subject
              type: object
              properties:
                links:
                  type: object
                  properties:
                    related:
                      title: related
                      type: string
                      example: >-
                        http://localhost/api/v1/subjects/849b39ee-fe8e-46fb-bc9d-d98930ee6afb
                    self:
                      title: self
                      type: string
                      example: >-
                        http://localhost/api/v1/subjects/849b39ee-fe8e-46fb-bc9d-d98930ee6afb
                  readOnly: true
    resources.modules.relationship.subjects.fetch:
      title: Resource/Module/Relationship/Subjects/Fetch
      type: object
      required:
        - type
        - id
      properties:
        type:
          title: type
          default: subjects
          type: string
        id:
          title: id
          type: string
          example: 2f94483e-dd7b-4fb7-8f97-f7c91433eeba
    resources.modules.resource.fetch:
      title: Resource/Module/Fetch
      type: object
      required:
        - type
        - id
        - attributes
      properties:
        type:
          title: type
          default: modules
          type: string
        id:
          type: string
          example: 63fa853f-2769-4682-a0ec-600858474b26
        attributes:
          type: object
          properties:
            title:
              title: title
              type: string
              example: Dit is een test
            introduction:
              title: introduction
              type: string
              example: Test introduction
            content:
              title: content
              type: string
              example: <p>Test content</p>
            external_id:
              title: external_id
              type: string
              example: edition-traject-mz-kd2022
            published:
              title: published
              type: boolean
              readOnly: true
              example: false
            created_at:
              title: created_at
              type: string
              readOnly: true
              example: '2024-11-05T13:32:23.000000Z'
            updated_at:
              title: updated_at
              type: string
              readOnly: true
              example: '2024-11-08T13:55:00.000000Z'
        relationships:
          type: object
          properties:
            subjects:
              title: subjects
              type: object
              properties:
                links:
                  type: object
                  properties:
                    related:
                      title: related
                      type: string
                      example: >-
                        http://localhost/api/v1/subjects/63fa853f-2769-4682-a0ec-600858474b26
                    self:
                      title: self
                      type: string
                      example: >-
                        http://localhost/api/v1/subjects/63fa853f-2769-4682-a0ec-600858474b26
                  readOnly: true
    resources.modules.resource.store:
      title: Resource/Module/Store
      type: object
      required:
        - type
        - attributes
      properties:
        type:
          title: type
          default: modules
          type: string
        attributes:
          type: object
          properties:
            title:
              title: title
              type: string
              example: Dit is een test
            introduction:
              title: introduction
              type: string
              example: Test introduction
            content:
              title: content
              type: string
              example: <p>Test content</p>
            external_id:
              title: external_id
              type: string
              example: edition-traject-mz-kd2022
            published:
              title: published
              type: boolean
              readOnly: true
              example: false
            created_at:
              title: created_at
              type: string
              readOnly: true
              example: '2024-11-05T13:32:23.000000Z'
            updated_at:
              title: updated_at
              type: string
              readOnly: true
              example: '2024-11-08T13:55:00.000000Z'
        relationships:
          type: object
          properties:
            subjects:
              title: subjects
              type: object
              properties:
                links:
                  type: object
                  properties:
                    related:
                      title: related
                      type: string
                      example: >-
                        http://localhost/api/v1/subjects/63fa853f-2769-4682-a0ec-600858474b26
                    self:
                      title: self
                      type: string
                      example: >-
                        http://localhost/api/v1/subjects/63fa853f-2769-4682-a0ec-600858474b26
                  readOnly: true
    resources.modules.resource.update:
      title: Resource/Module/Update
      type: object
      required:
        - type
        - id
        - attributes
      properties:
        type:
          title: type
          default: modules
          type: string
        id:
          type: string
          example: 63fa853f-2769-4682-a0ec-600858474b26
        attributes:
          type: object
          properties:
            title:
              title: title
              type: string
              example: Dit is een test
            introduction:
              title: introduction
              type: string
              example: Test introduction
            content:
              title: content
              type: string
              example: <p>Test content</p>
            external_id:
              title: external_id
              type: string
              example: edition-traject-mz-kd2022
            published:
              title: published
              type: boolean
              readOnly: true
              example: false
            created_at:
              title: created_at
              type: string
              readOnly: true
              example: '2024-11-05T13:32:23.000000Z'
            updated_at:
              title: updated_at
              type: string
              readOnly: true
              example: '2024-11-08T13:55:00.000000Z'
        relationships:
          type: object
          properties:
            subjects:
              title: subjects
              type: object
              properties:
                links:
                  type: object
                  properties:
                    related:
                      title: related
                      type: string
                      example: >-
                        http://localhost/api/v1/subjects/63fa853f-2769-4682-a0ec-600858474b26
                    self:
                      title: self
                      type: string
                      example: >-
                        http://localhost/api/v1/subjects/63fa853f-2769-4682-a0ec-600858474b26
                  readOnly: true
    resources.subjects.relationship.chapters.fetch:
      title: Resource/Subject/Relationship/Chapters/Fetch
      type: object
      required:
        - type
        - id
      properties:
        type:
          title: type
          default: chapters
          type: string
        id:
          title: id
          type: string
          example: 849b39ee-fe8e-46fb-bc9d-d98930ee6afb
    resources.subjects.relationship.module.fetch:
      title: Resource/Subject/Relationship/Module/Fetch
      type: object
      required:
        - type
        - id
      properties:
        type:
          title: type
          default: modules
          type: string
        id:
          title: id
          type: string
          example: 63fa853f-2769-4682-a0ec-600858474b26
    resources.subjects.resource.fetch:
      title: Resource/Subject/Fetch
      type: object
      required:
        - type
        - id
        - attributes
      properties:
        type:
          title: type
          default: subjects
          type: string
        id:
          type: string
          example: 2f94483e-dd7b-4fb7-8f97-f7c91433eeba
        attributes:
          type: object
          properties:
            title:
              title: title
              type: string
              example: Dit is een test
            introduction:
              title: introduction
              type: string
              example: Test content
            content:
              title: content
              type: string
              example: ''
            external_id:
              title: external_id
              type: string
              example: thip.a897b758-04aa-49ff-9017-347ab78267b9
            available_for_courses:
              title: available_for_courses
              type: boolean
              example: false
            created_at:
              title: created_at
              type: string
              readOnly: true
              example: '2024-11-05T13:32:24.000000Z'
            updated_at:
              title: updated_at
              type: string
              readOnly: true
              example: '2024-11-08T13:55:00.000000Z'
        relationships:
          type: object
          properties:
            module:
              title: module
              type: object
              properties:
                links:
                  type: object
                  properties:
                    related:
                      title: related
                      type: string
                      example: >-
                        http://localhost/api/v1/modules/2f94483e-dd7b-4fb7-8f97-f7c91433eeba
                    self:
                      title: self
                      type: string
                      example: >-
                        http://localhost/api/v1/modules/2f94483e-dd7b-4fb7-8f97-f7c91433eeba
                  readOnly: true
            chapters:
              title: chapters
              type: object
              properties:
                links:
                  type: object
                  properties:
                    related:
                      title: related
                      type: string
                      example: >-
                        http://localhost/api/v1/chapters/2f94483e-dd7b-4fb7-8f97-f7c91433eeba
                    self:
                      title: self
                      type: string
                      example: >-
                        http://localhost/api/v1/chapters/2f94483e-dd7b-4fb7-8f97-f7c91433eeba
                  readOnly: true
    resources.subjects.resource.store:
      title: Resource/Subject/Store
      type: object
      required:
        - type
        - attributes
      properties:
        type:
          title: type
          default: subjects
          type: string
        attributes:
          type: object
          properties:
            title:
              title: title
              type: string
              example: Dit is een test
            introduction:
              title: introduction
              type: string
              example: Test content
            content:
              title: content
              type: string
              example: ''
            external_id:
              title: external_id
              type: string
              example: thip.a897b758-04aa-49ff-9017-347ab78267b9
            available_for_courses:
              title: available_for_courses
              type: boolean
              example: false
            created_at:
              title: created_at
              type: string
              readOnly: true
              example: '2024-11-05T13:32:24.000000Z'
            updated_at:
              title: updated_at
              type: string
              readOnly: true
              example: '2024-11-08T13:55:00.000000Z'
        relationships:
          type: object
          properties:
            module:
              title: module
              type: object
              properties:
                links:
                  type: object
                  properties:
                    related:
                      title: related
                      type: string
                      example: >-
                        http://localhost/api/v1/modules/2f94483e-dd7b-4fb7-8f97-f7c91433eeba
                    self:
                      title: self
                      type: string
                      example: >-
                        http://localhost/api/v1/modules/2f94483e-dd7b-4fb7-8f97-f7c91433eeba
                  readOnly: true
            chapters:
              title: chapters
              type: object
              properties:
                links:
                  type: object
                  properties:
                    related:
                      title: related
                      type: string
                      example: >-
                        http://localhost/api/v1/chapters/2f94483e-dd7b-4fb7-8f97-f7c91433eeba
                    self:
                      title: self
                      type: string
                      example: >-
                        http://localhost/api/v1/chapters/2f94483e-dd7b-4fb7-8f97-f7c91433eeba
                  readOnly: true
    resources.subjects.resource.update:
      title: Resource/Subject/Update
      type: object
      required:
        - type
        - id
        - attributes
      properties:
        type:
          title: type
          default: subjects
          type: string
        id:
          type: string
          example: 2f94483e-dd7b-4fb7-8f97-f7c91433eeba
        attributes:
          type: object
          properties:
            title:
              title: title
              type: string
              example: Dit is een test
            introduction:
              title: introduction
              type: string
              example: Test content
            content:
              title: content
              type: string
              example: ''
            external_id:
              title: external_id
              type: string
              example: thip.a897b758-04aa-49ff-9017-347ab78267b9
            available_for_courses:
              title: available_for_courses
              type: boolean
              example: false
            created_at:
              title: created_at
              type: string
              readOnly: true
              example: '2024-11-05T13:32:24.000000Z'
            updated_at:
              title: updated_at
              type: string
              readOnly: true
              example: '2024-11-08T13:55:00.000000Z'
        relationships:
          type: object
          properties:
            module:
              title: module
              type: object
              properties:
                links:
                  type: object
                  properties:
                    related:
                      title: related
                      type: string
                      example: >-
                        http://localhost/api/v1/modules/2f94483e-dd7b-4fb7-8f97-f7c91433eeba
                    self:
                      title: self
                      type: string
                      example: >-
                        http://localhost/api/v1/modules/2f94483e-dd7b-4fb7-8f97-f7c91433eeba
                  readOnly: true
            chapters:
              title: chapters
              type: object
              properties:
                links:
                  type: object
                  properties:
                    related:
                      title: related
                      type: string
                      example: >-
                        http://localhost/api/v1/chapters/2f94483e-dd7b-4fb7-8f97-f7c91433eeba
                    self:
                      title: self
                      type: string
                      example: >-
                        http://localhost/api/v1/chapters/2f94483e-dd7b-4fb7-8f97-f7c91433eeba
                  readOnly: true
  responses:
    '400':
      description: Bad request
      content:
        application/vnd.api+json:
          schema:
            type: object
            properties:
              helper.jsonapi:
                $ref: '#/components/schemas/helper.jsonapi'
              helper.errors:
                $ref: '#/components/schemas/helper.errors'
          examples:
            '-':
              value:
                jsonapi:
                  version: '1.0'
                errors:
                  - detail: The member id is required.
                    source:
                      pointer: /data
                    status: '400'
                    title: Non-Compliant JSON:API Document
    '401':
      description: Unauthorized Action
      content:
        application/vnd.api+json:
          schema:
            type: object
            properties:
              helper.jsonapi:
                $ref: '#/components/schemas/helper.jsonapi'
              helper.errors:
                $ref: '#/components/schemas/helper.errors'
          examples:
            '-':
              value:
                jsonapi:
                  version: '1.0'
                errors:
                  - title: Unauthorized.
                    status: '401'
                    detail: Unauthenticated.
    '404':
      description: Content Not Found
      content:
        application/vnd.api+json:
          schema:
            type: object
            properties:
              helper.jsonapi:
                $ref: '#/components/schemas/helper.jsonapi'
              helper.errors:
                $ref: '#/components/schemas/helper.errors'
          examples:
            '-':
              value:
                jsonapi:
                  version: '1.0'
                errors:
                  - title: Not Found
                    status: '404'
    '422':
      description: Unprocessable Entity
      content:
        application/vnd.api+json:
          schema:
            type: object
            properties:
              helper.jsonapi:
                $ref: '#/components/schemas/helper.jsonapi'
              helper.errors:
                $ref: '#/components/schemas/helper.errors'
          examples:
            '-':
              value:
                jsonapi:
                  version: '1.0'
                errors:
                  - detail: Lorem Ipsum
                    source:
                      pointer: /data/attributes/lorem
                    title: Unprocessable Entity
                    status: '422'
  securitySchemes:
    OAuth2:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://app.thelearnspot.nl/oauth/token
          scopes:
            get_modules: Get specific modules
            mutate_modules: Mutate (create, update) modules
            get_subjects: Get all subjects
            mutate_subjects: Mutate (create, update) subjects
            get_chapters: Get all chapters
            mutate_chapters: Mutate (create, update) chapters
