diff options
| author | nsfisis <nsfisis@gmail.com> | 2024-08-01 21:06:50 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2024-08-01 21:06:50 +0900 |
| commit | 0ad7b9e54615eedfffa41709900d8e86814d2471 (patch) | |
| tree | 0b7a7feff3e6288fd05ca1cb258de47b3f150925 /backend/api | |
| parent | b05de1617c7ad323f582f7392e4e62c1f08af58e (diff) | |
| download | iosdc-japan-2025-albatross-0ad7b9e54615eedfffa41709900d8e86814d2471.tar.gz iosdc-japan-2025-albatross-0ad7b9e54615eedfffa41709900d8e86814d2471.tar.zst iosdc-japan-2025-albatross-0ad7b9e54615eedfffa41709900d8e86814d2471.zip | |
feat: explicitly define 401 responses in OpenAPI spec
Diffstat (limited to 'backend/api')
| -rw-r--r-- | backend/api/generated.go | 124 |
1 files changed, 95 insertions, 29 deletions
diff --git a/backend/api/generated.go b/backend/api/generated.go index a2fa329..c786f56 100644 --- a/backend/api/generated.go +++ b/backend/api/generated.go @@ -973,6 +973,17 @@ func (response GetAdminGames200JSONResponse) VisitGetAdminGamesResponse(w http.R return json.NewEncoder(w).Encode(response) } +type GetAdminGames401JSONResponse struct { + Message string `json:"message"` +} + +func (response GetAdminGames401JSONResponse) VisitGetAdminGamesResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(401) + + return json.NewEncoder(w).Encode(response) +} + type GetAdminGames403JSONResponse struct { Message string `json:"message"` } @@ -1004,6 +1015,17 @@ func (response GetAdminGamesGameId200JSONResponse) VisitGetAdminGamesGameIdRespo return json.NewEncoder(w).Encode(response) } +type GetAdminGamesGameId401JSONResponse struct { + Message string `json:"message"` +} + +func (response GetAdminGamesGameId401JSONResponse) VisitGetAdminGamesGameIdResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(401) + + return json.NewEncoder(w).Encode(response) +} + type GetAdminGamesGameId403JSONResponse struct { Message string `json:"message"` } @@ -1055,6 +1077,17 @@ func (response PutAdminGamesGameId400JSONResponse) VisitPutAdminGamesGameIdRespo return json.NewEncoder(w).Encode(response) } +type PutAdminGamesGameId401JSONResponse struct { + Message string `json:"message"` +} + +func (response PutAdminGamesGameId401JSONResponse) VisitPutAdminGamesGameIdResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(401) + + return json.NewEncoder(w).Encode(response) +} + type PutAdminGamesGameId403JSONResponse struct { Message string `json:"message"` } @@ -1096,6 +1129,17 @@ func (response GetAdminUsers200JSONResponse) VisitGetAdminUsersResponse(w http.R return json.NewEncoder(w).Encode(response) } +type GetAdminUsers401JSONResponse struct { + Message string `json:"message"` +} + +func (response GetAdminUsers401JSONResponse) VisitGetAdminUsersResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(401) + + return json.NewEncoder(w).Encode(response) +} + type GetAdminUsers403JSONResponse struct { Message string `json:"message"` } @@ -1126,6 +1170,17 @@ func (response GetGames200JSONResponse) VisitGetGamesResponse(w http.ResponseWri return json.NewEncoder(w).Encode(response) } +type GetGames401JSONResponse struct { + Message string `json:"message"` +} + +func (response GetGames401JSONResponse) VisitGetGamesResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(401) + + return json.NewEncoder(w).Encode(response) +} + type GetGames403JSONResponse struct { Message string `json:"message"` } @@ -1157,6 +1212,17 @@ func (response GetGamesGameId200JSONResponse) VisitGetGamesGameIdResponse(w http return json.NewEncoder(w).Encode(response) } +type GetGamesGameId401JSONResponse struct { + Message string `json:"message"` +} + +func (response GetGamesGameId401JSONResponse) VisitGetGamesGameIdResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(401) + + return json.NewEncoder(w).Encode(response) +} + type GetGamesGameId403JSONResponse struct { Message string `json:"message"` } @@ -1228,13 +1294,13 @@ func (response GetToken200JSONResponse) VisitGetTokenResponse(w http.ResponseWri return json.NewEncoder(w).Encode(response) } -type GetToken403JSONResponse struct { +type GetToken401JSONResponse struct { Message string `json:"message"` } -func (response GetToken403JSONResponse) VisitGetTokenResponse(w http.ResponseWriter) error { +func (response GetToken401JSONResponse) VisitGetTokenResponse(w http.ResponseWriter) error { w.Header().Set("Content-Type", "application/json") - w.WriteHeader(403) + w.WriteHeader(401) return json.NewEncoder(w).Encode(response) } @@ -1495,32 +1561,32 @@ func (sh *strictHandler) GetToken(ctx echo.Context, params GetTokenParams) error // Base64 encoded, gzipped, json marshaled Swagger object var swaggerSpec = []string{ - "H4sIAAAAAAAC/+xZX2/bNhD/Kho3oBugxY4TFJ3fsqzLMnSb0bTYQxEYtHi2mVGkSlJNvELffSCpP5Yl", - "W7Sjpk2XPqSJdXf63d3vjnf0RxSJOBEcuFZo/BGpaAkxtr9e4BjM/4kUCUhNwX5KqEoYXk15/hTucJww", - "QGMrHxyjEOlVYv5WWlK+QFmISCqxpoJPFUSCE1XTO3k+LFUo17AAaXQWOIYpJTXR4zbBRIoZg9gIfidh", - "jsbo20Hl0yB3aDDJxbIQKY2lBjLFumb9p9Pnz1+cvhi2wlEaa+cvT2M0fociJhQQFKJbTDXliylwLU2M", - "qk/se5BBCAmWgPI3m6BY/9wvc8qpWgJB1+FaMEvzG8HMQiThfUolEIOiiFIBMKznpyX016VJMbuBSBvn", - "TOYmDK9A/gFK4YV1VHD4a47G73aHtaF6NTpHWbin0vnoCmXXbUjMk8PBnI+uXnItVwcheg2YHKZ5Lghs", - "98c+bdYV1riLw9usTfCKCUxMKl1uTVVzpdEYJVZ8HI3UODLv7SKUfRo6NF5U2YDQ8CvKva2onUjK9ffP", - "fgPGRBjcCsnIN89+6ERmDflCcllvgNkRHbAaXuHxBeEItA8IaTX6A2GK8V6lPMlb195VcDU6v7Lt7xDN", - "l3cQvQaVMr2liuoy/dRSzWZ3RalRNIY7iKTD0HtdtcJpeKoiIevldWzOL54yhmfmTy1T2HaepWr9QFNp", - "FIFS9WOo+LDLvdxcmAPy9bCgV28ZzA36pa86l/vP3Qa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3NMeRwZE7O0cGewwLjnOC45zgeFh8jnMC", + "TXTK5/ZCIeXSNTPgUr0xS7rqvlMs5T0X8caVdf50MDx1td+PvKDI7yHKT98e1JE+pj4o/g9s3Is96H8n", + "az/brwqNEp/o1zplzUBgSkMtSDj4XP1yJCDW38JUfpaeuYhmwEVQhnOjHZIgApvWJsNL12/bwN6ZBc+r", + "Afq/59MTbUiO0igXXKgfKfkIcYCN1YH102q1Wv0XAAD//zFOGlvXMAAA", } // GetSwagger returns the content of the embedded swagger specification file |
