Skip to content

Commit

Permalink
🐛 fix: Modify Swagger docs for class
Browse files Browse the repository at this point in the history
Class tagged documents in Swagger Docs were not coming out correctly, so we're updating and committing a new one.

Related issue: YJU-OKURA#9
  • Loading branch information
yuminn-k committed Apr 5, 2024
1 parent f602bdc commit 30c4ebb
Show file tree
Hide file tree
Showing 3 changed files with 250 additions and 91 deletions.
82 changes: 72 additions & 10 deletions docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -1241,6 +1241,11 @@ const docTemplate = `{
}
},
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "新しいクラススケジュールを作成する。",
"consumes": [
"application/json"
Expand All @@ -1253,13 +1258,6 @@ const docTemplate = `{
],
"summary": "クラススケジュールを作成",
"parameters": [
{
"type": "integer",
"description": "Class ID",
"name": "cid",
"in": "query",
"required": true
},
{
"type": "integer",
"description": "User ID",
Expand Down Expand Up @@ -1290,6 +1288,12 @@ const docTemplate = `{
"type": "string"
}
},
"401": {
"description": "認証に失敗しました",
"schema": {
"type": "string"
}
},
"500": {
"description": "サーバーエラーが発生しました",
"schema": {
Expand All @@ -1299,8 +1303,13 @@ const docTemplate = `{
}
}
},
"/cs/date": {
"/cs-special/date/{uid}/{cid}": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "指定されたクラスIDと日付のクラススケジュールを取得する。",
"consumes": [
"application/json"
Expand All @@ -1313,11 +1322,18 @@ const docTemplate = `{
],
"summary": "日付でクラススケジュールを取得",
"parameters": [
{
"type": "integer",
"description": "User ID",
"name": "uid",
"in": "path",
"required": true
},
{
"type": "integer",
"description": "Class ID",
"name": "cid",
"in": "query",
"in": "path",
"required": true
},
{
Expand Down Expand Up @@ -1347,6 +1363,12 @@ const docTemplate = `{
"type": "string"
}
},
"401": {
"description": "認証に失敗しました",
"schema": {
"type": "string"
}
},
"500": {
"description": "サーバーエラーが発生しました",
"schema": {
Expand All @@ -1356,8 +1378,13 @@ const docTemplate = `{
}
}
},
"/cs/live": {
"/cs-special/live/{uid}/{cid}": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "指定されたクラスIDのライブ中のクラススケジュールを取得する。",
"consumes": [
"application/json"
Expand All @@ -1370,6 +1397,13 @@ const docTemplate = `{
],
"summary": "ライブ中のクラススケジュールを取得",
"parameters": [
{
"type": "integer",
"description": "User ID",
"name": "uid",
"in": "query",
"required": true
},
{
"type": "integer",
"description": "Class ID",
Expand All @@ -1391,6 +1425,12 @@ const docTemplate = `{
}
}
},
"401": {
"description": "認証に失敗しました",
"schema": {
"type": "string"
}
},
"500": {
"description": "サーバーエラーが発生しました",
"schema": {
Expand Down Expand Up @@ -1444,6 +1484,11 @@ const docTemplate = `{
}
},
"put": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "指定されたIDのクラススケジュールを更新する。",
"consumes": [
"application/json"
Expand Down Expand Up @@ -1500,6 +1545,12 @@ const docTemplate = `{
"type": "string"
}
},
"401": {
"description": "認証に失敗しました",
"schema": {
"type": "string"
}
},
"500": {
"description": "サーバーエラーが発生しました",
"schema": {
Expand All @@ -1509,6 +1560,11 @@ const docTemplate = `{
}
},
"delete": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "指定されたIDのクラススケジュールを削除する。",
"consumes": [
"application/json"
Expand Down Expand Up @@ -1556,6 +1612,12 @@ const docTemplate = `{
"type": "string"
}
},
"401": {
"description": "認証に失敗しました",
"schema": {
"type": "string"
}
},
"500": {
"description": "サーバーエラーが発生しました",
"schema": {
Expand Down
82 changes: 72 additions & 10 deletions docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -1230,6 +1230,11 @@
}
},
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "新しいクラススケジュールを作成する。",
"consumes": [
"application/json"
Expand All @@ -1242,13 +1247,6 @@
],
"summary": "クラススケジュールを作成",
"parameters": [
{
"type": "integer",
"description": "Class ID",
"name": "cid",
"in": "query",
"required": true
},
{
"type": "integer",
"description": "User ID",
Expand Down Expand Up @@ -1279,6 +1277,12 @@
"type": "string"
}
},
"401": {
"description": "認証に失敗しました",
"schema": {
"type": "string"
}
},
"500": {
"description": "サーバーエラーが発生しました",
"schema": {
Expand All @@ -1288,8 +1292,13 @@
}
}
},
"/cs/date": {
"/cs-special/date/{uid}/{cid}": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "指定されたクラスIDと日付のクラススケジュールを取得する。",
"consumes": [
"application/json"
Expand All @@ -1302,11 +1311,18 @@
],
"summary": "日付でクラススケジュールを取得",
"parameters": [
{
"type": "integer",
"description": "User ID",
"name": "uid",
"in": "path",
"required": true
},
{
"type": "integer",
"description": "Class ID",
"name": "cid",
"in": "query",
"in": "path",
"required": true
},
{
Expand Down Expand Up @@ -1336,6 +1352,12 @@
"type": "string"
}
},
"401": {
"description": "認証に失敗しました",
"schema": {
"type": "string"
}
},
"500": {
"description": "サーバーエラーが発生しました",
"schema": {
Expand All @@ -1345,8 +1367,13 @@
}
}
},
"/cs/live": {
"/cs-special/live/{uid}/{cid}": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "指定されたクラスIDのライブ中のクラススケジュールを取得する。",
"consumes": [
"application/json"
Expand All @@ -1359,6 +1386,13 @@
],
"summary": "ライブ中のクラススケジュールを取得",
"parameters": [
{
"type": "integer",
"description": "User ID",
"name": "uid",
"in": "query",
"required": true
},
{
"type": "integer",
"description": "Class ID",
Expand All @@ -1380,6 +1414,12 @@
}
}
},
"401": {
"description": "認証に失敗しました",
"schema": {
"type": "string"
}
},
"500": {
"description": "サーバーエラーが発生しました",
"schema": {
Expand Down Expand Up @@ -1433,6 +1473,11 @@
}
},
"put": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "指定されたIDのクラススケジュールを更新する。",
"consumes": [
"application/json"
Expand Down Expand Up @@ -1489,6 +1534,12 @@
"type": "string"
}
},
"401": {
"description": "認証に失敗しました",
"schema": {
"type": "string"
}
},
"500": {
"description": "サーバーエラーが発生しました",
"schema": {
Expand All @@ -1498,6 +1549,11 @@
}
},
"delete": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "指定されたIDのクラススケジュールを削除する。",
"consumes": [
"application/json"
Expand Down Expand Up @@ -1545,6 +1601,12 @@
"type": "string"
}
},
"401": {
"description": "認証に失敗しました",
"schema": {
"type": "string"
}
},
"500": {
"description": "サーバーエラーが発生しました",
"schema": {
Expand Down
Loading

0 comments on commit 30c4ebb

Please sign in to comment.