1
0

Fixed generation of swagger docs (#29)

This commit is contained in:
konrad
2018-12-01 01:59:17 +00:00
committed by Gitea
parent 1b24cdf164
commit 007d8ec375
47 changed files with 590 additions and 411 deletions

View File

@ -31,7 +31,7 @@ import (
// @Produce json
// @Param credentials body models.APIUserPassword true "The user credentials"
// @Success 200 {object} models.User
// @Failure 400 {object} models.HTTPError "No or invalid user register object provided / User already exists."
// @Failure 400 {object} code.vikunja.io/web.HTTPError "No or invalid user register object provided / User already exists."
// @Failure 500 {object} models.Message "Internal error"
// @Router /register [post]
func RegisterUser(c echo.Context) error {

View File

@ -31,7 +31,7 @@ import (
// @Produce json
// @Param credentials body models.EmailConfirm true "The token."
// @Success 200 {object} models.Message
// @Failure 412 {object} models.HTTPError "Bad token provided."
// @Failure 412 {object} code.vikunja.io/web.HTTPError "Bad token provided."
// @Failure 500 {object} models.Message "Internal error"
// @Router /user/confirm [post]
func UserConfirmEmail(c echo.Context) error {

View File

@ -32,7 +32,7 @@ import (
// @Param s query string false "Search for a user by its name."
// @Security ApiKeyAuth
// @Success 200 {array} models.User "All (found) users."
// @Failure 400 {object} models.HTTPError "Something's invalid."
// @Failure 400 {object} code.vikunja.io/web.HTTPError "Something's invalid."
// @Failure 500 {object} models.Message "Internal server error."
// @Router /users [get]
func UserList(c echo.Context) error {

View File

@ -31,7 +31,7 @@ import (
// @Produce json
// @Param credentials body models.PasswordReset true "The token with the new password."
// @Success 200 {object} models.Message
// @Failure 400 {object} models.HTTPError "Bad token provided."
// @Failure 400 {object} code.vikunja.io/web.HTTPError "Bad token provided."
// @Failure 500 {object} models.Message "Internal error"
// @Router /user/password/reset [post]
func UserResetPassword(c echo.Context) error {
@ -57,7 +57,7 @@ func UserResetPassword(c echo.Context) error {
// @Produce json
// @Param credentials body models.PasswordTokenRequest true "The username of the user to request a token for."
// @Success 200 {object} models.Message
// @Failure 404 {object} models.HTTPError "The user does not exist."
// @Failure 404 {object} code.vikunja.io/web.HTTPError "The user does not exist."
// @Failure 500 {object} models.Message "Internal error"
// @Router /user/password/token [post]
func UserRequestResetPasswordToken(c echo.Context) error {

View File

@ -31,7 +31,7 @@ import (
// @Produce json
// @Security ApiKeyAuth
// @Success 200 {object} models.User
// @Failure 404 {object} models.HTTPError "User does not exist."
// @Failure 404 {object} code.vikunja.io/web.HTTPError "User does not exist."
// @Failure 500 {object} models.Message "Internal server error."
// @Router /user [get]
func UserShow(c echo.Context) error {

View File

@ -38,8 +38,8 @@ type UserPassword struct {
// @Param userPassword body v1.UserPassword true "The current and new password."
// @Security ApiKeyAuth
// @Success 200 {object} models.Message
// @Failure 400 {object} models.HTTPError "Something's invalid."
// @Failure 404 {object} models.HTTPError "User does not exist."
// @Failure 400 {object} code.vikunja.io/web.HTTPError "Something's invalid."
// @Failure 404 {object} code.vikunja.io/web.HTTPError "User does not exist."
// @Failure 500 {object} models.Message "Internal server error."
// @Router /user/password [post]
func UserChangePassword(c echo.Context) error {