fix swagger errors
This commit is contained in:
@@ -118,8 +118,8 @@ func (h APIHandler) ListChannels(g *gin.Context) ginresp.HTTPResponse {
|
||||
// @ID api-channels-get
|
||||
// @Tags API-v2
|
||||
//
|
||||
// @Param uid path int true "UserID"
|
||||
// @Param cid path int true "ChannelID"
|
||||
// @Param uid path string true "UserID"
|
||||
// @Param cid path string true "ChannelID"
|
||||
//
|
||||
// @Success 200 {object} models.ChannelWithSubscriptionJSON
|
||||
// @Failure 400 {object} ginresp.apiError "supplied values/parameters cannot be parsed / are invalid"
|
||||
|
||||
@@ -16,7 +16,7 @@ import (
|
||||
// @ID api-clients-list
|
||||
// @Tags API-v2
|
||||
//
|
||||
// @Param uid path int true "UserID"
|
||||
// @Param uid path string true "UserID"
|
||||
//
|
||||
// @Success 200 {object} handler.ListClients.response
|
||||
// @Failure 400 {object} ginresp.apiError "supplied values/parameters cannot be parsed / are invalid"
|
||||
@@ -59,8 +59,8 @@ func (h APIHandler) ListClients(g *gin.Context) ginresp.HTTPResponse {
|
||||
// @ID api-clients-get
|
||||
// @Tags API-v2
|
||||
//
|
||||
// @Param uid path int true "UserID"
|
||||
// @Param cid path int true "ClientID"
|
||||
// @Param uid path string true "UserID"
|
||||
// @Param cid path string true "ClientID"
|
||||
//
|
||||
// @Success 200 {object} models.ClientJSON
|
||||
// @Failure 400 {object} ginresp.apiError "supplied values/parameters cannot be parsed / are invalid"
|
||||
@@ -164,8 +164,8 @@ func (h APIHandler) AddClient(g *gin.Context) ginresp.HTTPResponse {
|
||||
// @ID api-clients-delete
|
||||
// @Tags API-v2
|
||||
//
|
||||
// @Param uid path int true "UserID"
|
||||
// @Param cid path int true "ClientID"
|
||||
// @Param uid path string true "UserID"
|
||||
// @Param cid path string true "ClientID"
|
||||
//
|
||||
// @Success 200 {object} models.ClientJSON
|
||||
// @Failure 400 {object} ginresp.apiError "supplied values/parameters cannot be parsed / are invalid"
|
||||
|
||||
@@ -17,7 +17,7 @@ import (
|
||||
// @ID api-tokenkeys-list
|
||||
// @Tags API-v2
|
||||
//
|
||||
// @Param uid path int true "UserID"
|
||||
// @Param uid path string true "UserID"
|
||||
//
|
||||
// @Success 200 {object} handler.ListUserKeys.response
|
||||
// @Failure 400 {object} ginresp.apiError "supplied values/parameters cannot be parsed / are invalid"
|
||||
@@ -25,7 +25,7 @@ import (
|
||||
// @Failure 404 {object} ginresp.apiError "message not found"
|
||||
// @Failure 500 {object} ginresp.apiError "internal server error"
|
||||
//
|
||||
// @Router /api/v2/users/:uid/keys [GET]
|
||||
// @Router /api/v2/users/{uid}/keys [GET]
|
||||
func (h APIHandler) ListUserKeys(g *gin.Context) ginresp.HTTPResponse {
|
||||
type uri struct {
|
||||
UserID models.UserID `uri:"uid" binding:"entityid"`
|
||||
@@ -62,8 +62,8 @@ func (h APIHandler) ListUserKeys(g *gin.Context) ginresp.HTTPResponse {
|
||||
// @ID api-tokenkeys-get
|
||||
// @Tags API-v2
|
||||
//
|
||||
// @Param uid path int true "UserID"
|
||||
// @Param kid path int true "TokenKeyID"
|
||||
// @Param uid path string true "UserID"
|
||||
// @Param kid path string true "TokenKeyID"
|
||||
//
|
||||
// @Success 200 {object} models.KeyTokenJSON
|
||||
// @Failure 400 {object} ginresp.apiError "supplied values/parameters cannot be parsed / are invalid"
|
||||
@@ -71,7 +71,7 @@ func (h APIHandler) ListUserKeys(g *gin.Context) ginresp.HTTPResponse {
|
||||
// @Failure 404 {object} ginresp.apiError "message not found"
|
||||
// @Failure 500 {object} ginresp.apiError "internal server error"
|
||||
//
|
||||
// @Router /api/v2/users/:uid/keys/:kid [GET]
|
||||
// @Router /api/v2/users/{uid}/keys/{kid} [GET]
|
||||
func (h APIHandler) GetUserKey(g *gin.Context) ginresp.HTTPResponse {
|
||||
type uri struct {
|
||||
UserID models.UserID `uri:"uid" binding:"entityid"`
|
||||
@@ -117,7 +117,7 @@ func (h APIHandler) GetUserKey(g *gin.Context) ginresp.HTTPResponse {
|
||||
// @Failure 404 {object} ginresp.apiError "message not found"
|
||||
// @Failure 500 {object} ginresp.apiError "internal server error"
|
||||
//
|
||||
// @Router /api/v2/users/:uid/keys/:kid [PATCH]
|
||||
// @Router /api/v2/users/{uid}/keys/{kid} [PATCH]
|
||||
func (h APIHandler) UpdateUserKey(g *gin.Context) ginresp.HTTPResponse {
|
||||
type uri struct {
|
||||
UserID models.UserID `uri:"uid" binding:"entityid"`
|
||||
@@ -214,7 +214,7 @@ func (h APIHandler) UpdateUserKey(g *gin.Context) ginresp.HTTPResponse {
|
||||
// @Failure 404 {object} ginresp.apiError "message not found"
|
||||
// @Failure 500 {object} ginresp.apiError "internal server error"
|
||||
//
|
||||
// @Router /api/v2/users/:uid/keys [POST]
|
||||
// @Router /api/v2/users/{uid}/keys [POST]
|
||||
func (h APIHandler) CreateUserKey(g *gin.Context) ginresp.HTTPResponse {
|
||||
type uri struct {
|
||||
UserID models.UserID `uri:"uid" binding:"entityid"`
|
||||
@@ -263,8 +263,8 @@ func (h APIHandler) CreateUserKey(g *gin.Context) ginresp.HTTPResponse {
|
||||
// @ID api-tokenkeys-delete
|
||||
// @Tags API-v2
|
||||
//
|
||||
// @Param uid path int true "UserID"
|
||||
// @Param kid path int true "TokenKeyID"
|
||||
// @Param uid path string true "UserID"
|
||||
// @Param kid path string true "TokenKeyID"
|
||||
//
|
||||
// @Success 200 {object} models.KeyTokenJSON
|
||||
// @Failure 400 {object} ginresp.apiError "supplied values/parameters cannot be parsed / are invalid"
|
||||
@@ -272,7 +272,7 @@ func (h APIHandler) CreateUserKey(g *gin.Context) ginresp.HTTPResponse {
|
||||
// @Failure 404 {object} ginresp.apiError "message not found"
|
||||
// @Failure 500 {object} ginresp.apiError "internal server error"
|
||||
//
|
||||
// @Router /api/v2/users/:uid/keys/:kid [DELETE]
|
||||
// @Router /api/v2/users/{uid}/keys/{kid} [DELETE]
|
||||
func (h APIHandler) DeleteUserKey(g *gin.Context) ginresp.HTTPResponse {
|
||||
type uri struct {
|
||||
UserID models.UserID `uri:"uid" binding:"entityid"`
|
||||
|
||||
@@ -165,7 +165,7 @@ func (h APIHandler) ListMessages(g *gin.Context) ginresp.HTTPResponse {
|
||||
// @ID api-messages-get
|
||||
// @Tags API-v2
|
||||
//
|
||||
// @Param mid path int true "MessageID"
|
||||
// @Param mid path string true "MessageID"
|
||||
//
|
||||
// @Success 200 {object} models.MessageJSON
|
||||
// @Failure 400 {object} ginresp.apiError "supplied values/parameters cannot be parsed / are invalid"
|
||||
@@ -233,7 +233,7 @@ func (h APIHandler) GetMessage(g *gin.Context) ginresp.HTTPResponse {
|
||||
// @ID api-messages-delete
|
||||
// @Tags API-v2
|
||||
//
|
||||
// @Param mid path int true "MessageID"
|
||||
// @Param mid path string true "MessageID"
|
||||
//
|
||||
// @Success 200 {object} models.MessageJSON
|
||||
// @Failure 400 {object} ginresp.apiError "supplied values/parameters cannot be parsed / are invalid"
|
||||
|
||||
@@ -121,8 +121,8 @@ func (h APIHandler) ListUserSubscriptions(g *gin.Context) ginresp.HTTPResponse {
|
||||
// @ID api-chan-subscriptions-list
|
||||
// @Tags API-v2
|
||||
//
|
||||
// @Param uid path int true "UserID"
|
||||
// @Param cid path int true "ChannelID"
|
||||
// @Param uid path string true "UserID"
|
||||
// @Param cid path string true "ChannelID"
|
||||
//
|
||||
// @Success 200 {object} handler.ListChannelSubscriptions.response
|
||||
// @Failure 400 {object} ginresp.apiError "supplied values/parameters cannot be parsed / are invalid"
|
||||
@@ -175,8 +175,8 @@ func (h APIHandler) ListChannelSubscriptions(g *gin.Context) ginresp.HTTPRespons
|
||||
// @ID api-subscriptions-get
|
||||
// @Tags API-v2
|
||||
//
|
||||
// @Param uid path int true "UserID"
|
||||
// @Param sid path int true "SubscriptionID"
|
||||
// @Param uid path string true "UserID"
|
||||
// @Param sid path string true "SubscriptionID"
|
||||
//
|
||||
// @Success 200 {object} models.SubscriptionJSON
|
||||
// @Failure 400 {object} ginresp.apiError "supplied values/parameters cannot be parsed / are invalid"
|
||||
@@ -222,8 +222,8 @@ func (h APIHandler) GetSubscription(g *gin.Context) ginresp.HTTPResponse {
|
||||
// @ID api-subscriptions-delete
|
||||
// @Tags API-v2
|
||||
//
|
||||
// @Param uid path int true "UserID"
|
||||
// @Param sid path int true "SubscriptionID"
|
||||
// @Param uid path string true "UserID"
|
||||
// @Param sid path string true "SubscriptionID"
|
||||
//
|
||||
// @Success 200 {object} models.SubscriptionJSON
|
||||
// @Failure 400 {object} ginresp.apiError "supplied values/parameters cannot be parsed / are invalid"
|
||||
|
||||
@@ -137,7 +137,7 @@ func (h APIHandler) CreateUser(g *gin.Context) ginresp.HTTPResponse {
|
||||
// @ID api-user-get
|
||||
// @Tags API-v2
|
||||
//
|
||||
// @Param uid path int true "UserID"
|
||||
// @Param uid path string true "UserID"
|
||||
//
|
||||
// @Success 200 {object} models.UserJSON
|
||||
// @Failure 400 {object} ginresp.apiError "supplied values/parameters cannot be parsed / are invalid"
|
||||
|
||||
Reference in New Issue
Block a user