docs(backend): Assignments swagger annotaties

This commit is contained in:
Tibo De Peuter 2025-03-07 12:14:35 +01:00
parent 41dcb57b25
commit 38acfa6a4a
Signed by: tdpeuter
GPG key ID: 38297DE43F75FFE2
4 changed files with 206 additions and 1 deletions

View file

@ -3,6 +3,39 @@ import { Group } from './group.entity.js';
import { Entity, Enum, ManyToOne, PrimaryKey, Property } from '@mikro-orm/core';
import { Language } from '../content/language.js';
/**
* @swagger
* components:
* schemas:
* Submission:
* type: object
* properties:
* learningObjectHruid:
* type: string
* learningObjectLanguage:
* $ref: '#/components/schemas/Language'
* learningObjectVersion:
* type: string
* default: '1'
* submissionNumber:
* type: number
* submitter:
* $ref: '#/components/schemas/Student'
* submissionTime:
* type: string
* format: date-time
* onBehalfOf:
* $ref: '#/components/schemas/Group'
* content:
* type: string
* required:
* - learningObjectHruid
* - learningObjectLanguage
* - submissionNumber
* - submitter
* - submissionTime
* - content
*/
@Entity()
export class Submission {
@PrimaryKey({ type: 'string' })