openapi: 3.0.3
info:
  title: 'Saladdin-BE API Documentation'
  description: ''
  version: 1.0.0
servers:
  -
    url: 'http://localhost:8080'
tags:
  -
    name: Endpoints
    description: ''
paths:
  /api/auth/register:
    post:
      summary: ''
      operationId: postApiAuthRegister
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: b
                email:
                  type: string
                  description: 'Must be a valid email address. Must not be greater than 255 characters.'
                  example: zbailey@example.net
                password:
                  type: string
                  description: 'Must be at least 8 characters.'
                  example: '-0pBNvYgxw'
              required:
                - name
                - email
                - password
      security: []
  /api/auth/login:
    post:
      summary: ''
      operationId: postApiAuthLogin
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  description: 'Must be a valid email address.'
                  example: gbailey@example.net
                password:
                  type: string
                  description: ''
                  example: architecto
              required:
                - email
                - password
      security: []
  /api/auth/google:
    get:
      summary: "1. Redirect User ke Halaman Login Google\nEndpoint: /api/auth/google"
      operationId: 1RedirectUserKeHalamanLoginGoogleEndpointapiauthgoogle
      description: ''
      parameters: []
      responses:
        302:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "<!DOCTYPE html>\n<html>\n    <head>\n        <meta charset=\"UTF-8\" />\n        <meta http-equiv=\"refresh\" content=\"0;url='https://accounts.google.com/o/oauth2/auth?client_id=35969772878-dt0pqbefehbuqt1bvli5tcu3qu1c43td.apps.googleusercontent.com&amp;redirect_uri=http%3A%2F%2F127.0.0.1%3A8080%2Fapi%2Fauth%2Fgoogle%2Fcallback&amp;scope=openid+profile+email&amp;response_type=code'\" />\n\n        <title>Redirecting to https://accounts.google.com/o/oauth2/auth?client_id=35969772878-dt0pqbefehbuqt1bvli5tcu3qu1c43td.apps.googleusercontent.com&amp;redirect_uri=http%3A%2F%2F127.0.0.1%3A8080%2Fapi%2Fauth%2Fgoogle%2Fcallback&amp;scope=openid+profile+email&amp;response_type=code</title>\n    </head>\n    <body>\n        Redirecting to <a href=\"https://accounts.google.com/o/oauth2/auth?client_id=35969772878-dt0pqbefehbuqt1bvli5tcu3qu1c43td.apps.googleusercontent.com&amp;redirect_uri=http%3A%2F%2F127.0.0.1%3A8080%2Fapi%2Fauth%2Fgoogle%2Fcallback&amp;scope=openid+profile+email&amp;response_type=code\">https://accounts.google.com/o/oauth2/auth?client_id=35969772878-dt0pqbefehbuqt1bvli5tcu3qu1c43td.apps.googleusercontent.com&amp;redirect_uri=http%3A%2F%2F127.0.0.1%3A8080%2Fapi%2Fauth%2Fgoogle%2Fcallback&amp;scope=openid+profile+email&amp;response_type=code</a>.\n    </body>\n</html>"
      tags:
        - Endpoints
      security: []
  /api/auth/google/callback:
    get:
      summary: "2. Handle Callback (Saat user balik dari Google)\nEndpoint: /api/auth/google/callback"
      operationId: 2HandleCallbackSaatUserBalikDariGoogleEndpointapiauthgooglecallback
      description: ''
      parameters: []
      responses:
        302:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "<!DOCTYPE html>\n<html>\n    <head>\n        <meta charset=\"UTF-8\" />\n        <meta http-equiv=\"refresh\" content=\"0;url='http://localhost:3000/auth/login?error=google_login_failed'\" />\n\n        <title>Redirecting to http://localhost:3000/auth/login?error=google_login_failed</title>\n    </head>\n    <body>\n        Redirecting to <a href=\"http://localhost:3000/auth/login?error=google_login_failed\">http://localhost:3000/auth/login?error=google_login_failed</a>.\n    </body>\n</html>"
      tags:
        - Endpoints
      security: []
  '/api/courses/{slug}':
    get:
      summary: "2. GET SINGLE COURSE (Detail Page)\nEndpoint: /api/courses/{slug}"
      operationId: 2GETSINGLECOURSEDetailPageEndpointapicoursesslug
      description: ''
      parameters: []
      responses:
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'No query results for model [App\Models\Course].'
                properties:
                  message:
                    type: string
                    example: 'No query results for model [App\Models\Course].'
      tags:
        - Endpoints
      security: []
    parameters:
      -
        in: path
        name: slug
        description: 'The slug of the course.'
        example: architecto
        required: true
        schema:
          type: string
  '/api/certificates/verify/{certificateNumber}':
    get:
      summary: 'Verify certificate (public endpoint)'
      operationId: verifyCertificatepublicEndpoint
      description: ''
      parameters: []
      responses:
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  valid: false
                  message: 'Certificate not found or invalid.'
                properties:
                  valid:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Certificate not found or invalid.'
      tags:
        - Endpoints
      security: []
    parameters:
      -
        in: path
        name: certificateNumber
        description: ''
        example: architecto
        required: true
        schema:
          type: string
  /api/logout:
    post:
      summary: ''
      operationId: postApiLogout
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      security: []
  /api/me:
    get:
      summary: ''
      operationId: getApiMe
      description: ''
      parameters: []
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
      tags:
        - Endpoints
      security: []
  '/api/lessons/{lessonId}':
    get:
      summary: ''
      operationId: getApiLessonsLessonId
      description: ''
      parameters: []
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
      tags:
        - Endpoints
      security: []
    parameters:
      -
        in: path
        name: lessonId
        description: ''
        example: architecto
        required: true
        schema:
          type: string
  '/api/lessons/{lessonId}/questions/{seq}':
    get:
      summary: ''
      operationId: getApiLessonsLessonIdQuestionsSeq
      description: ''
      parameters: []
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
      tags:
        - Endpoints
      security: []
    parameters:
      -
        in: path
        name: lessonId
        description: ''
        example: architecto
        required: true
        schema:
          type: string
      -
        in: path
        name: seq
        description: ''
        example: architecto
        required: true
        schema:
          type: string
  '/api/lessons/{lessonId}/submit-quiz':
    post:
      summary: "Submit Quiz Answers\nPOST /api/lessons/{lessonId}/submit-quiz\nBody: { \"answers\": { \"1\": 2, \"2\": 5, ."
      operationId: submitQuizAnswersPOSTapilessonslessonIdsubmitQuizBodyanswers1225
      description: '.. } } // seq => option_id'
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                answers:
                  type: array
                  description: ''
                  example:
                    - 16
                  items:
                    type: integer
              required:
                - answers
      security: []
    parameters:
      -
        in: path
        name: lessonId
        description: ''
        example: architecto
        required: true
        schema:
          type: string
  '/api/lessons/{lessonId}/complete':
    post:
      summary: "Complete Lesson (video, text, document)\nPOST /api/lessons/{lessonId}/complete"
      operationId: completeLessonvideoTextDocumentPOSTapilessonslessonIdcomplete
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      security: []
    parameters:
      -
        in: path
        name: lessonId
        description: ''
        example: architecto
        required: true
        schema:
          type: string
  '/api/quiz-attempts/{attemptId}/review':
    get:
      summary: "Review Quiz Attempt with detailed answers\nGET /api/quiz-attempts/{attemptId}/review"
      operationId: reviewQuizAttemptWithDetailedAnswersGETapiquizAttemptsattemptIdreview
      description: ''
      parameters: []
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
      tags:
        - Endpoints
      security: []
    parameters:
      -
        in: path
        name: attemptId
        description: ''
        example: architecto
        required: true
        schema:
          type: string
  /api/courses:
    get:
      summary: "1. GET ALL COURSES (Catalog)\nEndpoint: /api/courses"
      operationId: 1GETALLCOURSESCatalogEndpointapicourses
      description: ''
      parameters: []
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
      tags:
        - Endpoints
      security: []
  '/api/courses/{courseId}/enroll':
    post:
      summary: ''
      operationId: postApiCoursesCourseIdEnroll
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      security: []
    parameters:
      -
        in: path
        name: courseId
        description: ''
        example: 1
        required: true
        schema:
          type: integer
  /api/my-courses:
    get:
      summary: "3. GET MY COURSES (user enrolled)\nEndpoint: /api/my-courses"
      operationId: 3GETMYCOURSESuserEnrolledEndpointapimyCourses
      description: ''
      parameters: []
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
      tags:
        - Endpoints
      security: []
  /api/dashboard/stats:
    get:
      summary: "Get dashboard statistics\nGET /api/dashboard/stats"
      operationId: getDashboardStatisticsGETapidashboardstats
      description: ''
      parameters: []
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
      tags:
        - Endpoints
      security: []
  /api/dashboard/continue-learning:
    get:
      summary: "Get continue learning (last accessed lesson)\nGET /api/dashboard/continue-learning"
      operationId: getContinueLearninglastAccessedLessonGETapidashboardcontinueLearning
      description: ''
      parameters: []
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
      tags:
        - Endpoints
      security: []
  /api/my-certificates:
    get:
      summary: "Get all user's certificates"
      operationId: getAllUsersCertificates
      description: ''
      parameters: []
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
      tags:
        - Endpoints
      security: []
  '/api/certificates/{id}':
    get:
      summary: 'Get certificate detail'
      operationId: getCertificateDetail
      description: ''
      parameters: []
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
      tags:
        - Endpoints
      security: []
    parameters:
      -
        in: path
        name: id
        description: 'The ID of the certificate.'
        example: 16
        required: true
        schema:
          type: integer
  '/api/certificates/{id}/download':
    get:
      summary: 'Download certificate as PDF'
      operationId: downloadCertificateAsPDF
      description: ''
      parameters: []
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
      tags:
        - Endpoints
      security: []
    parameters:
      -
        in: path
        name: id
        description: 'The ID of the certificate.'
        example: 16
        required: true
        schema:
          type: integer
  /api/admin/courses:
    get:
      summary: 'Get all courses (with filtering, pagination)'
      operationId: getAllCourseswithFilteringPagination
      description: ''
      parameters: []
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
      tags:
        - Endpoints
      security: []
    post:
      summary: 'Create new course'
      operationId: createNewCourse
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                title:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: b
                price:
                  type: number
                  description: 'Must be at least 0.'
                  example: 39
                instructor_name:
                  type: string
                  description: ''
                  example: architecto
                thumbnail:
                  type: string
                  format: binary
                  description: 'Must be an image. Must not be greater than 2048 kilobytes.'
                  nullable: true
                description:
                  type: string
                  description: ''
                  example: 'Eius et animi quos velit et.'
                  nullable: true
              required:
                - title
                - price
                - instructor_name
      security: []
  '/api/admin/courses/{id}':
    get:
      summary: 'Get single course detail with sections and lessons'
      operationId: getSingleCourseDetailWithSectionsAndLessons
      description: ''
      parameters: []
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
      tags:
        - Endpoints
      security: []
    put:
      summary: ''
      operationId: putApiAdminCoursesId
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: b
                status:
                  type: string
                  description: ''
                  example: published
                  enum:
                    - draft
                    - published
      security: []
    delete:
      summary: ''
      operationId: deleteApiAdminCoursesId
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      security: []
    parameters:
      -
        in: path
        name: id
        description: 'The ID of the course.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/admin/courses/{courseId}/sections':
    get:
      summary: 'Get all sections for a course'
      operationId: getAllSectionsForACourse
      description: ''
      parameters: []
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
      tags:
        - Endpoints
      security: []
    post:
      summary: 'Create section'
      operationId: createSection
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                  description: ''
                  example: architecto
              required:
                - title
      security: []
    parameters:
      -
        in: path
        name: courseId
        description: ''
        example: 1
        required: true
        schema:
          type: integer
  '/api/admin/sections/{sectionId}':
    get:
      summary: 'Get single section with lessons'
      operationId: getSingleSectionWithLessons
      description: ''
      parameters: []
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
      tags:
        - Endpoints
      security: []
    put:
      summary: 'Update section'
      operationId: updateSection
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                  description: ''
                  example: architecto
              required:
                - title
      security: []
    delete:
      summary: 'Delete section'
      operationId: deleteSection
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      security: []
    parameters:
      -
        in: path
        name: sectionId
        description: ''
        example: architecto
        required: true
        schema:
          type: string
  '/api/admin/sections/{sectionId}/lessons':
    get:
      summary: 'Get all lessons in a section'
      operationId: getAllLessonsInASection
      description: ''
      parameters: []
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
      tags:
        - Endpoints
      security: []
    post:
      summary: 'Create lesson (video, document, text, or quiz)'
      operationId: createLessonvideoDocumentTextOrQuiz
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                title:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: b
                type:
                  type: string
                  description: ''
                  example: architecto
                content_source:
                  type: string
                  description: 'untuk video & document wajib ada sumber konten.'
                  example: null
                content_file:
                  type: string
                  format: binary
                  description: 'file utama kalau upload (video/document). Must be a file. Must not be greater than 512000 kilobytes.'
                content_url:
                  type: string
                  description: 'url utama kalau external (video/document). Must be a valid URL.'
                  example: 'http://bailey.com/'
                content_text:
                  type: string
                  description: 'text wajib punya konten text.'
                  example: architecto
                  nullable: true
              required:
                - title
                - type
      security: []
    parameters:
      -
        in: path
        name: sectionId
        description: ''
        example: architecto
        required: true
        schema:
          type: string
  '/api/admin/lessons/{lessonId}':
    get:
      summary: 'Get single lesson detail'
      operationId: getSingleLessonDetail
      description: ''
      parameters: []
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
      tags:
        - Endpoints
      security: []
    put:
      summary: 'Update lesson'
      operationId: updateLesson
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: b
                  nullable: true
                type:
                  type: string
                  description: ''
                  example: null
                  nullable: true
                content_text:
                  type: string
                  description: ''
                  example: architecto
                  nullable: true
                content_url:
                  type: string
                  description: 'Must be a valid URL.'
                  example: 'http://bailey.com/'
                  nullable: true
      security: []
    delete:
      summary: 'Delete lesson'
      operationId: deleteLesson
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      security: []
    parameters:
      -
        in: path
        name: lessonId
        description: ''
        example: architecto
        required: true
        schema:
          type: string
  '/api/admin/lessons/{lessonId}/quiz':
    get:
      summary: 'Get quiz with all questions for editing'
      operationId: getQuizWithAllQuestionsForEditing
      description: ''
      parameters: []
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
      tags:
        - Endpoints
      security: []
    parameters:
      -
        in: path
        name: lessonId
        description: ''
        example: architecto
        required: true
        schema:
          type: string
  '/api/admin/lessons/{lessonId}/questions':
    post:
      summary: 'Add single question to quiz (save 1-1)'
      operationId: addSingleQuestionToQuizsave11
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                question_text:
                  type: string
                  description: ''
                  example: architecto
                points:
                  type: integer
                  description: 'Must be at least 1.'
                  example: 22
                sequence:
                  type: integer
                  description: ''
                  example: 16
                  nullable: true
                options:
                  type: array
                  description: 'Must have at least 2 items.'
                  example:
                    - []
                  items:
                    type: object
                    properties:
                      option_text:
                        type: string
                        description: ''
                        example: architecto
                      is_correct:
                        type: boolean
                        description: ''
                        example: true
                    required:
                      - option_text
                      - is_correct
              required:
                - question_text
                - points
                - options
      security: []
    parameters:
      -
        in: path
        name: lessonId
        description: ''
        example: architecto
        required: true
        schema:
          type: string
  '/api/admin/questions/{questionId}':
    put:
      summary: 'Update single question'
      operationId: updateSingleQuestion
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                question_text:
                  type: string
                  description: ''
                  example: architecto
                  nullable: true
                points:
                  type: integer
                  description: 'Must be at least 1.'
                  example: 22
                  nullable: true
                sequence:
                  type: integer
                  description: ''
                  example: 16
                  nullable: true
                options:
                  type: array
                  description: 'Must have at least 2 items.'
                  example: null
                  items:
                    type: object
                    nullable: true
                    properties:
                      id:
                        type: integer
                        description: ''
                        example: 16
                        nullable: true
                      option_text:
                        type: string
                        description: 'This field is required when <code>options</code> is present.'
                        example: architecto
                      is_correct:
                        type: boolean
                        description: 'This field is required when <code>options</code> is present.'
                        example: true
      security: []
    delete:
      summary: 'Delete single question'
      operationId: deleteSingleQuestion
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      security: []
    parameters:
      -
        in: path
        name: questionId
        description: ''
        example: architecto
        required: true
        schema:
          type: string
  '/api/admin/lessons/{lessonId}/questions/reorder':
    post:
      summary: 'Reorder questions in quiz'
      operationId: reorderQuestionsInQuiz
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                questions:
                  type: array
                  description: ''
                  example:
                    - []
                  items:
                    type: object
                    properties:
                      id:
                        type: integer
                        description: ''
                        example: 16
                      sequence:
                        type: integer
                        description: ''
                        example: 16
                    required:
                      - id
                      - sequence
              required:
                - questions
      security: []
    parameters:
      -
        in: path
        name: lessonId
        description: ''
        example: architecto
        required: true
        schema:
          type: string
  '/api/admin/courses/{courseId}/certificate':
    get:
      summary: 'Get certificate configuration for a course'
      operationId: getCertificateConfigurationForACourse
      description: ''
      parameters: []
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
      tags:
        - Endpoints
      security: []
    parameters:
      -
        in: path
        name: courseId
        description: ''
        example: 1
        required: true
        schema:
          type: integer
  '/api/admin/courses/{courseId}/certificate-config':
    post:
      summary: 'Create or update certificate configuration'
      operationId: createOrUpdateCertificateConfiguration
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      requestBody:
        required: false
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                template_type:
                  type: string
                  description: ''
                  example: minimal
                  enum:
                    - classic
                    - modern
                    - elegant
                    - minimal
                  nullable: true
                logo:
                  type: string
                  format: binary
                  description: 'Must be an image. Must not be greater than 512 kilobytes.'
                  nullable: true
                background_image:
                  type: string
                  format: binary
                  description: 'Must be an image. Must not be greater than 2048 kilobytes.'
                  nullable: true
                primary_color:
                  type: string
                  description: 'Must match the regex /^#[0-9A-Fa-f]{6}$/.'
                  example: '#fEEeDb'
                  nullable: true
                secondary_color:
                  type: string
                  description: 'Must match the regex /^#[0-9A-Fa-f]{6}$/.'
                  example: '#fEEeDb'
                  nullable: true
                certificate_text:
                  type: string
                  description: 'Must not be greater than 1000 characters.'
                  example: l
                  nullable: true
                certificate_title:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: j
                  nullable: true
                show_qr_code:
                  type: boolean
                  description: ''
                  example: true
                  nullable: true
      security: []
    put:
      summary: 'Update certificate configuration'
      operationId: updateCertificateConfiguration
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      requestBody:
        required: false
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                template_type:
                  type: string
                  description: ''
                  example: elegant
                  enum:
                    - classic
                    - modern
                    - elegant
                    - minimal
                  nullable: true
                logo:
                  type: string
                  format: binary
                  description: 'Must be an image. Must not be greater than 512 kilobytes.'
                  nullable: true
                background_image:
                  type: string
                  format: binary
                  description: 'Must be an image. Must not be greater than 2048 kilobytes.'
                  nullable: true
                primary_color:
                  type: string
                  description: 'Must match the regex /^#[0-9A-Fa-f]{6}$/.'
                  example: '#fEEeDb'
                  nullable: true
                secondary_color:
                  type: string
                  description: 'Must match the regex /^#[0-9A-Fa-f]{6}$/.'
                  example: '#fEEeDb'
                  nullable: true
                certificate_text:
                  type: string
                  description: 'Must not be greater than 1000 characters.'
                  example: l
                  nullable: true
                certificate_title:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: j
                  nullable: true
                show_qr_code:
                  type: boolean
                  description: ''
                  example: true
                  nullable: true
                remove_logo:
                  type: boolean
                  description: ''
                  example: false
                  nullable: true
                remove_background:
                  type: boolean
                  description: ''
                  example: true
                  nullable: true
      security: []
    delete:
      summary: 'Delete certificate configuration'
      operationId: deleteCertificateConfiguration
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      security: []
    parameters:
      -
        in: path
        name: courseId
        description: ''
        example: 1
        required: true
        schema:
          type: integer
  '/api/admin/courses/{courseId}/signatures':
    get:
      summary: 'List all signatures for a course'
      operationId: listAllSignaturesForACourse
      description: ''
      parameters: []
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
      tags:
        - Endpoints
      security: []
    post:
      summary: 'Create a new signature'
      operationId: createANewSignature
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                signatory_name:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: b
                signatory_title:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: 'n'
                signature_image:
                  type: string
                  format: binary
                  description: 'Must be an image. Must not be greater than 1024 kilobytes.'
                  nullable: true
                order:
                  type: integer
                  description: 'Must be at least 1.'
                  example: 67
                  nullable: true
              required:
                - signatory_name
                - signatory_title
      security: []
    parameters:
      -
        in: path
        name: courseId
        description: ''
        example: 1
        required: true
        schema:
          type: integer
  '/api/admin/courses/{courseId}/signatures/{signatureId}':
    put:
      summary: 'Update a signature'
      operationId: updateASignature
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      requestBody:
        required: false
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                signatory_name:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: b
                  nullable: true
                signatory_title:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: 'n'
                  nullable: true
                signature_image:
                  type: string
                  format: binary
                  description: 'Must be an image. Must not be greater than 1024 kilobytes.'
                  nullable: true
                order:
                  type: integer
                  description: 'Must be at least 1.'
                  example: 67
                  nullable: true
                remove_signature:
                  type: boolean
                  description: ''
                  example: true
                  nullable: true
      security: []
    delete:
      summary: 'Delete a signature'
      operationId: deleteASignature
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      security: []
    parameters:
      -
        in: path
        name: courseId
        description: ''
        example: 1
        required: true
        schema:
          type: integer
      -
        in: path
        name: signatureId
        description: ''
        example: architecto
        required: true
        schema:
          type: string
  '/api/admin/courses/{courseId}/signatures/reorder':
    post:
      summary: 'Reorder signatures'
      operationId: reorderSignatures
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                signatures:
                  type: array
                  description: ''
                  example:
                    - []
                  items:
                    type: object
                    properties:
                      id:
                        type: integer
                        description: 'The <code>id</code> of an existing record in the certificate_signatures table.'
                        example: 16
                      order:
                        type: integer
                        description: 'Must be at least 1.'
                        example: 22
                    required:
                      - id
                      - order
              required:
                - signatures
      security: []
    parameters:
      -
        in: path
        name: courseId
        description: ''
        example: 1
        required: true
        schema:
          type: integer
