From 07fa438348d1300485d225d4dc23d23fcf8562b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A2=D0=BE=D0=B2=D0=B0=D1=80=D0=B8=D1=89=20=D0=BF=D1=80?= =?UTF-8?q?=D0=BE=D0=B3=D1=80=D0=B0=D0=BC=D0=BC=D0=B8=D1=81=D1=82?= <46831212+ComradeProgrammer@users.noreply.github.com> Date: Fri, 3 Dec 2021 20:42:36 +0800 Subject: [PATCH] feat: update swagger api json with tags (#347) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Товарищ программист <2962928213@qq.com> --- controllers/account.go | 6 + controllers/application.go | 6 + controllers/auth.go | 2 + controllers/base.go | 6 + controllers/ldap.go | 25 +++ controllers/link.go | 2 + controllers/oidc_discovery.go | 10 +- controllers/organization.go | 5 + controllers/provider.go | 5 + controllers/record.go | 2 + controllers/resource.go | 18 ++ controllers/service.go | 2 + controllers/token.go | 7 + controllers/user.go | 13 ++ controllers/verification.go | 6 + controllers/webhook.go | 5 + routers/router.go | 11 +- swagger/swagger.json | 373 +++++++++++++++++++++++++++++----- swagger/swagger.yml | 283 +++++++++++++++++++++----- 19 files changed, 675 insertions(+), 112 deletions(-) diff --git a/controllers/account.go b/controllers/account.go index a780acf5..b4c66e28 100644 --- a/controllers/account.go +++ b/controllers/account.go @@ -71,6 +71,7 @@ type HumanCheck struct { } // Signup +// @Tag Login API // @Title Signup // @Description sign up a new user // @Param username formData string true "The username to sign up" @@ -177,6 +178,7 @@ func (c *ApiController) Signup() { // Logout // @Title Logout +// @Tag Login API // @Description logout the current user // @Success 200 {object} controllers.Response The Response object // @router /logout [post] @@ -192,6 +194,7 @@ func (c *ApiController) Logout() { // GetAccount // @Title GetAccount +// @Tag Account API // @Description get the details of the current account // @Success 200 {object} controllers.Response The Response object // @router /get-account [get] @@ -213,6 +216,9 @@ func (c *ApiController) GetAccount() { } // GetHumanCheck ... +// @Tag Login API +// @Title GetHumancheck +// @router /api/get-human-check [get] func (c *ApiController) GetHumanCheck() { c.Data["json"] = HumanCheck{Type: "none"} diff --git a/controllers/application.go b/controllers/application.go index 9dad8509..cbd10a90 100644 --- a/controllers/application.go +++ b/controllers/application.go @@ -24,6 +24,7 @@ import ( // GetApplications // @Title GetApplications +// @Tag Application API // @Description get all applications // @Param owner query string true "The owner of applications." // @Success 200 {array} object.Application The Response object @@ -45,6 +46,7 @@ func (c *ApiController) GetApplications() { // GetApplication // @Title GetApplication +// @Tag Application API // @Description get the detail of an application // @Param id query string true "The id of the application." // @Success 200 {object} object.Application The Response object @@ -58,6 +60,7 @@ func (c *ApiController) GetApplication() { // GetUserApplication // @Title GetUserApplication +// @Tag Application API // @Description get the detail of the user's application // @Param id query string true "The id of the user" // @Success 200 {object} object.Application The Response object @@ -76,6 +79,7 @@ func (c *ApiController) GetUserApplication() { // UpdateApplication // @Title UpdateApplication +// @Tag Application API // @Description update an application // @Param id query string true "The id of the application" // @Param body body object.Application true "The details of the application" @@ -96,6 +100,7 @@ func (c *ApiController) UpdateApplication() { // AddApplication // @Title AddApplication +// @Tag Application API // @Description add an application // @Param body body object.Application true "The details of the application" // @Success 200 {object} controllers.Response The Response object @@ -113,6 +118,7 @@ func (c *ApiController) AddApplication() { // DeleteApplication // @Title DeleteApplication +// @Tag Application API // @Description delete an application // @Param body body object.Application true "The details of the application" // @Success 200 {object} controllers.Response The Response object diff --git a/controllers/auth.go b/controllers/auth.go index ecb1ba38..f65beab0 100644 --- a/controllers/auth.go +++ b/controllers/auth.go @@ -75,6 +75,7 @@ func (c *ApiController) HandleLoggedIn(application *object.Application, user *ob // GetApplicationLogin ... // @Title GetApplicationLogin +// @Tag Login API // @Description get application login // @Param clientId query string true "client id" // @Param responseType query string true "response type" @@ -108,6 +109,7 @@ func setHttpClient(idProvider idp.IdProvider, providerType string) { // Login ... // @Title Login +// @Tag Login API // @Description login // @Param oAuthParams query string true "oAuth parameters" // @Param body body RequestForm true "Login information" diff --git a/controllers/base.go b/controllers/base.go index 6b80535a..36f54131 100644 --- a/controllers/base.go +++ b/controllers/base.go @@ -21,10 +21,16 @@ import ( "github.com/casbin/casdoor/util" ) +// controller for handlers under /api uri type ApiController struct { beego.Controller } +// controller for handlers directly under / (root) +type RootController struct { + ApiController +} + type SessionData struct { ExpireTime int64 } diff --git a/controllers/ldap.go b/controllers/ldap.go index 82c1b4b4..13bb0f76 100644 --- a/controllers/ldap.go +++ b/controllers/ldap.go @@ -16,6 +16,7 @@ package controllers import ( "encoding/json" + "github.com/casbin/casdoor/object" "github.com/casbin/casdoor/util" ) @@ -43,6 +44,9 @@ type LdapSyncResp struct { Failed []object.LdapRespUser `json:"failed"` } +// @Tag Account API +// @Title GetLdapser +// @router /get-ldap-user [post] func (c *ApiController) GetLdapUser() { ldapServer := LdapServer{} err := json.Unmarshal(c.Ctx.Input.RequestBody, &ldapServer) @@ -96,6 +100,9 @@ func (c *ApiController) GetLdapUser() { c.ServeJSON() } +// @Tag Account API +// @Title GetLdaps +// @router /get-ldaps [post] func (c *ApiController) GetLdaps() { owner := c.Input().Get("owner") @@ -103,6 +110,9 @@ func (c *ApiController) GetLdaps() { c.ServeJSON() } +// @Tag Account API +// @Title GetLdap +// @router /get-ldap [post] func (c *ApiController) GetLdap() { id := c.Input().Get("id") @@ -115,6 +125,9 @@ func (c *ApiController) GetLdap() { c.ServeJSON() } +// @Tag Account API +// @Title AddLdap +// @router /add-ldap [post] func (c *ApiController) AddLdap() { var ldap object.Ldap err := json.Unmarshal(c.Ctx.Input.RequestBody, &ldap) @@ -143,6 +156,9 @@ func (c *ApiController) AddLdap() { c.ServeJSON() } +// @Tag Account API +// @Title UpdateLdap +// @router /update-ldap [post] func (c *ApiController) UpdateLdap() { var ldap object.Ldap err := json.Unmarshal(c.Ctx.Input.RequestBody, &ldap) @@ -161,6 +177,9 @@ func (c *ApiController) UpdateLdap() { c.ServeJSON() } +// @Tag Account API +// @Title DeleteLdap +// @router /delete-ldap [post] func (c *ApiController) DeleteLdap() { var ldap object.Ldap err := json.Unmarshal(c.Ctx.Input.RequestBody, &ldap) @@ -172,6 +191,9 @@ func (c *ApiController) DeleteLdap() { c.ServeJSON() } +// @Tag Account API +// @Title SyncLdapUsers +// @router /sync-ldap-users [post] func (c *ApiController) SyncLdapUsers() { owner := c.Input().Get("owner") ldapId := c.Input().Get("ldapId") @@ -191,6 +213,9 @@ func (c *ApiController) SyncLdapUsers() { c.ServeJSON() } +// @Tag Account API +// @Title CheckLdapUserExist +// @router /check-ldap-users-exist [post] func (c *ApiController) CheckLdapUsersExist() { owner := c.Input().Get("owner") var uuids []string diff --git a/controllers/link.go b/controllers/link.go index d6201466..bd752dd1 100644 --- a/controllers/link.go +++ b/controllers/link.go @@ -25,6 +25,8 @@ type LinkForm struct { } // Unlink ... +// @router /unlink [post] +// @Tag Login API func (c *ApiController) Unlink() { userId, ok := c.RequireSignedIn() if !ok { diff --git a/controllers/oidc_discovery.go b/controllers/oidc_discovery.go index cfb1177e..51b6b678 100644 --- a/controllers/oidc_discovery.go +++ b/controllers/oidc_discovery.go @@ -16,12 +16,18 @@ package controllers import "github.com/casbin/casdoor/object" -func (c *ApiController) GetOidcDiscovery() { +// @Title GetOidcDiscovery +// @Tag OIDC API +// @router /.well-known/openid-configuration [get] +func (c *RootController) GetOidcDiscovery() { c.Data["json"] = object.GetOidcDiscovery() c.ServeJSON() } -func (c *ApiController) GetOidcCert() { +// @Title GetOidcCert +// @Tag OIDC API +// @router /api/certs [get] +func (c *RootController) GetOidcCert() { jwks, err := object.GetJSONWebKeySet() if err != nil { c.ResponseError(err.Error()) diff --git a/controllers/organization.go b/controllers/organization.go index 8c5e61a5..03894bb0 100644 --- a/controllers/organization.go +++ b/controllers/organization.go @@ -24,6 +24,7 @@ import ( // GetOrganizations ... // @Title GetOrganizations +// @Tag Organization API // @Description get organizations // @Param owner query string true "owner" // @Success 200 {array} object.Organization The Response object @@ -45,6 +46,7 @@ func (c *ApiController) GetOrganizations() { // GetOrganization ... // @Title GetOrganization +// @Tag Organization API // @Description get organization // @Param id query string true "organization id" // @Success 200 {object} object.Organization The Response object @@ -58,6 +60,7 @@ func (c *ApiController) GetOrganization() { // UpdateOrganization ... // @Title UpdateOrganization +// @Tag Organization API // @Description update organization // @Param id query string true "The id of the organization" // @Param body body object.Organization true "The details of the organization" @@ -78,6 +81,7 @@ func (c *ApiController) UpdateOrganization() { // AddOrganization ... // @Title AddOrganization +// @Tag Organization API // @Description add organization // @Param body body object.Organization true "The details of the organization" // @Success 200 {object} controllers.Response The Response object @@ -95,6 +99,7 @@ func (c *ApiController) AddOrganization() { // DeleteOrganization ... // @Title DeleteOrganization +// @Tag Organization API // @Description delete organization // @Param body body object.Organization true "The details of the organization" // @Success 200 {object} controllers.Response The Response object diff --git a/controllers/provider.go b/controllers/provider.go index 246a56e1..a2a213f3 100644 --- a/controllers/provider.go +++ b/controllers/provider.go @@ -24,6 +24,7 @@ import ( // GetProviders // @Title GetProviders +// @Tag Provider API // @Description get providers // @Param owner query string true "The owner of providers" // @Success 200 {array} object.Provider The Response object @@ -44,6 +45,7 @@ func (c *ApiController) GetProviders() { } // @Title GetProvider +// @Tag Provider API // @Description get provider // @Param id query string true "The id of the provider" // @Success 200 {object} object.Provider The Response object @@ -56,6 +58,7 @@ func (c *ApiController) GetProvider() { } // @Title UpdateProvider +// @Tag Provider API // @Description update provider // @Param id query string true "The id of the provider" // @Param body body object.Provider true "The details of the provider" @@ -75,6 +78,7 @@ func (c *ApiController) UpdateProvider() { } // @Title AddProvider +// @Tag Provider API // @Description add provider // @Param body body object.Provider true "The details of the provider" // @Success 200 {object} controllers.Response The Response object @@ -91,6 +95,7 @@ func (c *ApiController) AddProvider() { } // @Title DeleteProvider +// @Tag Provider API // @Description delete provider // @Param body body object.Provider true "The details of the provider" // @Success 200 {object} controllers.Response The Response object diff --git a/controllers/record.go b/controllers/record.go index 7d174956..a0955ed0 100644 --- a/controllers/record.go +++ b/controllers/record.go @@ -22,6 +22,7 @@ import ( // GetRecords // @Title GetRecords +// @Tag Record API // @Description get all records // @Param pageSize query string true "The size of each page" // @Param p query string true "The number of the page" @@ -42,6 +43,7 @@ func (c *ApiController) GetRecords() { } // GetRecordsByFilter +// @Tag Record API // @Title GetRecordsByFilter // @Description get records by filter // @Param body body object.Records true "filter Record message" diff --git a/controllers/resource.go b/controllers/resource.go index 4285cc3d..1d757ec9 100644 --- a/controllers/resource.go +++ b/controllers/resource.go @@ -27,6 +27,9 @@ import ( "github.com/casbin/casdoor/util" ) +// @router /get-resources [get] +// @Tag Resource API +// @Title GetResources func (c *ApiController) GetResources() { owner := c.Input().Get("owner") user := c.Input().Get("user") @@ -43,6 +46,9 @@ func (c *ApiController) GetResources() { } } +// @Tag Resource API +// @Title GetResource +// @router /get-resource [get] func (c *ApiController) GetResource() { id := c.Input().Get("id") @@ -50,6 +56,9 @@ func (c *ApiController) GetResource() { c.ServeJSON() } +// @Tag Resource API +// @Title UpdateResource +// @router /update-resource [post] func (c *ApiController) UpdateResource() { id := c.Input().Get("id") @@ -63,6 +72,9 @@ func (c *ApiController) UpdateResource() { c.ServeJSON() } +// @Tag Resource API +// @Title AddResource +// @router /add-resource [post] func (c *ApiController) AddResource() { var resource object.Resource err := json.Unmarshal(c.Ctx.Input.RequestBody, &resource) @@ -74,6 +86,9 @@ func (c *ApiController) AddResource() { c.ServeJSON() } +// @Tag Resource API +// @Title DeleteResource +// @router /delete-resource [post] func (c *ApiController) DeleteResource() { var resource object.Resource err := json.Unmarshal(c.Ctx.Input.RequestBody, &resource) @@ -96,6 +111,9 @@ func (c *ApiController) DeleteResource() { c.ServeJSON() } +// @Tag Resource API +// @Title UploadResource +// @router /upload-resource [post] func (c *ApiController) UploadResource() { owner := c.Input().Get("owner") username := c.Input().Get("user") diff --git a/controllers/service.go b/controllers/service.go index d86b2d5e..b9655eef 100644 --- a/controllers/service.go +++ b/controllers/service.go @@ -27,6 +27,7 @@ import ( // SendEmail // @Title SendEmail +// @Tag Service API // @Description This API is not for Casdoor frontend to call, it is for Casdoor SDKs. // @Param clientId query string true "The clientId of the application" // @Param clientSecret query string true "The clientSecret of the application" @@ -81,6 +82,7 @@ func (c *ApiController) SendEmail() { // SendSms // @Title SendSms +// @Tag Service API // @Description This API is not for Casdoor frontend to call, it is for Casdoor SDKs. // @Param clientId query string true "The clientId of the application" // @Param clientSecret query string true "The clientSecret of the application" diff --git a/controllers/token.go b/controllers/token.go index 0915d1cb..706406e6 100644 --- a/controllers/token.go +++ b/controllers/token.go @@ -24,6 +24,7 @@ import ( // GetTokens // @Title GetTokens +// @Tag Token API // @Description get tokens // @Param owner query string true "The owner of tokens" // @Param pageSize query string true "The size of each page" @@ -47,6 +48,7 @@ func (c *ApiController) GetTokens() { // GetToken // @Title GetToken +// @Tag Token API // @Description get token // @Param id query string true "The id of token" // @Success 200 {object} object.Token The Response object @@ -60,6 +62,7 @@ func (c *ApiController) GetToken() { // UpdateToken // @Title UpdateToken +// @Tag Token API // @Description update token // @Param id query string true "The id of token" // @Param body body object.Token true "Details of the token" @@ -80,6 +83,7 @@ func (c *ApiController) UpdateToken() { // AddToken // @Title AddToken +// @Tag Token API // @Description add token // @Param body body object.Token true "Details of the token" // @Success 200 {object} controllers.Response The Response object @@ -96,6 +100,7 @@ func (c *ApiController) AddToken() { } // DeleteToken +// @Tag Token API // @Title DeleteToken // @Description delete token // @Param body body object.Token true "Details of the token" @@ -114,6 +119,7 @@ func (c *ApiController) DeleteToken() { // GetOAuthCode // @Title GetOAuthCode +// @Tag Token API // @Description get OAuth code // @Param user_id query string true "The id of user" // @Param client_id query string true "OAuth client id" @@ -137,6 +143,7 @@ func (c *ApiController) GetOAuthCode() { // GetOAuthToken // @Title GetOAuthToken +// @Tag Token API // @Description get OAuth access token // @Param grant_type query string true "OAuth grant type" // @Param client_id query string true "OAuth client id" diff --git a/controllers/user.go b/controllers/user.go index 54675de0..99df8022 100644 --- a/controllers/user.go +++ b/controllers/user.go @@ -27,6 +27,7 @@ import ( // GetGlobalUsers // @Title GetGlobalUsers +// @Tag User API // @Description get global users // @Success 200 {array} object.User The Response object // @router /get-global-users [get] @@ -46,6 +47,7 @@ func (c *ApiController) GetGlobalUsers() { // GetUsers // @Title GetUsers +// @Tag User API // @Description // @Param owner query string true "The owner of users" // @Success 200 {array} object.User The Response object @@ -67,6 +69,7 @@ func (c *ApiController) GetUsers() { // GetUser // @Title GetUser +// @Tag User API // @Description get user // @Param id query string true "The id of the user" // @Success 200 {object} object.User The Response object @@ -89,6 +92,7 @@ func (c *ApiController) GetUser() { // UpdateUser // @Title UpdateUser +// @Tag User API // @Description update user // @Param id query string true "The id of the user" // @Param body body object.User true "The details of the user" @@ -120,6 +124,7 @@ func (c *ApiController) UpdateUser() { // AddUser // @Title AddUser +// @Tag User API // @Description add user // @Param body body object.User true "The details of the user" // @Success 200 {object} controllers.Response The Response object @@ -137,6 +142,7 @@ func (c *ApiController) AddUser() { // DeleteUser // @Title DeleteUser +// @Tag User API // @Description delete user // @Param body body object.User true "The details of the user" // @Success 200 {object} controllers.Response The Response object @@ -154,6 +160,7 @@ func (c *ApiController) DeleteUser() { // GetEmailAndPhone // @Title GetEmailAndPhone +// @Tag User API // @Description get email and phone by username // @Param username formData string true "The username of the user" // @Param organization formData string true "The organization of the user" @@ -188,6 +195,7 @@ func (c *ApiController) GetEmailAndPhone() { // SetPassword // @Title SetPassword +// @Tag Account API // @Description set password // @Param userOwner formData string true "The owner of the user" // @Param userName formData string true "The name of the user" @@ -260,6 +268,9 @@ func (c *ApiController) SetPassword() { c.ServeJSON() } +// @Title CheckUserPassword +// @router /check-user-password [post] +// @Tag User API func (c *ApiController) CheckUserPassword() { var user object.User err := json.Unmarshal(c.Ctx.Input.RequestBody, &user) @@ -277,6 +288,7 @@ func (c *ApiController) CheckUserPassword() { // GetSortedUsers // @Title GetSortedUsers +// @Tag User API // @Description // @Param owner query string true "The owner of users" // @Param sorter query string true "The DB column name to sort by, e.g., created_time" @@ -294,6 +306,7 @@ func (c *ApiController) GetSortedUsers() { // GetUserCount // @Title GetUserCount +// @Tag User API // @Description // @Param owner query string true "The owner of users" // @Param isOnline query string true "The filter for query, 1 for online, 0 for offline, empty string for all users" diff --git a/controllers/verification.go b/controllers/verification.go index 62e52871..37c23305 100644 --- a/controllers/verification.go +++ b/controllers/verification.go @@ -35,6 +35,9 @@ func (c *ApiController) getCurrentUser() *object.User { } // SendVerificationCode ... +// @Title SendVerificationCode +// @Tag Verification API +// @router /send-verification-code [post] func (c *ApiController) SendVerificationCode() { destType := c.Ctx.Request.Form.Get("type") dest := c.Ctx.Request.Form.Get("dest") @@ -100,6 +103,9 @@ func (c *ApiController) SendVerificationCode() { } // ResetEmailOrPhone ... +// @Tag Account API +// @Title ResetEmailOrPhone +// @router /api/reset-email-or-phone [post] func (c *ApiController) ResetEmailOrPhone() { userId, ok := c.RequireSignedIn() if !ok { diff --git a/controllers/webhook.go b/controllers/webhook.go index 5be4a552..af5a9ebb 100644 --- a/controllers/webhook.go +++ b/controllers/webhook.go @@ -24,6 +24,7 @@ import ( // GetWebhooks // @Title GetWebhooks +// @Tag Webhook API // @Description get webhooks // @Param owner query string true "The owner of webhooks" // @Success 200 {array} object.Webhook The Response object @@ -44,6 +45,7 @@ func (c *ApiController) GetWebhooks() { } // @Title GetWebhook +// @Tag Webhook API // @Description get webhook // @Param id query string true "The id of the webhook" // @Success 200 {object} object.Webhook The Response object @@ -56,6 +58,7 @@ func (c *ApiController) GetWebhook() { } // @Title UpdateWebhook +// @Tag Webhook API // @Description update webhook // @Param id query string true "The id of the webhook" // @Param body body object.Webhook true "The details of the webhook" @@ -75,6 +78,7 @@ func (c *ApiController) UpdateWebhook() { } // @Title AddWebhook +// @Tag Webhook API // @Description add webhook // @Param body body object.Webhook true "The details of the webhook" // @Success 200 {object} controllers.Response The Response object @@ -91,6 +95,7 @@ func (c *ApiController) AddWebhook() { } // @Title DeleteWebhook +// @Tag Webhook API // @Description delete webhook // @Param body body object.Webhook true "The details of the webhook" // @Success 200 {object} controllers.Response The Response object diff --git a/routers/router.go b/routers/router.go index a553d459..e1ccf30f 100644 --- a/routers/router.go +++ b/routers/router.go @@ -31,12 +31,17 @@ func init() { func initAPI() { ns := - beego.NewNamespace("/api", + beego.NewNamespace("/", beego.NSNamespace("/api", beego.NSInclude( &controllers.ApiController{}, ), ), + beego.NSNamespace("", + beego.NSInclude( + &controllers.RootController{}, + ), + ), ) beego.AddNamespace(ns) @@ -118,6 +123,6 @@ func initAPI() { beego.Router("/api/send-email", &controllers.ApiController{}, "POST:SendEmail") beego.Router("/api/send-sms", &controllers.ApiController{}, "POST:SendSms") - beego.Router("/.well-known/openid-configuration", &controllers.ApiController{}, "GET:GetOidcDiscovery") - beego.Router("/api/certs",&controllers.ApiController{},"*:GetOidcCert") + beego.Router("/.well-known/openid-configuration", &controllers.RootController{}, "GET:GetOidcDiscovery") + beego.Router("/api/certs", &controllers.RootController{}, "*:GetOidcCert") } diff --git a/swagger/swagger.json b/swagger/swagger.json index a7029a47..a988f7bd 100644 --- a/swagger/swagger.json +++ b/swagger/swagger.json @@ -10,10 +10,18 @@ }, "basePath": "/", "paths": { + "/.well-known/openid-configuration": { + "get": { + "tags": [ + "OIDC API" + ], + "operationId": "RootController.GetOidcDiscovery" + } + }, "/api/add-application": { "post": { "tags": [ - "api" + "Application API" ], "description": "add an application", "operationId": "ApiController.AddApplication", @@ -38,10 +46,18 @@ } } }, + "/api/add-ldap": { + "post": { + "tags": [ + "Account API" + ], + "operationId": "ApiController.AddLdap" + } + }, "/api/add-organization": { "post": { "tags": [ - "api" + "Organization API" ], "description": "add organization", "operationId": "ApiController.AddOrganization", @@ -69,7 +85,7 @@ "/api/add-provider": { "post": { "tags": [ - "api" + "Provider API" ], "description": "add provider", "operationId": "ApiController.AddProvider", @@ -94,10 +110,18 @@ } } }, + "/api/add-resource": { + "post": { + "tags": [ + "Resource API" + ], + "operationId": "ApiController.AddResource" + } + }, "/api/add-token": { "post": { "tags": [ - "api" + "Token API" ], "description": "add token", "operationId": "ApiController.AddToken", @@ -125,7 +149,7 @@ "/api/add-user": { "post": { "tags": [ - "api" + "User API" ], "description": "add user", "operationId": "ApiController.AddUser", @@ -153,7 +177,7 @@ "/api/add-webhook": { "post": { "tags": [ - "api" + "Webhook API" ], "description": "add webhook", "operationId": "ApiController.AddWebhook", @@ -178,10 +202,26 @@ } } }, + "/api/api/get-human-check": { + "get": { + "tags": [ + "Login API" + ], + "operationId": "ApiController.GetHumancheck" + } + }, + "/api/api/reset-email-or-phone": { + "post": { + "tags": [ + "Account API" + ], + "operationId": "ApiController.ResetEmailOrPhone" + } + }, "/api/api/send-email": { "post": { "tags": [ - "api" + "Service API" ], "description": "This API is not for Casdoor frontend to call, it is for Casdoor SDKs.", "operationId": "ApiController.SendEmail", @@ -223,7 +263,7 @@ "/api/api/send-sms": { "post": { "tags": [ - "api" + "Service API" ], "description": "This API is not for Casdoor frontend to call, it is for Casdoor SDKs.", "operationId": "ApiController.SendSms", @@ -262,10 +302,34 @@ } } }, + "/api/certs": { + "get": { + "tags": [ + "OIDC API" + ], + "operationId": "RootController.GetOidcCert" + } + }, + "/api/check-ldap-users-exist": { + "post": { + "tags": [ + "Account API" + ], + "operationId": "ApiController.CheckLdapUserExist" + } + }, + "/api/check-user-password": { + "post": { + "tags": [ + "User API" + ], + "operationId": "ApiController.CheckUserPassword" + } + }, "/api/delete-application": { "post": { "tags": [ - "api" + "Application API" ], "description": "delete an application", "operationId": "ApiController.DeleteApplication", @@ -290,10 +354,18 @@ } } }, + "/api/delete-ldap": { + "post": { + "tags": [ + "Account API" + ], + "operationId": "ApiController.DeleteLdap" + } + }, "/api/delete-organization": { "post": { "tags": [ - "api" + "Organization API" ], "description": "delete organization", "operationId": "ApiController.DeleteOrganization", @@ -321,7 +393,7 @@ "/api/delete-provider": { "post": { "tags": [ - "api" + "Provider API" ], "description": "delete provider", "operationId": "ApiController.DeleteProvider", @@ -346,10 +418,18 @@ } } }, + "/api/delete-resource": { + "post": { + "tags": [ + "Resource API" + ], + "operationId": "ApiController.DeleteResource" + } + }, "/api/delete-token": { "post": { "tags": [ - "api" + "Token API" ], "description": "delete token", "operationId": "ApiController.DeleteToken", @@ -377,7 +457,7 @@ "/api/delete-user": { "post": { "tags": [ - "api" + "User API" ], "description": "delete user", "operationId": "ApiController.DeleteUser", @@ -405,7 +485,7 @@ "/api/delete-webhook": { "post": { "tags": [ - "api" + "Webhook API" ], "description": "delete webhook", "operationId": "ApiController.DeleteWebhook", @@ -433,7 +513,7 @@ "/api/get-account": { "get": { "tags": [ - "api" + "Account API" ], "description": "get the details of the current account", "operationId": "ApiController.GetAccount", @@ -450,7 +530,7 @@ "/api/get-application": { "get": { "tags": [ - "api" + "Application API" ], "description": "get the detail of an application", "operationId": "ApiController.GetApplication", @@ -476,7 +556,7 @@ "/api/get-applications": { "get": { "tags": [ - "api" + "Application API" ], "description": "get all applications", "operationId": "ApiController.GetApplications", @@ -505,7 +585,7 @@ "/api/get-email-and-phone": { "post": { "tags": [ - "api" + "User API" ], "description": "get email and phone by username", "operationId": "ApiController.GetEmailAndPhone", @@ -538,7 +618,7 @@ "/api/get-global-users": { "get": { "tags": [ - "api" + "User API" ], "description": "get global users", "operationId": "ApiController.GetGlobalUsers", @@ -555,10 +635,34 @@ } } }, + "/api/get-ldap": { + "post": { + "tags": [ + "Account API" + ], + "operationId": "ApiController.GetLdap" + } + }, + "/api/get-ldap-user": { + "post": { + "tags": [ + "Account API" + ], + "operationId": "ApiController.GetLdapser" + } + }, + "/api/get-ldaps": { + "post": { + "tags": [ + "Account API" + ], + "operationId": "ApiController.GetLdaps" + } + }, "/api/get-organization": { "get": { "tags": [ - "api" + "Organization API" ], "description": "get organization", "operationId": "ApiController.GetOrganization", @@ -584,7 +688,7 @@ "/api/get-organizations": { "get": { "tags": [ - "api" + "Organization API" ], "description": "get organizations", "operationId": "ApiController.GetOrganizations", @@ -613,7 +717,7 @@ "/api/get-provider": { "get": { "tags": [ - "api" + "Provider API" ], "description": "get provider", "operationId": "ApiController.GetProvider", @@ -639,7 +743,7 @@ "/api/get-providers": { "get": { "tags": [ - "api" + "Provider API" ], "description": "get providers", "operationId": "ApiController.GetProviders", @@ -668,7 +772,7 @@ "/api/get-records": { "get": { "tags": [ - "api" + "Record API" ], "description": "get all records", "operationId": "ApiController.GetRecords", @@ -704,7 +808,7 @@ "/api/get-records-filter": { "post": { "tags": [ - "api" + "Record API" ], "description": "get records by filter", "operationId": "ApiController.GetRecordsByFilter", @@ -732,10 +836,68 @@ } } }, + "/api/get-resource": { + "get": { + "tags": [ + "Resource API" + ], + "operationId": "ApiController.GetResource" + } + }, + "/api/get-resources": { + "get": { + "tags": [ + "Resource API" + ], + "operationId": "ApiController.GetResources" + } + }, + "/api/get-sorted-users": { + "get": { + "tags": [ + "User API" + ], + "operationId": "ApiController.GetSortedUsers", + "parameters": [ + { + "in": "query", + "name": "owner", + "description": "The owner of users", + "required": true, + "type": "string" + }, + { + "in": "query", + "name": "sorter", + "description": "The DB column name to sort by, e.g., created_time", + "required": true, + "type": "string" + }, + { + "in": "query", + "name": "limit", + "description": "The count of users to return, e.g., 25", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "The Response object", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/object.User" + } + } + } + } + } + }, "/api/get-token": { "get": { "tags": [ - "api" + "Token API" ], "description": "get token", "operationId": "ApiController.GetToken", @@ -761,7 +923,7 @@ "/api/get-tokens": { "get": { "tags": [ - "api" + "Token API" ], "description": "get tokens", "operationId": "ApiController.GetTokens", @@ -804,7 +966,7 @@ "/api/get-user": { "get": { "tags": [ - "api" + "User API" ], "description": "get user", "operationId": "ApiController.GetUser", @@ -830,7 +992,7 @@ "/api/get-user-application": { "get": { "tags": [ - "api" + "Application API" ], "description": "get the detail of the user's application", "operationId": "ApiController.GetUserApplication", @@ -853,10 +1015,39 @@ } } }, + "/api/get-user-count": { + "get": { + "tags": [ + "User API" + ], + "operationId": "ApiController.GetUserCount", + "parameters": [ + { + "in": "query", + "name": "owner", + "description": "The owner of users", + "required": true, + "type": "string" + }, + { + "in": "query", + "name": "isOnline", + "description": "The filter for query, 1 for online, 0 for offline, empty string for all users", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "{int} int The count of filtered users for an organization" + } + } + } + }, "/api/get-users": { "get": { "tags": [ - "api" + "User API" ], "operationId": "ApiController.GetUsers", "parameters": [ @@ -884,7 +1075,7 @@ "/api/get-webhook": { "get": { "tags": [ - "api" + "Webhook API" ], "description": "get webhook", "operationId": "ApiController.GetWebhook", @@ -910,7 +1101,7 @@ "/api/get-webhooks": { "get": { "tags": [ - "api" + "Webhook API" ], "description": "get webhooks", "operationId": "ApiController.GetWebhooks", @@ -939,7 +1130,7 @@ "/api/login": { "post": { "tags": [ - "api" + "Login API" ], "description": "login", "operationId": "ApiController.Login", @@ -974,7 +1165,7 @@ "/api/login/oauth/access_token": { "post": { "tags": [ - "api" + "Token API" ], "description": "get OAuth access token", "operationId": "ApiController.GetOAuthToken", @@ -1021,7 +1212,7 @@ "/api/login/oauth/code": { "post": { "tags": [ - "api" + "Token API" ], "description": "get OAuth code", "operationId": "ApiController.GetOAuthCode", @@ -1082,7 +1273,7 @@ "/api/logout": { "post": { "tags": [ - "api" + "Login API" ], "description": "logout the current user", "operationId": "ApiController.Logout", @@ -1096,10 +1287,18 @@ } } }, + "/api/send-verification-code": { + "post": { + "tags": [ + "Verification API" + ], + "operationId": "ApiController.SendVerificationCode" + } + }, "/api/set-password": { "post": { "tags": [ - "api" + "Account API" ], "description": "set password", "operationId": "ApiController.SetPassword", @@ -1146,7 +1345,7 @@ "/api/signup": { "post": { "tags": [ - "api" + "Login API" ], "description": "sign up a new user", "operationId": "ApiController.Signup", @@ -1176,10 +1375,25 @@ } } }, + "/api/sync-ldap-users": { + "post": { + "tags": [ + "Account API" + ], + "operationId": "ApiController.SyncLdapUsers" + } + }, + "/api/unlink": { + "post": { + "tags": [ + "Login API" + ] + } + }, "/api/update-application": { "get": { "tags": [ - "api" + "Login API" ], "description": "get application login", "operationId": "ApiController.GetApplicationLogin", @@ -1231,7 +1445,7 @@ }, "post": { "tags": [ - "api" + "Application API" ], "description": "update an application", "operationId": "ApiController.UpdateApplication", @@ -1263,10 +1477,18 @@ } } }, + "/api/update-ldap": { + "post": { + "tags": [ + "Account API" + ], + "operationId": "ApiController.UpdateLdap" + } + }, "/api/update-organization": { "post": { "tags": [ - "api" + "Organization API" ], "description": "update organization", "operationId": "ApiController.UpdateOrganization", @@ -1301,7 +1523,7 @@ "/api/update-provider": { "post": { "tags": [ - "api" + "Provider API" ], "description": "update provider", "operationId": "ApiController.UpdateProvider", @@ -1333,10 +1555,18 @@ } } }, + "/api/update-resource": { + "post": { + "tags": [ + "Resource API" + ], + "operationId": "ApiController.UpdateResource" + } + }, "/api/update-token": { "post": { "tags": [ - "api" + "Token API" ], "description": "update token", "operationId": "ApiController.UpdateToken", @@ -1371,7 +1601,7 @@ "/api/update-user": { "post": { "tags": [ - "api" + "User API" ], "description": "update user", "operationId": "ApiController.UpdateUser", @@ -1406,7 +1636,7 @@ "/api/update-webhook": { "post": { "tags": [ - "api" + "Webhook API" ], "description": "update webhook", "operationId": "ApiController.UpdateWebhook", @@ -1437,14 +1667,22 @@ } } } + }, + "/api/upload-resource": { + "post": { + "tags": [ + "Resource API" + ], + "operationId": "ApiController.UploadResource" + } } }, "definitions": { - "1773.0xc000093bf0.false": { + "1713.0xc000393f50.false": { "title": "false", "type": "object" }, - "1808.0xc000093c20.false": { + "1747.0xc000393f80.false": { "title": "false", "type": "object" }, @@ -1461,10 +1699,10 @@ "type": "object", "properties": { "data": { - "$ref": "#/definitions/1773.0xc000093bf0.false" + "$ref": "#/definitions/1713.0xc000393f50.false" }, "data2": { - "$ref": "#/definitions/1808.0xc000093c20.false" + "$ref": "#/definitions/1747.0xc000393f80.false" }, "msg": { "type": "string" @@ -1479,10 +1717,10 @@ "type": "object", "properties": { "data": { - "$ref": "#/definitions/1773.0xc000093bf0.false" + "$ref": "#/definitions/1713.0xc000393f50.false" }, "data2": { - "$ref": "#/definitions/1808.0xc000093c20.false" + "$ref": "#/definitions/1747.0xc000393f80.false" }, "msg": { "type": "string" @@ -1518,6 +1756,9 @@ "displayName": { "type": "string" }, + "enableCodeSignin": { + "type": "boolean" + }, "enablePassword": { "type": "boolean" }, @@ -1799,6 +2040,9 @@ "type": "integer", "format": "int64" }, + "id_token": { + "type": "string" + }, "scope": { "type": "string" }, @@ -1826,6 +2070,12 @@ "bio": { "type": "string" }, + "birthday": { + "type": "string" + }, + "createdIp": { + "type": "string" + }, "createdTime": { "type": "string" }, @@ -1835,12 +2085,18 @@ "displayName": { "type": "string" }, + "education": { + "type": "string" + }, "email": { "type": "string" }, "facebook": { "type": "string" }, + "gender": { + "type": "string" + }, "gitee": { "type": "string" }, @@ -1862,9 +2118,18 @@ "id": { "type": "string" }, + "idCard": { + "type": "string" + }, + "idCardType": { + "type": "string" + }, "isAdmin": { "type": "boolean" }, + "isDefaultAvatar": { + "type": "boolean" + }, "isDeleted": { "type": "boolean" }, @@ -1883,6 +2148,12 @@ "lark": { "type": "string" }, + "lastSigninIp": { + "type": "string" + }, + "lastSigninTime": { + "type": "string" + }, "ldap": { "type": "string" }, diff --git a/swagger/swagger.yml b/swagger/swagger.yml index 8d6ea2f5..c951fff9 100644 --- a/swagger/swagger.yml +++ b/swagger/swagger.yml @@ -5,12 +5,17 @@ info: version: 1.0.0 contact: email: admin@casbin.org -basePath: /api +basePath: / paths: + /.well-known/openid-configuration: + get: + tags: + - OIDC API + operationId: RootController.GetOidcDiscovery /api/add-application: post: tags: - - api + - Application API description: add an application operationId: ApiController.AddApplication parameters: @@ -25,10 +30,15 @@ paths: description: The Response object schema: $ref: '#/definitions/controllers.Response' + /api/add-ldap: + post: + tags: + - Account API + operationId: ApiController.AddLdap /api/add-organization: post: tags: - - api + - Organization API description: add organization operationId: ApiController.AddOrganization parameters: @@ -46,7 +56,7 @@ paths: /api/add-provider: post: tags: - - api + - Provider API description: add provider operationId: ApiController.AddProvider parameters: @@ -61,10 +71,15 @@ paths: description: The Response object schema: $ref: '#/definitions/controllers.Response' + /api/add-resource: + post: + tags: + - Resource API + operationId: ApiController.AddResource /api/add-token: post: tags: - - api + - Token API description: add token operationId: ApiController.AddToken parameters: @@ -82,7 +97,7 @@ paths: /api/add-user: post: tags: - - api + - User API description: add user operationId: ApiController.AddUser parameters: @@ -100,7 +115,7 @@ paths: /api/add-webhook: post: tags: - - api + - Webhook API description: add webhook operationId: ApiController.AddWebhook parameters: @@ -115,12 +130,21 @@ paths: description: The Response object schema: $ref: '#/definitions/controllers.Response' + /api/api/get-human-check: + get: + tags: + - Login API + operationId: ApiController.GetHumancheck + /api/api/reset-email-or-phone: + post: + tags: + - Account API + operationId: ApiController.ResetEmailOrPhone /api/api/send-email: post: tags: - - api - description: This API is not for Casdoor frontend to call, it is for Casdoor - SDKs. + - Service API + description: This API is not for Casdoor frontend to call, it is for Casdoor SDKs. operationId: ApiController.SendEmail parameters: - in: query @@ -147,9 +171,8 @@ paths: /api/api/send-sms: post: tags: - - api - description: This API is not for Casdoor frontend to call, it is for Casdoor - SDKs. + - Service API + description: This API is not for Casdoor frontend to call, it is for Casdoor SDKs. operationId: ApiController.SendSms parameters: - in: query @@ -173,10 +196,25 @@ paths: description: object schema: $ref: '#/definitions/Response' + /api/certs: + get: + tags: + - OIDC API + operationId: RootController.GetOidcCert + /api/check-ldap-users-exist: + post: + tags: + - Account API + operationId: ApiController.CheckLdapUserExist + /api/check-user-password: + post: + tags: + - User API + operationId: ApiController.CheckUserPassword /api/delete-application: post: tags: - - api + - Application API description: delete an application operationId: ApiController.DeleteApplication parameters: @@ -191,10 +229,15 @@ paths: description: The Response object schema: $ref: '#/definitions/controllers.Response' + /api/delete-ldap: + post: + tags: + - Account API + operationId: ApiController.DeleteLdap /api/delete-organization: post: tags: - - api + - Organization API description: delete organization operationId: ApiController.DeleteOrganization parameters: @@ -212,7 +255,7 @@ paths: /api/delete-provider: post: tags: - - api + - Provider API description: delete provider operationId: ApiController.DeleteProvider parameters: @@ -227,10 +270,15 @@ paths: description: The Response object schema: $ref: '#/definitions/controllers.Response' + /api/delete-resource: + post: + tags: + - Resource API + operationId: ApiController.DeleteResource /api/delete-token: post: tags: - - api + - Token API description: delete token operationId: ApiController.DeleteToken parameters: @@ -248,7 +296,7 @@ paths: /api/delete-user: post: tags: - - api + - User API description: delete user operationId: ApiController.DeleteUser parameters: @@ -266,7 +314,7 @@ paths: /api/delete-webhook: post: tags: - - api + - Webhook API description: delete webhook operationId: ApiController.DeleteWebhook parameters: @@ -284,7 +332,7 @@ paths: /api/get-account: get: tags: - - api + - Account API description: get the details of the current account operationId: ApiController.GetAccount responses: @@ -295,7 +343,7 @@ paths: /api/get-application: get: tags: - - api + - Application API description: get the detail of an application operationId: ApiController.GetApplication parameters: @@ -312,7 +360,7 @@ paths: /api/get-applications: get: tags: - - api + - Application API description: get all applications operationId: ApiController.GetApplications parameters: @@ -331,7 +379,7 @@ paths: /api/get-email-and-phone: post: tags: - - api + - User API description: get email and phone by username operationId: ApiController.GetEmailAndPhone parameters: @@ -353,7 +401,7 @@ paths: /api/get-global-users: get: tags: - - api + - User API description: get global users operationId: ApiController.GetGlobalUsers responses: @@ -363,10 +411,25 @@ paths: type: array items: $ref: '#/definitions/object.User' + /api/get-ldap: + post: + tags: + - Account API + operationId: ApiController.GetLdap + /api/get-ldap-user: + post: + tags: + - Account API + operationId: ApiController.GetLdapser + /api/get-ldaps: + post: + tags: + - Account API + operationId: ApiController.GetLdaps /api/get-organization: get: tags: - - api + - Organization API description: get organization operationId: ApiController.GetOrganization parameters: @@ -383,7 +446,7 @@ paths: /api/get-organizations: get: tags: - - api + - Organization API description: get organizations operationId: ApiController.GetOrganizations parameters: @@ -402,7 +465,7 @@ paths: /api/get-provider: get: tags: - - api + - Provider API description: get provider operationId: ApiController.GetProvider parameters: @@ -419,7 +482,7 @@ paths: /api/get-providers: get: tags: - - api + - Provider API description: get providers operationId: ApiController.GetProviders parameters: @@ -438,7 +501,7 @@ paths: /api/get-records: get: tags: - - api + - Record API description: get all records operationId: ApiController.GetRecords parameters: @@ -462,7 +525,7 @@ paths: /api/get-records-filter: post: tags: - - api + - Record API description: get records by filter operationId: ApiController.GetRecordsByFilter parameters: @@ -479,10 +542,48 @@ paths: type: array items: $ref: '#/definitions/object.Records' + /api/get-resource: + get: + tags: + - Resource API + operationId: ApiController.GetResource + /api/get-resources: + get: + tags: + - Resource API + operationId: ApiController.GetResources + /api/get-sorted-users: + get: + tags: + - User API + operationId: ApiController.GetSortedUsers + parameters: + - in: query + name: owner + description: The owner of users + required: true + type: string + - in: query + name: sorter + description: The DB column name to sort by, e.g., created_time + required: true + type: string + - in: query + name: limit + description: The count of users to return, e.g., 25 + required: true + type: string + responses: + "200": + description: The Response object + schema: + type: array + items: + $ref: '#/definitions/object.User' /api/get-token: get: tags: - - api + - Token API description: get token operationId: ApiController.GetToken parameters: @@ -499,7 +600,7 @@ paths: /api/get-tokens: get: tags: - - api + - Token API description: get tokens operationId: ApiController.GetTokens parameters: @@ -528,7 +629,7 @@ paths: /api/get-user: get: tags: - - api + - User API description: get user operationId: ApiController.GetUser parameters: @@ -545,7 +646,7 @@ paths: /api/get-user-application: get: tags: - - api + - Application API description: get the detail of the user's application operationId: ApiController.GetUserApplication parameters: @@ -559,10 +660,29 @@ paths: description: The Response object schema: $ref: '#/definitions/object.Application' + /api/get-user-count: + get: + tags: + - User API + operationId: ApiController.GetUserCount + parameters: + - in: query + name: owner + description: The owner of users + required: true + type: string + - in: query + name: isOnline + description: The filter for query, 1 for online, 0 for offline, empty string for all users + required: true + type: string + responses: + "200": + description: '{int} int The count of filtered users for an organization' /api/get-users: get: tags: - - api + - User API operationId: ApiController.GetUsers parameters: - in: query @@ -580,7 +700,7 @@ paths: /api/get-webhook: get: tags: - - api + - Webhook API description: get webhook operationId: ApiController.GetWebhook parameters: @@ -597,7 +717,7 @@ paths: /api/get-webhooks: get: tags: - - api + - Webhook API description: get webhooks operationId: ApiController.GetWebhooks parameters: @@ -616,7 +736,7 @@ paths: /api/login: post: tags: - - api + - Login API description: login operationId: ApiController.Login parameters: @@ -639,7 +759,7 @@ paths: /api/login/oauth/access_token: post: tags: - - api + - Token API description: get OAuth access token operationId: ApiController.GetOAuthToken parameters: @@ -671,7 +791,7 @@ paths: /api/login/oauth/code: post: tags: - - api + - Token API description: get OAuth code operationId: ApiController.GetOAuthCode parameters: @@ -713,7 +833,7 @@ paths: /api/logout: post: tags: - - api + - Login API description: logout the current user operationId: ApiController.Logout responses: @@ -721,10 +841,15 @@ paths: description: The Response object schema: $ref: '#/definitions/controllers.Response' + /api/send-verification-code: + post: + tags: + - Verification API + operationId: ApiController.SendVerificationCode /api/set-password: post: tags: - - api + - Account API description: set password operationId: ApiController.SetPassword parameters: @@ -756,7 +881,7 @@ paths: /api/signup: post: tags: - - api + - Login API description: sign up a new user operationId: ApiController.Signup parameters: @@ -775,10 +900,19 @@ paths: description: The Response object schema: $ref: '#/definitions/controllers.Response' + /api/sync-ldap-users: + post: + tags: + - Account API + operationId: ApiController.SyncLdapUsers + /api/unlink: + post: + tags: + - Login API /api/update-application: get: tags: - - api + - Login API description: get application login operationId: ApiController.GetApplicationLogin parameters: @@ -814,7 +948,7 @@ paths: $ref: '#/definitions/controllers.api_controller.Response' post: tags: - - api + - Application API description: update an application operationId: ApiController.UpdateApplication parameters: @@ -834,10 +968,15 @@ paths: description: The Response object schema: $ref: '#/definitions/controllers.Response' + /api/update-ldap: + post: + tags: + - Account API + operationId: ApiController.UpdateLdap /api/update-organization: post: tags: - - api + - Organization API description: update organization operationId: ApiController.UpdateOrganization parameters: @@ -860,7 +999,7 @@ paths: /api/update-provider: post: tags: - - api + - Provider API description: update provider operationId: ApiController.UpdateProvider parameters: @@ -880,10 +1019,15 @@ paths: description: The Response object schema: $ref: '#/definitions/controllers.Response' + /api/update-resource: + post: + tags: + - Resource API + operationId: ApiController.UpdateResource /api/update-token: post: tags: - - api + - Token API description: update token operationId: ApiController.UpdateToken parameters: @@ -906,7 +1050,7 @@ paths: /api/update-user: post: tags: - - api + - User API description: update user operationId: ApiController.UpdateUser parameters: @@ -929,7 +1073,7 @@ paths: /api/update-webhook: post: tags: - - api + - Webhook API description: update webhook operationId: ApiController.UpdateWebhook parameters: @@ -949,11 +1093,16 @@ paths: description: The Response object schema: $ref: '#/definitions/controllers.Response' + /api/upload-resource: + post: + tags: + - Resource API + operationId: ApiController.UploadResource definitions: - 1773.0xc000093bf0.false: + 1713.0xc000393f50.false: title: "false" type: object - 1808.0xc000093c20.false: + 1747.0xc000393f80.false: title: "false" type: object RequestForm: @@ -967,9 +1116,9 @@ definitions: type: object properties: data: - $ref: '#/definitions/1773.0xc000093bf0.false' + $ref: '#/definitions/1713.0xc000393f50.false' data2: - $ref: '#/definitions/1808.0xc000093c20.false' + $ref: '#/definitions/1747.0xc000393f80.false' msg: type: string status: @@ -979,9 +1128,9 @@ definitions: type: object properties: data: - $ref: '#/definitions/1773.0xc000093bf0.false' + $ref: '#/definitions/1713.0xc000393f50.false' data2: - $ref: '#/definitions/1808.0xc000093c20.false' + $ref: '#/definitions/1747.0xc000393f80.false' msg: type: string status: @@ -1005,6 +1154,8 @@ definitions: type: string displayName: type: string + enableCodeSignin: + type: boolean enablePassword: type: boolean enableSignUp: @@ -1194,6 +1345,8 @@ definitions: expires_in: type: integer format: int64 + id_token: + type: string scope: type: string token_type: @@ -1212,16 +1365,24 @@ definitions: type: string bio: type: string + birthday: + type: string + createdIp: + type: string createdTime: type: string dingtalk: type: string displayName: type: string + education: + type: string email: type: string facebook: type: string + gender: + type: string gitee: type: string github: @@ -1236,8 +1397,14 @@ definitions: type: string id: type: string + idCard: + type: string + idCardType: + type: string isAdmin: type: boolean + isDefaultAvatar: + type: boolean isDeleted: type: boolean isForbidden: @@ -1250,6 +1417,10 @@ definitions: type: string lark: type: string + lastSigninIp: + type: string + lastSigninTime: + type: string ldap: type: string linkedin: