mirror of
https://github.com/go-gitea/gitea.git
synced 2025-11-03 20:36:07 +01:00
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
This commit is contained in:
committed by
Kim "BKC" Carlbäcker
parent
bb5f694fc5
commit
3edb0c5894
5
vendor/code.gitea.io/sdk/gitea/user.go
generated
vendored
5
vendor/code.gitea.io/sdk/gitea/user.go
generated
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user