Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
AURA
tank
Commits
0cb79447
Commit
0cb79447
authored
Mar 17, 2022
by
robwa
Browse files
fix: Added missing error codes according to schemathesis
parent
fdc81742
Changes
8
Hide whitespace changes
Inline
Side-by-side
api/docs/docs.go
View file @
0cb79447
...
@@ -51,6 +51,12 @@ const docTemplate = `{
...
@@ -51,6 +51,12 @@ const docTemplate = `{
"$ref": "#/definitions/v1.PlaylistsListing"
"$ref": "#/definitions/v1.PlaylistsListing"
}
}
},
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/v1.ErrorResponse"
}
},
"403": {
"403": {
"description": "Forbidden",
"description": "Forbidden",
"schema": {
"schema": {
...
@@ -101,6 +107,12 @@ const docTemplate = `{
...
@@ -101,6 +107,12 @@ const docTemplate = `{
"$ref": "#/definitions/v1.ErrorResponse"
"$ref": "#/definitions/v1.ErrorResponse"
}
}
},
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/v1.ErrorResponse"
}
},
"500": {
"500": {
"description": "Internal Server Error",
"description": "Internal Server Error",
"schema": {
"schema": {
...
@@ -138,6 +150,12 @@ const docTemplate = `{
...
@@ -138,6 +150,12 @@ const docTemplate = `{
"$ref": "#/definitions/v1.ShowsListing"
"$ref": "#/definitions/v1.ShowsListing"
}
}
},
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/v1.ErrorResponse"
}
},
"500": {
"500": {
"description": "Internal Server Error",
"description": "Internal Server Error",
"schema": {
"schema": {
...
@@ -170,8 +188,8 @@ const docTemplate = `{
...
@@ -170,8 +188,8 @@ const docTemplate = `{
}
}
],
],
"responses": {
"responses": {
"20
0
": {
"20
1
": {
"description": "
OK
",
"description": "
Created
",
"schema": {
"schema": {
"$ref": "#/definitions/store.Show"
"$ref": "#/definitions/store.Show"
}
}
...
@@ -182,6 +200,18 @@ const docTemplate = `{
...
@@ -182,6 +200,18 @@ const docTemplate = `{
"$ref": "#/definitions/v1.ErrorResponse"
"$ref": "#/definitions/v1.ErrorResponse"
}
}
},
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/v1.ErrorResponse"
}
},
"409": {
"description": "Conflict",
"schema": {
"$ref": "#/definitions/v1.ErrorResponse"
}
},
"500": {
"500": {
"description": "Internal Server Error",
"description": "Internal Server Error",
"schema": {
"schema": {
...
@@ -259,6 +289,12 @@ const docTemplate = `{
...
@@ -259,6 +289,12 @@ const docTemplate = `{
"$ref": "#/definitions/v1.FilesListing"
"$ref": "#/definitions/v1.FilesListing"
}
}
},
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/v1.ErrorResponse"
}
},
"403": {
"403": {
"description": "Forbidden",
"description": "Forbidden",
"schema": {
"schema": {
...
@@ -376,6 +412,12 @@ const docTemplate = `{
...
@@ -376,6 +412,12 @@ const docTemplate = `{
"$ref": "#/definitions/v1.ErrorResponse"
"$ref": "#/definitions/v1.ErrorResponse"
}
}
},
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/v1.ErrorResponse"
}
},
"500": {
"500": {
"description": "Internal Server Error",
"description": "Internal Server Error",
"schema": {
"schema": {
...
@@ -419,6 +461,18 @@ const docTemplate = `{
...
@@ -419,6 +461,18 @@ const docTemplate = `{
"$ref": "#/definitions/v1.ErrorResponse"
"$ref": "#/definitions/v1.ErrorResponse"
}
}
},
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/v1.ErrorResponse"
}
},
"409": {
"description": "Conflict",
"schema": {
"$ref": "#/definitions/v1.ErrorResponse"
}
},
"500": {
"500": {
"description": "Internal Server Error",
"description": "Internal Server Error",
"schema": {
"schema": {
...
@@ -479,6 +533,12 @@ const docTemplate = `{
...
@@ -479,6 +533,12 @@ const docTemplate = `{
"$ref": "#/definitions/v1.ErrorResponse"
"$ref": "#/definitions/v1.ErrorResponse"
}
}
},
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/v1.ErrorResponse"
}
},
"500": {
"500": {
"description": "Internal Server Error",
"description": "Internal Server Error",
"schema": {
"schema": {
...
@@ -642,6 +702,12 @@ const docTemplate = `{
...
@@ -642,6 +702,12 @@ const docTemplate = `{
"$ref": "#/definitions/v1.ErrorResponse"
"$ref": "#/definitions/v1.ErrorResponse"
}
}
},
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/v1.ErrorResponse"
}
},
"500": {
"500": {
"description": "Internal Server Error",
"description": "Internal Server Error",
"schema": {
"schema": {
...
@@ -752,6 +818,12 @@ const docTemplate = `{
...
@@ -752,6 +818,12 @@ const docTemplate = `{
"$ref": "#/definitions/v1.ErrorResponse"
"$ref": "#/definitions/v1.ErrorResponse"
}
}
},
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/v1.ErrorResponse"
}
},
"500": {
"500": {
"description": "Internal Server Error",
"description": "Internal Server Error",
"schema": {
"schema": {
...
@@ -855,6 +927,12 @@ const docTemplate = `{
...
@@ -855,6 +927,12 @@ const docTemplate = `{
"$ref": "#/definitions/v1.ErrorResponse"
"$ref": "#/definitions/v1.ErrorResponse"
}
}
},
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/v1.ErrorResponse"
}
},
"500": {
"500": {
"description": "Internal Server Error",
"description": "Internal Server Error",
"schema": {
"schema": {
...
@@ -899,6 +977,12 @@ const docTemplate = `{
...
@@ -899,6 +977,12 @@ const docTemplate = `{
"$ref": "#/definitions/v1.JobsListing"
"$ref": "#/definitions/v1.JobsListing"
}
}
},
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/v1.ErrorResponse"
}
},
"403": {
"403": {
"description": "Forbidden",
"description": "Forbidden",
"schema": {
"schema": {
...
@@ -949,6 +1033,12 @@ const docTemplate = `{
...
@@ -949,6 +1033,12 @@ const docTemplate = `{
"$ref": "#/definitions/v1.PlaylistsListing"
"$ref": "#/definitions/v1.PlaylistsListing"
}
}
},
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/v1.ErrorResponse"
}
},
"403": {
"403": {
"description": "Forbidden",
"description": "Forbidden",
"schema": {
"schema": {
...
@@ -1060,6 +1150,12 @@ const docTemplate = `{
...
@@ -1060,6 +1150,12 @@ const docTemplate = `{
"$ref": "#/definitions/v1.ErrorResponse"
"$ref": "#/definitions/v1.ErrorResponse"
}
}
},
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/v1.ErrorResponse"
}
},
"500": {
"500": {
"description": "Internal Server Error",
"description": "Internal Server Error",
"schema": {
"schema": {
...
@@ -1121,6 +1217,12 @@ const docTemplate = `{
...
@@ -1121,6 +1217,12 @@ const docTemplate = `{
"$ref": "#/definitions/v1.ErrorResponse"
"$ref": "#/definitions/v1.ErrorResponse"
}
}
},
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/v1.ErrorResponse"
}
},
"500": {
"500": {
"description": "Internal Server Error",
"description": "Internal Server Error",
"schema": {
"schema": {
...
@@ -1164,6 +1266,12 @@ const docTemplate = `{
...
@@ -1164,6 +1266,12 @@ const docTemplate = `{
"$ref": "#/definitions/v1.ErrorResponse"
"$ref": "#/definitions/v1.ErrorResponse"
}
}
},
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/v1.ErrorResponse"
}
},
"500": {
"500": {
"description": "Internal Server Error",
"description": "Internal Server Error",
"schema": {
"schema": {
...
@@ -1282,6 +1390,12 @@ const docTemplate = `{
...
@@ -1282,6 +1390,12 @@ const docTemplate = `{
"302": {
"302": {
"description": ""
"description": ""
},
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/auth.HTTPErrorResponse"
}
},
"401": {
"401": {
"description": "Unauthorized",
"description": "Unauthorized",
"schema": {
"schema": {
...
@@ -1311,6 +1425,12 @@ const docTemplate = `{
...
@@ -1311,6 +1425,12 @@ const docTemplate = `{
"$ref": "#/definitions/auth.Session"
"$ref": "#/definitions/auth.Session"
}
}
},
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/auth.HTTPErrorResponse"
}
},
"404": {
"404": {
"description": "Not Found",
"description": "Not Found",
"schema": {
"schema": {
...
@@ -1379,6 +1499,12 @@ const docTemplate = `{
...
@@ -1379,6 +1499,12 @@ const docTemplate = `{
"type": "string"
"type": "string"
}
}
},
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/auth.HTTPErrorResponse"
}
},
"401": {
"401": {
"description": "Unauthorized",
"description": "Unauthorized",
"schema": {
"schema": {
...
...
api/v1/files.go
View file @
0cb79447
...
@@ -35,6 +35,7 @@ import (
...
@@ -35,6 +35,7 @@ import (
// @Param limit query int false "Limit number of results"
// @Param limit query int false "Limit number of results"
// @Param offset query int false "Start listing from offset"
// @Param offset query int false "Start listing from offset"
// @Success 200 {object} FilesListing
// @Success 200 {object} FilesListing
// @Failure 400 {object} ErrorResponse
// @Failure 403 {object} ErrorResponse
// @Failure 403 {object} ErrorResponse
// @Failure 500 {object} ErrorResponse
// @Failure 500 {object} ErrorResponse
// @Router /api/v1/shows/{name}/files [get]
// @Router /api/v1/shows/{name}/files [get]
...
@@ -164,6 +165,7 @@ create_file_response:
...
@@ -164,6 +165,7 @@ create_file_response:
// @Success 200 {object} store.File
// @Success 200 {object} store.File
// @Failure 400 {object} ErrorResponse
// @Failure 400 {object} ErrorResponse
// @Failure 403 {object} ErrorResponse
// @Failure 403 {object} ErrorResponse
// @Failure 404 {object} ErrorResponse
// @Failure 500 {object} ErrorResponse
// @Failure 500 {object} ErrorResponse
// @Router /api/v1/shows/{name}/files/{id} [get]
// @Router /api/v1/shows/{name}/files/{id} [get]
func
(
api
*
API
)
ReadFileOfShow
(
c
*
gin
.
Context
)
{
func
(
api
*
API
)
ReadFileOfShow
(
c
*
gin
.
Context
)
{
...
@@ -196,6 +198,7 @@ func (api *API) ReadFileOfShow(c *gin.Context) {
...
@@ -196,6 +198,7 @@ func (api *API) ReadFileOfShow(c *gin.Context) {
// @Success 200 {object} store.File
// @Success 200 {object} store.File
// @Failure 400 {object} ErrorResponse
// @Failure 400 {object} ErrorResponse
// @Failure 403 {object} ErrorResponse
// @Failure 403 {object} ErrorResponse
// @Failure 404 {object} ErrorResponse
// @Failure 500 {object} ErrorResponse
// @Failure 500 {object} ErrorResponse
// @Router /api/v1/shows/{name}/files/{id} [patch]
// @Router /api/v1/shows/{name}/files/{id} [patch]
func
(
api
*
API
)
PatchFileOfShow
(
c
*
gin
.
Context
)
{
func
(
api
*
API
)
PatchFileOfShow
(
c
*
gin
.
Context
)
{
...
@@ -230,6 +233,8 @@ func (api *API) PatchFileOfShow(c *gin.Context) {
...
@@ -230,6 +233,8 @@ func (api *API) PatchFileOfShow(c *gin.Context) {
// @Success 204 {object} nil
// @Success 204 {object} nil
// @Failure 400 {object} ErrorResponse
// @Failure 400 {object} ErrorResponse
// @Failure 403 {object} ErrorResponse
// @Failure 403 {object} ErrorResponse
// @Failure 404 {object} ErrorResponse
// @Failure 409 {object} ErrorResponse
// @Failure 500 {object} ErrorResponse
// @Failure 500 {object} ErrorResponse
// @Router /api/v1/shows/{name}/files/{id} [delete]
// @Router /api/v1/shows/{name}/files/{id} [delete]
func
(
api
*
API
)
DeleteFileOfShow
(
c
*
gin
.
Context
)
{
func
(
api
*
API
)
DeleteFileOfShow
(
c
*
gin
.
Context
)
{
...
@@ -262,6 +267,7 @@ func (api *API) DeleteFileOfShow(c *gin.Context) {
...
@@ -262,6 +267,7 @@ func (api *API) DeleteFileOfShow(c *gin.Context) {
// @Success 200 {object} FileUsageListing
// @Success 200 {object} FileUsageListing
// @Failure 400 {object} ErrorResponse
// @Failure 400 {object} ErrorResponse
// @Failure 403 {object} ErrorResponse
// @Failure 403 {object} ErrorResponse
// @Failure 404 {object} ErrorResponse
// @Failure 500 {object} ErrorResponse
// @Failure 500 {object} ErrorResponse
// @Router /api/v1/shows/{name}/files/{id}/usage [get]
// @Router /api/v1/shows/{name}/files/{id}/usage [get]
func
(
api
*
API
)
ReadUsageOfFile
(
c
*
gin
.
Context
)
{
func
(
api
*
API
)
ReadUsageOfFile
(
c
*
gin
.
Context
)
{
...
@@ -292,6 +298,7 @@ func (api *API) ReadUsageOfFile(c *gin.Context) {
...
@@ -292,6 +298,7 @@ func (api *API) ReadUsageOfFile(c *gin.Context) {
// @Success 200 {object} FileImportLogs
// @Success 200 {object} FileImportLogs
// @Failure 400 {object} ErrorResponse
// @Failure 400 {object} ErrorResponse
// @Failure 403 {object} ErrorResponse
// @Failure 403 {object} ErrorResponse
// @Failure 404 {object} ErrorResponse
// @Failure 500 {object} ErrorResponse
// @Failure 500 {object} ErrorResponse
// @Router /api/v1/shows/{name}/files/{id}/logs [get]
// @Router /api/v1/shows/{name}/files/{id}/logs [get]
func
(
api
*
API
)
ReadLogsOfFile
(
c
*
gin
.
Context
)
{
func
(
api
*
API
)
ReadLogsOfFile
(
c
*
gin
.
Context
)
{
...
...
api/v1/files_import.go
View file @
0cb79447
...
@@ -32,6 +32,7 @@ import (
...
@@ -32,6 +32,7 @@ import (
// @Param limit query int false "Limit number of results"
// @Param limit query int false "Limit number of results"
// @Param offset query int false "Start listing from offset"
// @Param offset query int false "Start listing from offset"
// @Success 200 {object} JobsListing
// @Success 200 {object} JobsListing
// @Failure 400 {object} ErrorResponse
// @Failure 403 {object} ErrorResponse
// @Failure 403 {object} ErrorResponse
// @Failure 500 {object} ErrorResponse
// @Failure 500 {object} ErrorResponse
// @Router /api/v1/shows/{name}/imports [get]
// @Router /api/v1/shows/{name}/imports [get]
...
...
api/v1/files_upload.go
View file @
0cb79447
...
@@ -47,6 +47,7 @@ import (
...
@@ -47,6 +47,7 @@ import (
// @Success 200
// @Success 200
// @Failure 400 {object} ErrorResponse
// @Failure 400 {object} ErrorResponse
// @Failure 403 {object} ErrorResponse
// @Failure 403 {object} ErrorResponse
// @Failure 404 {object} ErrorResponse
// @Failure 500 {object} ErrorResponse
// @Failure 500 {object} ErrorResponse
// @Router /api/v1/shows/{name}/files/{id}/upload [put]
// @Router /api/v1/shows/{name}/files/{id}/upload [put]
func
(
api
*
API
)
UploadFileSimple
(
c
*
gin
.
Context
)
{
func
(
api
*
API
)
UploadFileSimple
(
c
*
gin
.
Context
)
{
...
...
api/v1/playlists.go
View file @
0cb79447
...
@@ -34,6 +34,7 @@ import (
...
@@ -34,6 +34,7 @@ import (
// @Param limit query int false "Limit number of results"
// @Param limit query int false "Limit number of results"
// @Param offset query int false "Start listing from offset"
// @Param offset query int false "Start listing from offset"
// @Success 200 {object} PlaylistsListing
// @Success 200 {object} PlaylistsListing
// @Failure 400 {object} ErrorResponse
// @Failure 403 {object} ErrorResponse
// @Failure 403 {object} ErrorResponse
// @Failure 500 {object} ErrorResponse
// @Failure 500 {object} ErrorResponse
// @Router /api/v1/shows/{name}/playlists [get]
// @Router /api/v1/shows/{name}/playlists [get]
...
@@ -95,6 +96,7 @@ func (api *API) CreatePlaylistForShow(c *gin.Context) {
...
@@ -95,6 +96,7 @@ func (api *API) CreatePlaylistForShow(c *gin.Context) {
// @Success 200 {object} store.Playlist
// @Success 200 {object} store.Playlist
// @Failure 400 {object} ErrorResponse
// @Failure 400 {object} ErrorResponse
// @Failure 403 {object} ErrorResponse
// @Failure 403 {object} ErrorResponse
// @Failure 404 {object} ErrorResponse
// @Failure 500 {object} ErrorResponse
// @Failure 500 {object} ErrorResponse
// @Router /api/v1/shows/{name}/playlists/{id} [get]
// @Router /api/v1/shows/{name}/playlists/{id} [get]
func
(
api
*
API
)
ReadPlaylistOfShow
(
c
*
gin
.
Context
)
{
func
(
api
*
API
)
ReadPlaylistOfShow
(
c
*
gin
.
Context
)
{
...
@@ -127,6 +129,7 @@ func (api *API) ReadPlaylistOfShow(c *gin.Context) {
...
@@ -127,6 +129,7 @@ func (api *API) ReadPlaylistOfShow(c *gin.Context) {
// @Success 200 {object} store.Playlist
// @Success 200 {object} store.Playlist
// @Failure 400 {object} ErrorResponse
// @Failure 400 {object} ErrorResponse
// @Failure 403 {object} ErrorResponse
// @Failure 403 {object} ErrorResponse
// @Failure 404 {object} ErrorResponse
// @Failure 500 {object} ErrorResponse
// @Failure 500 {object} ErrorResponse
// @Router /api/v1/shows/{name}/playlists/{id} [put]
// @Router /api/v1/shows/{name}/playlists/{id} [put]
func
(
api
*
API
)
UpdatePlaylistOfShow
(
c
*
gin
.
Context
)
{
func
(
api
*
API
)
UpdatePlaylistOfShow
(
c
*
gin
.
Context
)
{
...
@@ -160,6 +163,7 @@ func (api *API) UpdatePlaylistOfShow(c *gin.Context) {
...
@@ -160,6 +163,7 @@ func (api *API) UpdatePlaylistOfShow(c *gin.Context) {
// @Success 204 {object} nil
// @Success 204 {object} nil
// @Failure 400 {object} ErrorResponse
// @Failure 400 {object} ErrorResponse
// @Failure 403 {object} ErrorResponse
// @Failure 403 {object} ErrorResponse
// @Failure 404 {object} ErrorResponse
// @Failure 500 {object} ErrorResponse
// @Failure 500 {object} ErrorResponse
// @Router /api/v1/shows/{name}/playlists/{id} [delete]
// @Router /api/v1/shows/{name}/playlists/{id} [delete]
func
(
api
*
API
)
DeletePlaylistOfShow
(
c
*
gin
.
Context
)
{
func
(
api
*
API
)
DeletePlaylistOfShow
(
c
*
gin
.
Context
)
{
...
@@ -189,6 +193,7 @@ func (api *API) DeletePlaylistOfShow(c *gin.Context) {
...
@@ -189,6 +193,7 @@ func (api *API) DeletePlaylistOfShow(c *gin.Context) {
// @Param limit query int false "Limit number of results"
// @Param limit query int false "Limit number of results"
// @Param offset query int false "Start listing from offset"
// @Param offset query int false "Start listing from offset"
// @Success 200 {object} PlaylistsListing
// @Success 200 {object} PlaylistsListing
// @Failure 400 {object} ErrorResponse
// @Failure 403 {object} ErrorResponse
// @Failure 403 {object} ErrorResponse
// @Failure 500 {object} ErrorResponse
// @Failure 500 {object} ErrorResponse
// @Router /api/v1/playlists [get]
// @Router /api/v1/playlists [get]
...
@@ -217,6 +222,7 @@ func (api *API) ListPlaylists(c *gin.Context) {
...
@@ -217,6 +222,7 @@ func (api *API) ListPlaylists(c *gin.Context) {
// @Success 200 {object} store.Playlist
// @Success 200 {object} store.Playlist
// @Failure 400 {object} ErrorResponse
// @Failure 400 {object} ErrorResponse
// @Failure 403 {object} ErrorResponse
// @Failure 403 {object} ErrorResponse
// @Failure 404 {object} ErrorResponse
// @Failure 500 {object} ErrorResponse
// @Failure 500 {object} ErrorResponse
// @Router /api/v1/playlists/{id} [get]
// @Router /api/v1/playlists/{id} [get]
func
(
api
*
API
)
ReadPlaylist
(
c
*
gin
.
Context
)
{
func
(
api
*
API
)
ReadPlaylist
(
c
*
gin
.
Context
)
{
...
...
api/v1/shows.go
View file @
0cb79447
...
@@ -34,6 +34,7 @@ import (
...
@@ -34,6 +34,7 @@ import (
// @Param limit query int false "Limit number of results"
// @Param limit query int false "Limit number of results"
// @Param offset query int false "Start listing from offset"
// @Param offset query int false "Start listing from offset"
// @Success 200 {object} ShowsListing
// @Success 200 {object} ShowsListing
// @Failure 400 {object} ErrorResponse
// @Failure 500 {object} ErrorResponse
// @Failure 500 {object} ErrorResponse
// @Router /api/v1/shows [get]
// @Router /api/v1/shows [get]
func
(
api
*
API
)
ListShows
(
c
*
gin
.
Context
)
{
func
(
api
*
API
)
ListShows
(
c
*
gin
.
Context
)
{
...
@@ -88,8 +89,10 @@ func (api *API) ListShows(c *gin.Context) {
...
@@ -88,8 +89,10 @@ func (api *API) ListShows(c *gin.Context) {
// @Produce json
// @Produce json
// @Param name path string true "Name of the show to be created"
// @Param name path string true "Name of the show to be created"
// @Param clone-from query string false "If given, all files and playlists will be copied from the show"
// @Param clone-from query string false "If given, all files and playlists will be copied from the show"
// @Success 20
0
{object} store.Show
// @Success 20
1
{object} store.Show
// @Failure 403 {object} ErrorResponse
// @Failure 403 {object} ErrorResponse
// @Failure 404 {object} ErrorResponse
// @Failure 409 {object} ErrorResponse
// @Failure 500 {object} ErrorResponse
// @Failure 500 {object} ErrorResponse
// @Router /api/v1/shows/{name} [post]
// @Router /api/v1/shows/{name} [post]
func
(
api
*
API
)
CreateShow
(
c
*
gin
.
Context
)
{
func
(
api
*
API
)
CreateShow
(
c
*
gin
.
Context
)
{
...
...
auth/auth.go
View file @
0cb79447
...
@@ -143,6 +143,7 @@ func newSession(c *gin.Context) {
...
@@ -143,6 +143,7 @@ func newSession(c *gin.Context) {
// @Description Retrieves session info.
// @Description Retrieves session info.
// @Produce json
// @Produce json
// @Success 200 {object} Session
// @Success 200 {object} Session
// @Failure 400 {object} HTTPErrorResponse
// @Failure 404 {object} HTTPErrorResponse
// @Failure 404 {object} HTTPErrorResponse
// @Failure 408 {object} HTTPErrorResponse
// @Failure 408 {object} HTTPErrorResponse
// @Router /auth/session [get]
// @Router /auth/session [get]
...
@@ -184,6 +185,7 @@ func getSession(c *gin.Context) {
...
@@ -184,6 +185,7 @@ func getSession(c *gin.Context) {
// @Description Deletes the session.
// @Description Deletes the session.
// @Produce json
// @Produce json
// @Success 200 {object} string
// @Success 200 {object} string
// @Failure 400 {object} HTTPErrorResponse
// @Failure 401 {object} HTTPErrorResponse
// @Failure 401 {object} HTTPErrorResponse
// @Router /auth/session [delete]
// @Router /auth/session [delete]
func
deleteSession
(
c
*
gin
.
Context
)
{
func
deleteSession
(
c
*
gin
.
Context
)
{
...
...
auth/backend_oidc.go
View file @
0cb79447
...
@@ -231,6 +231,7 @@ func (b *OIDCBackend) NewSession(ctx context.Context, arguments json.RawMessage)
...
@@ -231,6 +231,7 @@ func (b *OIDCBackend) NewSession(ctx context.Context, arguments json.RawMessage)
// @Produce json
// @Produce json
// @Param session-id query string true "OIDC session ID"
// @Param session-id query string true "OIDC session ID"
// @Success 302
// @Success 302
// @Failure 400 {object} HTTPErrorResponse
// @Failure 401 {object} HTTPErrorResponse
// @Failure 401 {object} HTTPErrorResponse
// @Failure 409 {object} HTTPErrorResponse
// @Failure 409 {object} HTTPErrorResponse
// @Router /auth/oidc/login [get]
// @Router /auth/oidc/login [get]
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment