diff --git a/botalka/src/main/resources/static/openapi/api.yml b/botalka/src/main/resources/static/openapi/api.yml index c4980f4..c9bc6cd 100644 --- a/botalka/src/main/resources/static/openapi/api.yml +++ b/botalka/src/main/resources/static/openapi/api.yml @@ -230,11 +230,6 @@ components: example: 2024-04-14T13:32:42Z HomeworkDraft: type: object - required: - - title - - description - - max_score - - publication_moment properties: title: $ref: '#/components/schemas/HomeworkTitle' @@ -244,28 +239,23 @@ components: $ref: '#/components/schemas/HomeworkScore' publication_moment: $ref: '#/components/schemas/HomeworkPublicationMoment' - Homework: - type: object required: - - id - title - description - max_score - publication_moment - - creation_moment - properties: - id: - $ref: '#/components/schemas/HomeworkId' - title: - $ref: '#/components/schemas/HomeworkTitle' - description: - $ref: '#/components/schemas/HomeworkDescription' - max_score: - $ref: '#/components/schemas/HomeworkScore' - publication_moment: - $ref: '#/components/schemas/HomeworkPublicationMoment' - creation_moment: - $ref: '#/components/schemas/CreationMoment' + Homework: + allOf: + - $ref: '#/components/schemas/HomeworkDraft' + - type: object + properties: + id: + $ref: '#/components/schemas/HomeworkId' + creation_moment: + $ref: '#/components/schemas/CreationMoment' + required: + - id + - creation_moment UserId: type: integer description: A unique key for a user at the entire system @@ -275,12 +265,12 @@ components: description: Short human readable unique name of the user example: vityaman UserDraft: - required: - - alias type: object properties: alias: $ref: '#/components/schemas/UserAlias' + required: + - alias UserRole: type: string enum: @@ -329,6 +319,7 @@ components: - status PromotionRequest: allOf: + - $ref: '#/components/schemas/PromotionRequestDraft' - type: object properties: id: @@ -341,25 +332,24 @@ components: - id - user_id - status - - $ref: '#/components/schemas/PromotionRequestDraft' NoteDraft: - required: - - content type: object properties: content: type: string - Note: - type: object required: - - id - content + Note: + type: object properties: id: type: integer format: int64 content: type: string + required: + - id + - content GeneralError: type: object properties: @@ -376,3 +366,7 @@ components: type: string description: Detailed Message example: Username must contain only latin letter + required: + - code + - status + - message