Fixed up Swagger formatting.

This commit is contained in:
Patrick Connolly
2018-11-05 15:12:30 +08:00
parent b855dc8ec5
commit e873280794
5 changed files with 22 additions and 19 deletions

View File

@@ -112,7 +112,7 @@ func (b *Api) handleDocsRedirect(c echo.Context) error {
// @Summary Create/Update a message
// @Accept json
// @Produce json
// @Param body body object true "Message object to create"
// @Param message body config.Message true "Message object to create"
// @Success 200 {object} config.Message
// @Router /message [post]
func (b *API) handlePostMessage(c echo.Context) error {
@@ -132,7 +132,7 @@ func (b *API) handlePostMessage(c echo.Context) error {
}
// handleMessages godoc
// @Summary List of new messages
// @Summary List new messages
// @Produce json
// @Success 200 {array} config.Message
// @Router /messages [get]
@@ -145,7 +145,7 @@ func (b *API) handleMessages(c echo.Context) error {
}
// handleStream godoc
// @Summary Streams realtime messages
// @Summary Stream realtime messages
// @Produce json-stream
// @Success 200 {object} config.Message
// @Router /stream [get]

View File

@@ -37,7 +37,7 @@ type Message struct {
UserID string `json:"userid" example:"U4MCXJKNC"`
// URL to an avatar image
Avatar string `json:"avatar" example:"https://secure.gravatar.com/avatar/1234567890abcdef1234567890abcdef.jpg"`
// Unique account name of format "<protocol>.<slug>"
// Unique account name of format "[protocol].[slug]"
Account string `json:"account" example:"slack.myteam"`
// Can be blank.
Event string `json:"event" example:""`