Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#32 Refactored OpenAPI spec a little #45

Merged
merged 1 commit into from
Apr 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 24 additions & 30 deletions botalka/src/main/resources/static/openapi/api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -329,6 +319,7 @@ components:
- status
PromotionRequest:
allOf:
- $ref: '#/components/schemas/PromotionRequestDraft'
- type: object
properties:
id:
Expand All @@ -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:
Expand All @@ -376,3 +366,7 @@ components:
type: string
description: Detailed Message
example: Username must contain only latin letter
required:
- code
- status
- message
Loading