Make produce/consumes more compact
This commit is contained in:
parent
c841e1cd24
commit
dfb71dabbc
|
|
@ -36,10 +36,8 @@ type ApplicationAPI struct {
|
||||||
// Create an application.
|
// Create an application.
|
||||||
//
|
//
|
||||||
// ---
|
// ---
|
||||||
// consumes:
|
// consumes: [application/json]
|
||||||
// - application/json
|
// produces: [application/json]
|
||||||
// produces:
|
|
||||||
// - application/json
|
|
||||||
// security:
|
// security:
|
||||||
// - clientTokenHeader: []
|
// - clientTokenHeader: []
|
||||||
// - clientTokenQuery: []
|
// - clientTokenQuery: []
|
||||||
|
|
@ -80,10 +78,8 @@ func (a *ApplicationAPI) CreateApplication(ctx *gin.Context) {
|
||||||
// Return all applications.
|
// Return all applications.
|
||||||
//
|
//
|
||||||
// ---
|
// ---
|
||||||
// consumes:
|
// consumes: [application/json]
|
||||||
// - application/json
|
// produces: [application/json]
|
||||||
// produces:
|
|
||||||
// - application/json
|
|
||||||
// security:
|
// security:
|
||||||
// - clientTokenHeader: []
|
// - clientTokenHeader: []
|
||||||
// - clientTokenQuery: []
|
// - clientTokenQuery: []
|
||||||
|
|
@ -118,10 +114,8 @@ func (a *ApplicationAPI) GetApplications(ctx *gin.Context) {
|
||||||
// Delete an application.
|
// Delete an application.
|
||||||
//
|
//
|
||||||
// ---
|
// ---
|
||||||
// consumes:
|
// consumes: [application/json]
|
||||||
// - application/json
|
// produces: [application/json]
|
||||||
// produces:
|
|
||||||
// - application/json
|
|
||||||
// parameters:
|
// parameters:
|
||||||
// - name: id
|
// - name: id
|
||||||
// in: path
|
// in: path
|
||||||
|
|
@ -162,10 +156,8 @@ func (a *ApplicationAPI) DeleteApplication(ctx *gin.Context) {
|
||||||
// Update info for an application
|
// Update info for an application
|
||||||
//
|
//
|
||||||
// ---
|
// ---
|
||||||
// consumes:
|
// consumes: [application/json]
|
||||||
// - application/json
|
// produces: [application/json]
|
||||||
// produces:
|
|
||||||
// - application/json
|
|
||||||
// security:
|
// security:
|
||||||
// - clientTokenHeader: []
|
// - clientTokenHeader: []
|
||||||
// - clientTokenQuery: []
|
// - clientTokenQuery: []
|
||||||
|
|
@ -225,8 +217,7 @@ func (a *ApplicationAPI) UpdateApplication(ctx *gin.Context) {
|
||||||
// ---
|
// ---
|
||||||
// consumes:
|
// consumes:
|
||||||
// - multipart/form-data
|
// - multipart/form-data
|
||||||
// produces:
|
// produces: [application/json]
|
||||||
// - application/json
|
|
||||||
// security:
|
// security:
|
||||||
// - clientTokenHeader: []
|
// - clientTokenHeader: []
|
||||||
// - clientTokenQuery: []
|
// - clientTokenQuery: []
|
||||||
|
|
|
||||||
|
|
@ -30,10 +30,8 @@ type ClientAPI struct {
|
||||||
// Create a client.
|
// Create a client.
|
||||||
//
|
//
|
||||||
// ---
|
// ---
|
||||||
// consumes:
|
// consumes: [application/json]
|
||||||
// - application/json
|
// produces: [application/json]
|
||||||
// produces:
|
|
||||||
// - application/json
|
|
||||||
// security:
|
// security:
|
||||||
// - clientTokenHeader: []
|
// - clientTokenHeader: []
|
||||||
// - clientTokenQuery: []
|
// - clientTokenQuery: []
|
||||||
|
|
@ -74,10 +72,8 @@ func (a *ClientAPI) CreateClient(ctx *gin.Context) {
|
||||||
// Return all clients.
|
// Return all clients.
|
||||||
//
|
//
|
||||||
// ---
|
// ---
|
||||||
// consumes:
|
// consumes: [application/json]
|
||||||
// - application/json
|
// produces: [application/json]
|
||||||
// produces:
|
|
||||||
// - application/json
|
|
||||||
// security:
|
// security:
|
||||||
// - clientTokenHeader: []
|
// - clientTokenHeader: []
|
||||||
// - clientTokenQuery: []
|
// - clientTokenQuery: []
|
||||||
|
|
@ -109,10 +105,8 @@ func (a *ClientAPI) GetClients(ctx *gin.Context) {
|
||||||
// Delete a client.
|
// Delete a client.
|
||||||
//
|
//
|
||||||
// ---
|
// ---
|
||||||
// consumes:
|
// consumes: [application/json]
|
||||||
// - application/json
|
// produces: [application/json]
|
||||||
// produces:
|
|
||||||
// - application/json
|
|
||||||
// parameters:
|
// parameters:
|
||||||
// - name: id
|
// - name: id
|
||||||
// in: path
|
// in: path
|
||||||
|
|
|
||||||
|
|
@ -51,8 +51,7 @@ type pagingParams struct {
|
||||||
// Return all messages.
|
// Return all messages.
|
||||||
//
|
//
|
||||||
// ---
|
// ---
|
||||||
// produces:
|
// produces: [application/json]
|
||||||
// - application/json
|
|
||||||
// security:
|
// security:
|
||||||
// - clientTokenHeader: []
|
// - clientTokenHeader: []
|
||||||
// - clientTokenQuery: []
|
// - clientTokenQuery: []
|
||||||
|
|
@ -128,8 +127,7 @@ func withPaging(ctx *gin.Context, f func(pagingParams *pagingParams)) {
|
||||||
// Return all messages from a specific application.
|
// Return all messages from a specific application.
|
||||||
//
|
//
|
||||||
// ---
|
// ---
|
||||||
// produces:
|
// produces: [application/json]
|
||||||
// - application/json
|
|
||||||
// security:
|
// security:
|
||||||
// - clientTokenHeader: []
|
// - clientTokenHeader: []
|
||||||
// - clientTokenQuery: []
|
// - clientTokenQuery: []
|
||||||
|
|
@ -187,8 +185,7 @@ func (a *MessageAPI) GetMessagesWithApplication(ctx *gin.Context) {
|
||||||
// Delete all messages.
|
// Delete all messages.
|
||||||
//
|
//
|
||||||
// ---
|
// ---
|
||||||
// produces:
|
// produces: [application/json]
|
||||||
// - application/json
|
|
||||||
// security:
|
// security:
|
||||||
// - clientTokenHeader: []
|
// - clientTokenHeader: []
|
||||||
// - clientTokenQuery: []
|
// - clientTokenQuery: []
|
||||||
|
|
@ -215,8 +212,7 @@ func (a *MessageAPI) DeleteMessages(ctx *gin.Context) {
|
||||||
// Delete all messages from a specific application.
|
// Delete all messages from a specific application.
|
||||||
//
|
//
|
||||||
// ---
|
// ---
|
||||||
// produces:
|
// produces: [application/json]
|
||||||
// - application/json
|
|
||||||
// security:
|
// security:
|
||||||
// - clientTokenHeader: []
|
// - clientTokenHeader: []
|
||||||
// - clientTokenQuery: []
|
// - clientTokenQuery: []
|
||||||
|
|
@ -254,8 +250,7 @@ func (a *MessageAPI) DeleteMessageWithApplication(ctx *gin.Context) {
|
||||||
// Deletes a message with an id.
|
// Deletes a message with an id.
|
||||||
//
|
//
|
||||||
// ---
|
// ---
|
||||||
// produces:
|
// produces: [application/json]
|
||||||
// - application/json
|
|
||||||
// security:
|
// security:
|
||||||
// - clientTokenHeader: []
|
// - clientTokenHeader: []
|
||||||
// - clientTokenQuery: []
|
// - clientTokenQuery: []
|
||||||
|
|
|
||||||
|
|
@ -123,8 +123,7 @@ func (a *API) register(client *client) {
|
||||||
//
|
//
|
||||||
// ---
|
// ---
|
||||||
// schema: ws, wss
|
// schema: ws, wss
|
||||||
// produces:
|
// produces: [application/json]
|
||||||
// - application/json
|
|
||||||
// security:
|
// security:
|
||||||
// - clientTokenHeader: []
|
// - clientTokenHeader: []
|
||||||
// - clientTokenQuery: []
|
// - clientTokenQuery: []
|
||||||
|
|
|
||||||
33
api/user.go
33
api/user.go
|
|
@ -32,8 +32,7 @@ type UserAPI struct {
|
||||||
// Return all users.
|
// Return all users.
|
||||||
//
|
//
|
||||||
// ---
|
// ---
|
||||||
// produces:
|
// produces: [application/json]
|
||||||
// - application/json
|
|
||||||
// security:
|
// security:
|
||||||
// - clientTokenHeader: []
|
// - clientTokenHeader: []
|
||||||
// - clientTokenQuery: []
|
// - clientTokenQuery: []
|
||||||
|
|
@ -70,8 +69,7 @@ func (a *UserAPI) GetUsers(ctx *gin.Context) {
|
||||||
// Return the current user.
|
// Return the current user.
|
||||||
//
|
//
|
||||||
// ---
|
// ---
|
||||||
// produces:
|
// produces: [application/json]
|
||||||
// - application/json
|
|
||||||
// security:
|
// security:
|
||||||
// - clientTokenHeader: []
|
// - clientTokenHeader: []
|
||||||
// - clientTokenQuery: []
|
// - clientTokenQuery: []
|
||||||
|
|
@ -100,10 +98,8 @@ func (a *UserAPI) GetCurrentUser(ctx *gin.Context) {
|
||||||
// Create a user.
|
// Create a user.
|
||||||
//
|
//
|
||||||
// ---
|
// ---
|
||||||
// consumes:
|
// consumes: [application/json]
|
||||||
// - application/json
|
// produces: [application/json]
|
||||||
// produces:
|
|
||||||
// - application/json
|
|
||||||
// security:
|
// security:
|
||||||
// - clientTokenHeader: []
|
// - clientTokenHeader: []
|
||||||
// - clientTokenQuery: []
|
// - clientTokenQuery: []
|
||||||
|
|
@ -147,10 +143,8 @@ func (a *UserAPI) CreateUser(ctx *gin.Context) {
|
||||||
// Get a user.
|
// Get a user.
|
||||||
//
|
//
|
||||||
// ---
|
// ---
|
||||||
// consumes:
|
// consumes: [application/json]
|
||||||
// - application/json
|
// produces: [application/json]
|
||||||
// produces:
|
|
||||||
// - application/json
|
|
||||||
// security:
|
// security:
|
||||||
// - clientTokenHeader: []
|
// - clientTokenHeader: []
|
||||||
// - clientTokenQuery: []
|
// - clientTokenQuery: []
|
||||||
|
|
@ -190,8 +184,7 @@ func (a *UserAPI) GetUserByID(ctx *gin.Context) {
|
||||||
// Deletes a user.
|
// Deletes a user.
|
||||||
//
|
//
|
||||||
// ---
|
// ---
|
||||||
// produces:
|
// produces: [application/json]
|
||||||
// - application/json
|
|
||||||
// security:
|
// security:
|
||||||
// - clientTokenHeader: []
|
// - clientTokenHeader: []
|
||||||
// - clientTokenQuery: []
|
// - clientTokenQuery: []
|
||||||
|
|
@ -230,10 +223,8 @@ func (a *UserAPI) DeleteUserByID(ctx *gin.Context) {
|
||||||
// Update the password of the current user.
|
// Update the password of the current user.
|
||||||
//
|
//
|
||||||
// ---
|
// ---
|
||||||
// consumes:
|
// consumes: [application/json]
|
||||||
// - application/json
|
// produces: [application/json]
|
||||||
// produces:
|
|
||||||
// - application/json
|
|
||||||
// security:
|
// security:
|
||||||
// - clientTokenHeader: []
|
// - clientTokenHeader: []
|
||||||
// - clientTokenQuery: []
|
// - clientTokenQuery: []
|
||||||
|
|
@ -271,10 +262,8 @@ func (a *UserAPI) ChangePassword(ctx *gin.Context) {
|
||||||
// Update a user.
|
// Update a user.
|
||||||
//
|
//
|
||||||
// ---
|
// ---
|
||||||
// consumes:
|
// consumes: [application/json]
|
||||||
// - application/json
|
// produces: [application/json]
|
||||||
// produces:
|
|
||||||
// - application/json
|
|
||||||
// security:
|
// security:
|
||||||
// - clientTokenHeader: []
|
// - clientTokenHeader: []
|
||||||
// - clientTokenQuery: []
|
// - clientTokenQuery: []
|
||||||
|
|
|
||||||
|
|
@ -64,8 +64,7 @@ func Create(db *database.GormDatabase, vInfo *model.VersionInfo, conf *config.Co
|
||||||
// Get version information.
|
// Get version information.
|
||||||
//
|
//
|
||||||
// ---
|
// ---
|
||||||
// produces:
|
// produces: [application/json]
|
||||||
// - application/json
|
|
||||||
// responses:
|
// responses:
|
||||||
// 200:
|
// 200:
|
||||||
// description: Ok
|
// description: Ok
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue