summaryrefslogtreecommitdiffstats
path: root/vendor/code.gitea.io/sdk/gitea/user.go
diff options
context:
space:
mode:
authorAntoine GIRARD <sapk@users.noreply.github.com>2017-05-02 15:35:59 +0200
committerKim "BKC" Carlbäcker <kim.carlbacker@gmail.com>2017-05-02 15:35:59 +0200
commit3edb0c58943c003ed3f209b2197d1f43484a3432 (patch)
treee5849cead5053ab505a2c5dc1342111c6bcf0816 /vendor/code.gitea.io/sdk/gitea/user.go
parentbb5f694fc57c3ade9c13e841b9a237f4e192da22 (diff)
downloadgitea-3edb0c58943c003ed3f209b2197d1f43484a3432.tar.gz
gitea-3edb0c58943c003ed3f209b2197d1f43484a3432.zip
Generate swagger json (#1402)
- Generate swagger.json into public/ - Add swagger-ui auto-installation - Add footer link to local swagger-ui - Add /swagger url for using app url. - Fix Swagger-UI version via git tag
Diffstat (limited to 'vendor/code.gitea.io/sdk/gitea/user.go')
-rw-r--r--vendor/code.gitea.io/sdk/gitea/user.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/vendor/code.gitea.io/sdk/gitea/user.go b/vendor/code.gitea.io/sdk/gitea/user.go
index 967d8b5154..9fe2edcbf2 100644
--- a/vendor/code.gitea.io/sdk/gitea/user.go
+++ b/vendor/code.gitea.io/sdk/gitea/user.go
@@ -10,6 +10,7 @@ import (
)
// User represents a API user.
+// swagger:response User
type User struct {
ID int64 `json:"id"`
UserName string `json:"login"`
@@ -18,6 +19,10 @@ type User struct {
AvatarURL string `json:"avatar_url"`
}
+// UserList represents a list of API user.
+// swagger:response UserList
+type UserList []*User
+
// MarshalJSON implements the json.Marshaler interface for User, adding field(s) for backward compatibility
func (u User) MarshalJSON() ([]byte, error) {
// Re-declaring User to avoid recursion