openapi: 3.2.0 info: title: EVEDEX - Academy Material API version: 1.0.0 servers: - url: https://academy.evedex.com tags: - name: Material paths: /api/course/{courseId}/lesson/{lessonId}/material/{materialId}: put: tags: - Material security: - AccessToken: [] parameters: - in: path name: courseId schema: type: string format: uuid required: true - in: path name: lessonId schema: type: string format: uuid required: true - in: path name: materialId schema: type: string format: uuid required: true requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/MaterialUpdateBody' responses: '200': description: 200 OK content: application/json: schema: $ref: '#/components/schemas/MaterialObject' delete: tags: - Material security: - AccessToken: [] parameters: - in: path name: courseId schema: type: string format: uuid required: true - in: path name: lessonId schema: type: string format: uuid required: true - in: path name: materialId schema: type: string format: uuid required: true responses: '200': description: 200 OK content: application/json: schema: $ref: '#/components/schemas/EmptyResponse' /api/course/{courseId}/lesson/{lessonId}/material: get: tags: - Material security: [] parameters: - in: path name: courseId schema: type: string required: true - in: path name: lessonId schema: type: string required: true responses: '200': description: 200 OK content: application/json: schema: type: array items: $ref: '#/components/schemas/MaterialObject' post: tags: - Material security: - AccessToken: [] parameters: - in: path name: courseId schema: type: string required: true - in: path name: lessonId schema: type: string required: true requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/MaterialCreateBody' responses: '200': description: 200 OK content: application/json: schema: $ref: '#/components/schemas/MaterialObject' components: schemas: MaterialUpdateBody: oneOf: - type: object properties: title: type: string type: type: string const: text content: type: object properties: type: type: string const: text markdown: type: string required: - type - markdown order: type: number required: - type - content - type: object properties: title: type: string type: type: string const: embedded-video content: type: object properties: type: type: string const: embedded-video source: type: string enum: - vimeo - youtube - other url: type: string format: uri preview: type: object properties: mime: type: string enum: - image/jpeg - image/png - image/webp - image/avif - image/svg+xml url: type: string format: uri required: - mime - url required: - type - source - url order: type: number required: - type - content - type: object properties: title: type: string type: type: string const: video content: type: object properties: type: type: string const: video mime: type: string enum: - video/webm - video/mp4 - video/ogg url: type: string format: uri preview: type: object properties: mime: type: string enum: - image/jpeg - image/png - image/webp - image/avif - image/svg+xml url: type: string format: uri required: - mime - url required: - type - mime - url order: type: number required: - type - content - type: object properties: title: type: string type: type: string const: file content: type: object properties: type: type: string const: file files: type: array items: type: object properties: title: type: string mime: type: string url: type: string format: uri size: type: number required: - url - size required: - type - files order: type: number required: - type - content - type: object properties: title: type: string type: type: string const: image content: type: object properties: type: type: string const: image title: type: string url: type: string format: uri required: - type - url order: type: number required: - type - content - type: object properties: title: type: string type: type: string const: links content: type: object properties: type: type: string const: links links: type: array items: type: object properties: url: type: string label: type: string required: - url required: - type - links order: type: number required: - type - content - type: object properties: title: type: string type: type: string const: banner content: type: object properties: type: type: string const: banner title: type: string text: type: string buttonText: type: string backgroundImage: type: string format: uri image: type: string format: uri required: - type - title - buttonText - backgroundImage order: type: number required: - type - content MaterialObject: type: object properties: id: type: string format: uuid lesson: type: string format: uuid title: type: string type: type: string enum: - text - links - banner - embedded-video - video - file - image content: anyOf: - type: object properties: type: type: string const: text markdown: type: string required: - type - markdown - type: object properties: type: type: string const: embedded-video source: type: string enum: - vimeo - youtube - other url: type: string format: uri preview: type: object properties: mime: type: string enum: - image/jpeg - image/png - image/webp - image/avif - image/svg+xml url: type: string format: uri required: - mime - url required: - type - source - url - type: object properties: type: type: string const: video mime: type: string enum: - video/webm - video/mp4 - video/ogg url: type: string format: uri preview: type: object properties: mime: type: string enum: - image/jpeg - image/png - image/webp - image/avif - image/svg+xml url: type: string format: uri required: - mime - url required: - type - mime - url - type: object properties: type: type: string const: file files: type: array items: type: object properties: title: type: string mime: type: string url: type: string format: uri size: type: number required: - url - size required: - type - files - type: object properties: type: type: string const: image title: type: string url: type: string format: uri required: - type - url - type: object properties: type: type: string const: links links: type: array items: type: object properties: url: type: string label: type: string required: - url required: - type - links - type: object properties: type: type: string const: banner title: type: string text: type: string buttonText: type: string backgroundImage: type: string format: uri image: type: string format: uri required: - type - title - buttonText - backgroundImage order: type: number createdAt: type: string updatedAt: type: string subtitles: type: array items: type: object properties: id: type: string format: uuid languageCode: type: string label: type: string url: type: string createdAt: type: string updatedAt: type: string required: - id - languageCode - label - url - createdAt - updatedAt required: - id - lesson - title - type - content - order - createdAt - updatedAt MaterialCreateBody: oneOf: - type: object properties: title: type: string type: type: string const: text content: type: object properties: type: type: string const: text markdown: type: string required: - type - markdown required: - type - content - type: object properties: title: type: string type: type: string const: embedded-video content: type: object properties: type: type: string const: embedded-video source: type: string enum: - vimeo - youtube - other url: type: string format: uri preview: type: object properties: mime: type: string enum: - image/jpeg - image/png - image/webp - image/avif - image/svg+xml url: type: string format: uri required: - mime - url required: - type - source - url required: - type - content - type: object properties: title: type: string type: type: string const: video content: type: object properties: type: type: string const: video mime: type: string enum: - video/webm - video/mp4 - video/ogg url: type: string format: uri preview: type: object properties: mime: type: string enum: - image/jpeg - image/png - image/webp - image/avif - image/svg+xml url: type: string format: uri required: - mime - url required: - type - mime - url required: - type - content - type: object properties: title: type: string type: type: string const: file content: type: object properties: type: type: string const: file files: type: array items: type: object properties: title: type: string mime: type: string url: type: string format: uri size: type: number required: - url - size required: - type - files required: - type - content - type: object properties: title: type: string type: type: string const: image content: type: object properties: type: type: string const: image title: type: string url: type: string format: uri required: - type - url required: - type - content - type: object properties: title: type: string type: type: string const: links content: type: object properties: type: type: string const: links links: type: array items: type: object properties: url: type: string label: type: string required: - url required: - type - links required: - type - content - type: object properties: title: type: string type: type: string const: banner content: type: object properties: type: type: string const: banner title: type: string text: type: string buttonText: type: string backgroundImage: type: string format: uri image: type: string format: uri required: - type - title - buttonText - backgroundImage required: - type - content EmptyResponse: type: object securitySchemes: AccessToken: type: http scheme: bearer InternalKey: type: http scheme: bearer