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

Swaggerのドキュメントタグ更新 #77

Merged
merged 1 commit into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
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
8 changes: 4 additions & 4 deletions controllers/attendance_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func NewAttendanceController(service services.AttendanceService) *AttendanceCont
// CreateOrUpdateAttendance godoc
// @Summary 出席情報を作成または更新
// @Description 出席情報を作成または更新
// @Tags attendance
// @Tags Attendance
// @Accept json
// @Produce json
// @Param cid path int true "Class ID"
Expand Down Expand Up @@ -55,7 +55,7 @@ func (ac *AttendanceController) CreateOrUpdateAttendance(ctx *gin.Context) {
// GetAllAttendances godoc
// @Summary クラスの全ての出席情報を取得
// @Description クラスの全ての出席情報を取得
// @Tags attendance
// @Tags Attendance
// @Accept json
// @Produce json
// @Param classID path int true "Class ID"
Expand All @@ -80,7 +80,7 @@ func (ac *AttendanceController) GetAllAttendances(ctx *gin.Context) {
// GetAttendance godoc
// @Summary 出席情報を取得
// @Description 指定されたIDの出席情報を取得
// @Tags attendance
// @Tags Attendance
// @Accept json
// @Produce json
// @Param id path int true "Attendance ID"
Expand All @@ -100,7 +100,7 @@ func (ac *AttendanceController) GetAttendance(ctx *gin.Context) {
// DeleteAttendance godoc
// @Summary 出席情報を削除
// @Description 指定されたIDの出席情報を削除
// @Tags attendance
// @Tags Attendance
// @Accept json
// @Produce json
// @Param id path int true "Attendance ID"
Expand Down
12 changes: 6 additions & 6 deletions controllers/class_board_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func NewClassBoardController(service services.ClassBoardService, uploader utils.
// CreateClassBoard godoc
// @Summary クラス掲示板を作成
// @Description クラス掲示板を作成します。
// @Tags class_board
// @Tags Class Board
// @Accept multipart/form-data
// @Produce json
// @Param title formData string true "Class board title"
Expand Down Expand Up @@ -69,7 +69,7 @@ func (c *ClassBoardController) CreateClassBoard(ctx *gin.Context) {
// GetClassBoardByID godoc
// @Summary IDでグループ掲示板を取得
// @Description 指定されたIDのグループ掲示板の詳細を取得します。
// @Tags class_board
// @Tags Class Board
// @Accept json
// @Produce json
// @Param id path int true "グループ掲示板ID"
Expand Down Expand Up @@ -97,7 +97,7 @@ func (c *ClassBoardController) GetClassBoardByID(ctx *gin.Context) {
// GetAllClassBoards godoc
// @Summary 全てのグループ掲示板を取得
// @Description cidに基づいて、グループの全ての掲示板を取得します。
// @Tags class_board
// @Tags Class Board
// @Accept json
// @Produce json
// @Param cid query int true "クラスID"
Expand All @@ -121,7 +121,7 @@ func (c *ClassBoardController) GetAllClassBoards(ctx *gin.Context) {
// GetAnnouncedClassBoards godoc
// @Summary 公告されたグループ掲示板を取得
// @Description cidに基づいて、公告されたグループの掲示板を取得します。
// @Tags class_board
// @Tags Class Board
// @Accept json
// @Produce json
// @Param cid query int true "クラスID"
Expand All @@ -146,7 +146,7 @@ func (c *ClassBoardController) GetAnnouncedClassBoards(ctx *gin.Context) {
// UpdateClassBoard godoc
// @Summary グループ掲示板を更新
// @Description 指定されたIDのグループ掲示板の詳細を更新します。
// @Tags class_board
// @Tags Class Board
// @Accept json
// @Produce json
// @Param id path int true "グループ掲示板ID"
Expand Down Expand Up @@ -184,7 +184,7 @@ func (c *ClassBoardController) UpdateClassBoard(ctx *gin.Context) {
// DeleteClassBoard godoc
// @Summary グループ掲示板を削除
// @Description 指定されたIDのグループ掲示板を削除します。
// @Tags class_board
// @Tags Class Board
// @Accept json
// @Produce json
// @Param id path int true "グループ掲示板ID"
Expand Down
4 changes: 2 additions & 2 deletions controllers/class_code_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func NewClassCodeController(classCodeService services.ClassCodeService, classUse
// CheckSecretExists godoc
// @Summary グループコードにシークレットが存在するかチェック
// @Description 指定されたグループコードにシークレットがあるかどうかをチェックする。
// @Tags class_code
// @Tags Class Code
// @Accept json
// @Produce json
// @Param code query string true "Code to check"
Expand All @@ -45,7 +45,7 @@ func (c *ClassCodeController) CheckSecretExists(ctx *gin.Context) {
// VerifyClassCode godoc
// @Summary グループコードとシークレットを検証&ユーザーに役割を割り当てる
// @Description グループコードと、該当する場合はそのシークレットを確認する。また、指定されたユーザーに役割を割り当てる。
// @Tags class_code
// @Tags Class Code
// @Accept json
// @Produce json
// @Param code query string true "Code to verify"
Expand Down
14 changes: 7 additions & 7 deletions controllers/class_schedule_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func NewClassScheduleController(service services.ClassScheduleService) *ClassSch
// CreateClassSchedule godoc
// @Summary クラススケジュールを作成
// @Description 新しいクラススケジュールを作成する。
// @Tags class_schedule
// @Tags Class Schedule
// @Accept json
// @Produce json
// @Param classSchedule body dto.ClassScheduleDTO true "Class schedule to create"
Expand Down Expand Up @@ -59,7 +59,7 @@ func (controller *ClassScheduleController) CreateClassSchedule(c *gin.Context) {
// GetClassScheduleByID godoc
// @Summary IDでクラススケジュールを取得
// @Description 指定されたIDのクラススケジュールを取得する。
// @Tags class_schedule
// @Tags Class Schedule
// @Accept json
// @Produce json
// @Param id path int true "Class schedule ID"
Expand All @@ -86,7 +86,7 @@ func (controller *ClassScheduleController) GetClassScheduleByID(c *gin.Context)
// GetAllClassSchedules godoc
// @Summary 全てのクラススケジュールを取得
// @Description 指定されたクラスIDの全てのクラススケジュールを取得する。
// @Tags class_schedule
// @Tags Class Schedule
// @Accept json
// @Produce json
// @Param cid query uint false "Class ID"
Expand All @@ -106,7 +106,7 @@ func (controller *ClassScheduleController) GetAllClassSchedules(c *gin.Context)
// UpdateClassSchedule godoc
// @Summary クラススケジュールを更新
// @Description 指定されたIDのクラススケジュールを更新する。
// @Tags class_schedule
// @Tags Class Schedule
// @Accept json
// @Produce json
// @Param id path int true "Class schedule ID"
Expand Down Expand Up @@ -140,7 +140,7 @@ func (controller *ClassScheduleController) UpdateClassSchedule(c *gin.Context) {
// DeleteClassSchedule godoc
// @Summary クラススケジュールを削除
// @Description 指定されたIDのクラススケジュールを削除する。
// @Tags class_schedule
// @Tags Class Schedule
// @Accept json
// @Produce json
// @Param id path int true "Class schedule ID"
Expand All @@ -166,7 +166,7 @@ func (controller *ClassScheduleController) DeleteClassSchedule(c *gin.Context) {
// GetLiveClassSchedules godoc
// @Summary ライブ中のクラススケジュールを取得
// @Description 指定されたクラスIDのライブ中のクラススケジュールを取得する。
// @Tags class_schedule
// @Tags Class Schedule
// @Accept json
// @Produce json
// @Param cid query uint true "Class ID"
Expand All @@ -186,7 +186,7 @@ func (controller *ClassScheduleController) GetLiveClassSchedules(c *gin.Context)
// GetClassSchedulesByDate godoc
// @Summary 日付でクラススケジュールを取得
// @Description 指定されたクラスIDと日付のクラススケジュールを取得する。
// @Tags class_schedule
// @Tags Class Schedule
// @Accept json
// @Produce json
// @Param cid query uint true "Class ID"
Expand Down
1 change: 1 addition & 0 deletions controllers/class_user_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ func NewClassUserController(service services.ClassUserService) *ClassUserControl
// ChangeUserRole godoc
// @Summary ユーザーのロールを変更します。
// @Description ユーザーのロールを変更します。
// @Tags Class User
// @ID change-user-role
// @Accept json
// @Produce json
Expand Down
41 changes: 22 additions & 19 deletions docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const docTemplate = `{
"application/json"
],
"tags": [
"attendance"
"Attendance"
],
"summary": "出席情報を取得",
"parameters": [
Expand Down Expand Up @@ -61,7 +61,7 @@ const docTemplate = `{
"application/json"
],
"tags": [
"attendance"
"Attendance"
],
"summary": "出席情報を削除",
"parameters": [
Expand Down Expand Up @@ -99,7 +99,7 @@ const docTemplate = `{
"application/json"
],
"tags": [
"attendance"
"Attendance"
],
"summary": "出席情報を作成または更新",
"parameters": [
Expand Down Expand Up @@ -158,7 +158,7 @@ const docTemplate = `{
"application/json"
],
"tags": [
"attendance"
"Attendance"
],
"summary": "クラスの全ての出席情報を取得",
"parameters": [
Expand Down Expand Up @@ -199,7 +199,7 @@ const docTemplate = `{
"application/json"
],
"tags": [
"class_board"
"Class Board"
],
"summary": "全てのグループ掲示板を取得",
"parameters": [
Expand Down Expand Up @@ -241,7 +241,7 @@ const docTemplate = `{
"application/json"
],
"tags": [
"class_board"
"Class Board"
],
"summary": "クラス掲示板を作成",
"parameters": [
Expand Down Expand Up @@ -318,7 +318,7 @@ const docTemplate = `{
"application/json"
],
"tags": [
"class_board"
"Class Board"
],
"summary": "公告されたグループ掲示板を取得",
"parameters": [
Expand Down Expand Up @@ -362,7 +362,7 @@ const docTemplate = `{
"application/json"
],
"tags": [
"class_board"
"Class Board"
],
"summary": "IDでグループ掲示板を取得",
"parameters": [
Expand Down Expand Up @@ -410,7 +410,7 @@ const docTemplate = `{
"application/json"
],
"tags": [
"class_board"
"Class Board"
],
"summary": "グループ掲示板を削除",
"parameters": [
Expand Down Expand Up @@ -452,7 +452,7 @@ const docTemplate = `{
"application/json"
],
"tags": [
"class_board"
"Class Board"
],
"summary": "グループ掲示板を更新",
"parameters": [
Expand Down Expand Up @@ -511,7 +511,7 @@ const docTemplate = `{
"application/json"
],
"tags": [
"class_code"
"Class Code"
],
"summary": "グループコードにシークレットが存在するかチェック",
"parameters": [
Expand Down Expand Up @@ -555,7 +555,7 @@ const docTemplate = `{
"application/json"
],
"tags": [
"class_code"
"Class Code"
],
"summary": "グループコードとシークレットを検証&ユーザーに役割を割り当てる",
"parameters": [
Expand Down Expand Up @@ -618,7 +618,7 @@ const docTemplate = `{
"application/json"
],
"tags": [
"class_schedule"
"Class Schedule"
],
"summary": "全てのクラススケジュールを取得",
"parameters": [
Expand Down Expand Up @@ -659,7 +659,7 @@ const docTemplate = `{
"application/json"
],
"tags": [
"class_schedule"
"Class Schedule"
],
"summary": "クラススケジュールを作成",
"parameters": [
Expand Down Expand Up @@ -705,7 +705,7 @@ const docTemplate = `{
"application/json"
],
"tags": [
"class_schedule"
"Class Schedule"
],
"summary": "日付でクラススケジュールを取得",
"parameters": [
Expand Down Expand Up @@ -762,7 +762,7 @@ const docTemplate = `{
"application/json"
],
"tags": [
"class_schedule"
"Class Schedule"
],
"summary": "ライブ中のクラススケジュールを取得",
"parameters": [
Expand Down Expand Up @@ -806,7 +806,7 @@ const docTemplate = `{
"application/json"
],
"tags": [
"class_schedule"
"Class Schedule"
],
"summary": "IDでクラススケジュールを取得",
"parameters": [
Expand Down Expand Up @@ -848,7 +848,7 @@ const docTemplate = `{
"application/json"
],
"tags": [
"class_schedule"
"Class Schedule"
],
"summary": "クラススケジュールを更新",
"parameters": [
Expand Down Expand Up @@ -899,7 +899,7 @@ const docTemplate = `{
"application/json"
],
"tags": [
"class_schedule"
"Class Schedule"
],
"summary": "クラススケジュールを削除",
"parameters": [
Expand Down Expand Up @@ -942,6 +942,9 @@ const docTemplate = `{
"produces": [
"application/json"
],
"tags": [
"Class User"
],
"summary": "ユーザーのロールを変更します。",
"operationId": "change-user-role",
"parameters": [
Expand Down
Loading
Loading