Skip to content

Commit

Permalink
📝 docs: Updated Swagger documentation for attendance status values
Browse files Browse the repository at this point in the history
- Corrected the description for attendance status in Swagger docs to use the proper enum values 'ATTENDANCE', 'TARDY', 'ABSENCE' instead of 'Attendance', 'Tardy', 'Absence'.

Related issue: #325
  • Loading branch information
yuminn-k committed Jun 16, 2024
1 parent 674fe0f commit c6a48d0
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 6 deletions.
21 changes: 19 additions & 2 deletions docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const docTemplate = `{
"Bearer": []
}
],
"description": "複数の出席情報を作成または更新します。'Attendance', 'Tardy', 'Absence'のいずれかのステータスを持つことができます。",
"description": "複数の出席情報を作成または更新します。'ATTENDANCE', 'TARDY', 'ABSENCE'のいずれかのステータスを持つことができます。",
"consumes": [
"application/json"
],
Expand Down Expand Up @@ -3114,14 +3114,31 @@ const docTemplate = `{
},
"isAttendance": {
"description": "出席, 遅刻, 欠席",
"type": "string"
"allOf": [
{
"$ref": "#/definitions/models.AttendanceType"
}
]
},
"uid": {
"description": "User ID",
"type": "integer"
}
}
},
"models.AttendanceType": {
"type": "string",
"enum": [
"ATTENDANCE",
"TARDY",
"ABSENCE"
],
"x-enum-varnames": [
"AttendanceStatus",
"TardyStatus",
"AbsenceStatus"
]
},
"models.Class": {
"type": "object",
"properties": {
Expand Down
21 changes: 19 additions & 2 deletions docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"Bearer": []
}
],
"description": "複数の出席情報を作成または更新します。'Attendance', 'Tardy', 'Absence'のいずれかのステータスを持つことができます。",
"description": "複数の出席情報を作成または更新します。'ATTENDANCE', 'TARDY', 'ABSENCE'のいずれかのステータスを持つことができます。",
"consumes": [
"application/json"
],
Expand Down Expand Up @@ -3103,14 +3103,31 @@
},
"isAttendance": {
"description": "出席, 遅刻, 欠席",
"type": "string"
"allOf": [
{
"$ref": "#/definitions/models.AttendanceType"
}
]
},
"uid": {
"description": "User ID",
"type": "integer"
}
}
},
"models.AttendanceType": {
"type": "string",
"enum": [
"ATTENDANCE",
"TARDY",
"ABSENCE"
],
"x-enum-varnames": [
"AttendanceStatus",
"TardyStatus",
"AbsenceStatus"
]
},
"models.Class": {
"type": "object",
"properties": {
Expand Down
15 changes: 13 additions & 2 deletions docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,23 @@ definitions:
id:
type: integer
isAttendance:
allOf:
- $ref: '#/definitions/models.AttendanceType'
description: 出席, 遅刻, 欠席
type: string
uid:
description: User ID
type: integer
type: object
models.AttendanceType:
enum:
- ATTENDANCE
- TARDY
- ABSENCE
type: string
x-enum-varnames:
- AttendanceStatus
- TardyStatus
- AbsenceStatus
models.Class:
properties:
description:
Expand Down Expand Up @@ -203,7 +214,7 @@ paths:
post:
consumes:
- application/json
description: 複数の出席情報を作成または更新します。'Attendance', 'Tardy', 'Absence'のいずれかのステータスを持つことができます。
description: 複数の出席情報を作成または更新します。'ATTENDANCE', 'TARDY', 'ABSENCE'のいずれかのステータスを持つことができます。
parameters:
- description: 出席情報
in: body
Expand Down

0 comments on commit c6a48d0

Please sign in to comment.