mirror of
https://github.com/casdoor/casdoor.git
synced 2025-09-08 04:00:51 +08:00
Remove useless "/api/login/oauth/code" API and update Swagger
This commit is contained in:
@@ -124,40 +124,6 @@ func (c *ApiController) DeleteToken() {
|
|||||||
c.ServeJSON()
|
c.ServeJSON()
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetOAuthCode
|
|
||||||
// @Title GetOAuthCode
|
|
||||||
// @Tag Token API
|
|
||||||
// @Description get OAuth code
|
|
||||||
// @Param user_id query string true "The id ( owner/name ) of user"
|
|
||||||
// @Param client_id query string true "OAuth client id"
|
|
||||||
// @Param response_type query string true "OAuth response type"
|
|
||||||
// @Param redirect_uri query string true "OAuth redirect URI"
|
|
||||||
// @Param scope query string true "OAuth scope"
|
|
||||||
// @Param state query string true "OAuth state"
|
|
||||||
// @Success 200 {object} object.TokenWrapper The Response object
|
|
||||||
// @router /login/oauth/code [post]
|
|
||||||
func (c *ApiController) GetOAuthCode() {
|
|
||||||
userId := c.Input().Get("user_id")
|
|
||||||
clientId := c.Input().Get("client_id")
|
|
||||||
responseType := c.Input().Get("response_type")
|
|
||||||
redirectUri := c.Input().Get("redirect_uri")
|
|
||||||
scope := c.Input().Get("scope")
|
|
||||||
state := c.Input().Get("state")
|
|
||||||
nonce := c.Input().Get("nonce")
|
|
||||||
|
|
||||||
challengeMethod := c.Input().Get("code_challenge_method")
|
|
||||||
codeChallenge := c.Input().Get("code_challenge")
|
|
||||||
|
|
||||||
if challengeMethod != "S256" && challengeMethod != "null" && challengeMethod != "" {
|
|
||||||
c.ResponseError(c.T("auth:Challenge method should be S256"))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
host := c.Ctx.Request.Host
|
|
||||||
|
|
||||||
c.Data["json"] = object.GetOAuthCode(userId, clientId, responseType, redirectUri, scope, state, nonce, codeChallenge, host, c.GetAcceptLanguage())
|
|
||||||
c.ServeJSON()
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetOAuthToken
|
// GetOAuthToken
|
||||||
// @Title GetOAuthToken
|
// @Title GetOAuthToken
|
||||||
// @Tag Token API
|
// @Tag Token API
|
||||||
|
@@ -155,7 +155,6 @@ func initAPI() {
|
|||||||
beego.Router("/api/update-token", &controllers.ApiController{}, "POST:UpdateToken")
|
beego.Router("/api/update-token", &controllers.ApiController{}, "POST:UpdateToken")
|
||||||
beego.Router("/api/add-token", &controllers.ApiController{}, "POST:AddToken")
|
beego.Router("/api/add-token", &controllers.ApiController{}, "POST:AddToken")
|
||||||
beego.Router("/api/delete-token", &controllers.ApiController{}, "POST:DeleteToken")
|
beego.Router("/api/delete-token", &controllers.ApiController{}, "POST:DeleteToken")
|
||||||
beego.Router("/api/login/oauth/code", &controllers.ApiController{}, "POST:GetOAuthCode")
|
|
||||||
beego.Router("/api/login/oauth/access_token", &controllers.ApiController{}, "POST:GetOAuthToken")
|
beego.Router("/api/login/oauth/access_token", &controllers.ApiController{}, "POST:GetOAuthToken")
|
||||||
beego.Router("/api/login/oauth/refresh_token", &controllers.ApiController{}, "POST:RefreshToken")
|
beego.Router("/api/login/oauth/refresh_token", &controllers.ApiController{}, "POST:RefreshToken")
|
||||||
beego.Router("/api/login/oauth/introspect", &controllers.ApiController{}, "POST:IntrospectToken")
|
beego.Router("/api/login/oauth/introspect", &controllers.ApiController{}, "POST:IntrospectToken")
|
||||||
|
@@ -99,6 +99,34 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/api/add-chat": {
|
||||||
|
"post": {
|
||||||
|
"tags": [
|
||||||
|
"Chat API"
|
||||||
|
],
|
||||||
|
"description": "add chat",
|
||||||
|
"operationId": "ApiController.AddChat",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"in": "body",
|
||||||
|
"name": "body",
|
||||||
|
"description": "The details of the chat",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/object.Chat"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "The Response object",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/controllers.Response"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"/api/add-ldap": {
|
"/api/add-ldap": {
|
||||||
"post": {
|
"post": {
|
||||||
"tags": [
|
"tags": [
|
||||||
@@ -107,6 +135,34 @@
|
|||||||
"operationId": "ApiController.AddLdap"
|
"operationId": "ApiController.AddLdap"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/api/add-message": {
|
||||||
|
"post": {
|
||||||
|
"tags": [
|
||||||
|
"Message API"
|
||||||
|
],
|
||||||
|
"description": "add message",
|
||||||
|
"operationId": "ApiController.AddMessage",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"in": "body",
|
||||||
|
"name": "body",
|
||||||
|
"description": "The details of the message",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/object.Message"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "The Response object",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/controllers.Response"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"/api/add-model": {
|
"/api/add-model": {
|
||||||
"post": {
|
"post": {
|
||||||
"tags": [
|
"tags": [
|
||||||
@@ -595,6 +651,14 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/api/api/verify-code": {
|
||||||
|
"post": {
|
||||||
|
"tags": [
|
||||||
|
"Account API"
|
||||||
|
],
|
||||||
|
"operationId": "ApiController.VerifyCode"
|
||||||
|
}
|
||||||
|
},
|
||||||
"/api/api/webhook": {
|
"/api/api/webhook": {
|
||||||
"post": {
|
"post": {
|
||||||
"tags": [
|
"tags": [
|
||||||
@@ -700,6 +764,34 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/api/delete-chat": {
|
||||||
|
"post": {
|
||||||
|
"tags": [
|
||||||
|
"Chat API"
|
||||||
|
],
|
||||||
|
"description": "delete chat",
|
||||||
|
"operationId": "ApiController.DeleteChat",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"in": "body",
|
||||||
|
"name": "body",
|
||||||
|
"description": "The details of the chat",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/object.Chat"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "The Response object",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/controllers.Response"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"/api/delete-ldap": {
|
"/api/delete-ldap": {
|
||||||
"post": {
|
"post": {
|
||||||
"tags": [
|
"tags": [
|
||||||
@@ -708,6 +800,34 @@
|
|||||||
"operationId": "ApiController.DeleteLdap"
|
"operationId": "ApiController.DeleteLdap"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/api/delete-message": {
|
||||||
|
"post": {
|
||||||
|
"tags": [
|
||||||
|
"Message API"
|
||||||
|
],
|
||||||
|
"description": "delete message",
|
||||||
|
"operationId": "ApiController.DeleteMessage",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"in": "body",
|
||||||
|
"name": "body",
|
||||||
|
"description": "The details of the message",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/object.Message"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "The Response object",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/controllers.Response"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"/api/delete-model": {
|
"/api/delete-model": {
|
||||||
"post": {
|
"post": {
|
||||||
"tags": [
|
"tags": [
|
||||||
@@ -1234,6 +1354,61 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/api/get-chat": {
|
||||||
|
"get": {
|
||||||
|
"tags": [
|
||||||
|
"Chat API"
|
||||||
|
],
|
||||||
|
"description": "get chat",
|
||||||
|
"operationId": "ApiController.GetChat",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"in": "query",
|
||||||
|
"name": "id",
|
||||||
|
"description": "The id ( owner/name ) of the chat",
|
||||||
|
"required": true,
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "The Response object",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/object.Chat"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/api/get-chats": {
|
||||||
|
"get": {
|
||||||
|
"tags": [
|
||||||
|
"Chat API"
|
||||||
|
],
|
||||||
|
"description": "get chats",
|
||||||
|
"operationId": "ApiController.GetChats",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"in": "query",
|
||||||
|
"name": "owner",
|
||||||
|
"description": "The owner of chats",
|
||||||
|
"required": true,
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "The Response object",
|
||||||
|
"schema": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/definitions/object.Chat"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"/api/get-default-application": {
|
"/api/get-default-application": {
|
||||||
"get": {
|
"get": {
|
||||||
"tags": [
|
"tags": [
|
||||||
@@ -1357,6 +1532,61 @@
|
|||||||
"operationId": "ApiController.GetLdaps"
|
"operationId": "ApiController.GetLdaps"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/api/get-message": {
|
||||||
|
"get": {
|
||||||
|
"tags": [
|
||||||
|
"Message API"
|
||||||
|
],
|
||||||
|
"description": "get message",
|
||||||
|
"operationId": "ApiController.GetMessage",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"in": "query",
|
||||||
|
"name": "id",
|
||||||
|
"description": "The id ( owner/name ) of the message",
|
||||||
|
"required": true,
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "The Response object",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/object.Message"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/api/get-messages": {
|
||||||
|
"get": {
|
||||||
|
"tags": [
|
||||||
|
"Message API"
|
||||||
|
],
|
||||||
|
"description": "get messages",
|
||||||
|
"operationId": "ApiController.GetMessages",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"in": "query",
|
||||||
|
"name": "owner",
|
||||||
|
"description": "The owner of messages",
|
||||||
|
"required": true,
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "The Response object",
|
||||||
|
"schema": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/definitions/object.Message"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"/api/get-model": {
|
"/api/get-model": {
|
||||||
"get": {
|
"get": {
|
||||||
"tags": [
|
"tags": [
|
||||||
@@ -2587,67 +2817,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/api/login/oauth/code": {
|
|
||||||
"post": {
|
|
||||||
"tags": [
|
|
||||||
"Token API"
|
|
||||||
],
|
|
||||||
"description": "get OAuth code",
|
|
||||||
"operationId": "ApiController.GetOAuthCode",
|
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"in": "query",
|
|
||||||
"name": "id",
|
|
||||||
"description": "The id ( owner/name ) of user",
|
|
||||||
"required": true,
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"in": "query",
|
|
||||||
"name": "client_id",
|
|
||||||
"description": "OAuth client id",
|
|
||||||
"required": true,
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"in": "query",
|
|
||||||
"name": "response_type",
|
|
||||||
"description": "OAuth response type",
|
|
||||||
"required": true,
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"in": "query",
|
|
||||||
"name": "redirect_uri",
|
|
||||||
"description": "OAuth redirect URI",
|
|
||||||
"required": true,
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"in": "query",
|
|
||||||
"name": "scope",
|
|
||||||
"description": "OAuth scope",
|
|
||||||
"required": true,
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"in": "query",
|
|
||||||
"name": "state",
|
|
||||||
"description": "OAuth state",
|
|
||||||
"required": true,
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"responses": {
|
|
||||||
"200": {
|
|
||||||
"description": "The Response object",
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/object.TokenWrapper"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"/api/login/oauth/introspect": {
|
"/api/login/oauth/introspect": {
|
||||||
"post": {
|
"post": {
|
||||||
"description": "The introspection endpoint is an OAuth 2.0 endpoint that takes a",
|
"description": "The introspection endpoint is an OAuth 2.0 endpoint that takes a",
|
||||||
@@ -3056,6 +3225,41 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/api/update-chat": {
|
||||||
|
"post": {
|
||||||
|
"tags": [
|
||||||
|
"Chat API"
|
||||||
|
],
|
||||||
|
"description": "update chat",
|
||||||
|
"operationId": "ApiController.UpdateChat",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"in": "query",
|
||||||
|
"name": "id",
|
||||||
|
"description": "The id ( owner/name ) of the chat",
|
||||||
|
"required": true,
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"in": "body",
|
||||||
|
"name": "body",
|
||||||
|
"description": "The details of the chat",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/object.Chat"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "The Response object",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/controllers.Response"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"/api/update-ldap": {
|
"/api/update-ldap": {
|
||||||
"post": {
|
"post": {
|
||||||
"tags": [
|
"tags": [
|
||||||
@@ -3064,6 +3268,41 @@
|
|||||||
"operationId": "ApiController.UpdateLdap"
|
"operationId": "ApiController.UpdateLdap"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/api/update-message": {
|
||||||
|
"post": {
|
||||||
|
"tags": [
|
||||||
|
"Message API"
|
||||||
|
],
|
||||||
|
"description": "update message",
|
||||||
|
"operationId": "ApiController.UpdateMessage",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"in": "query",
|
||||||
|
"name": "id",
|
||||||
|
"description": "The id ( owner/name ) of the message",
|
||||||
|
"required": true,
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"in": "body",
|
||||||
|
"name": "body",
|
||||||
|
"description": "The details of the message",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/object.Message"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "The Response object",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/controllers.Response"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"/api/update-model": {
|
"/api/update-model": {
|
||||||
"post": {
|
"post": {
|
||||||
"tags": [
|
"tags": [
|
||||||
@@ -3644,11 +3883,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"definitions": {
|
"definitions": {
|
||||||
"2306.0xc0003a4480.false": {
|
"2306.0xc0004a1410.false": {
|
||||||
"title": "false",
|
"title": "false",
|
||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
"2340.0xc0003a44b0.false": {
|
"2340.0xc0004a1440.false": {
|
||||||
"title": "false",
|
"title": "false",
|
||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
@@ -3782,10 +4021,10 @@
|
|||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"data": {
|
"data": {
|
||||||
"$ref": "#/definitions/2306.0xc0003a4480.false"
|
"$ref": "#/definitions/2306.0xc0004a1410.false"
|
||||||
},
|
},
|
||||||
"data2": {
|
"data2": {
|
||||||
"$ref": "#/definitions/2340.0xc0003a44b0.false"
|
"$ref": "#/definitions/2340.0xc0004a1440.false"
|
||||||
},
|
},
|
||||||
"msg": {
|
"msg": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
@@ -4047,6 +4286,52 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"object.Chat": {
|
||||||
|
"title": "Chat",
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"category": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"createdTime": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"displayName": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"messageCount": {
|
||||||
|
"type": "integer",
|
||||||
|
"format": "int64"
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"organization": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"owner": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"updatedTime": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"user1": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"user2": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"users": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"object.Header": {
|
"object.Header": {
|
||||||
"title": "Header",
|
"title": "Header",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
@@ -4125,6 +4410,33 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"object.Message": {
|
||||||
|
"title": "Message",
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"author": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"chat": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"createdTime": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"organization": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"owner": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"text": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"object.Model": {
|
"object.Model": {
|
||||||
"title": "Model",
|
"title": "Model",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
@@ -64,11 +64,47 @@ paths:
|
|||||||
description: The Response object
|
description: The Response object
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/controllers.Response'
|
$ref: '#/definitions/controllers.Response'
|
||||||
|
/api/add-chat:
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- Chat API
|
||||||
|
description: add chat
|
||||||
|
operationId: ApiController.AddChat
|
||||||
|
parameters:
|
||||||
|
- in: body
|
||||||
|
name: body
|
||||||
|
description: The details of the chat
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/object.Chat'
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: The Response object
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/controllers.Response'
|
||||||
/api/add-ldap:
|
/api/add-ldap:
|
||||||
post:
|
post:
|
||||||
tags:
|
tags:
|
||||||
- Account API
|
- Account API
|
||||||
operationId: ApiController.AddLdap
|
operationId: ApiController.AddLdap
|
||||||
|
/api/add-message:
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- Message API
|
||||||
|
description: add message
|
||||||
|
operationId: ApiController.AddMessage
|
||||||
|
parameters:
|
||||||
|
- in: body
|
||||||
|
name: body
|
||||||
|
description: The details of the message
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/object.Message'
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: The Response object
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/controllers.Response'
|
||||||
/api/add-model:
|
/api/add-model:
|
||||||
post:
|
post:
|
||||||
tags:
|
tags:
|
||||||
@@ -385,6 +421,11 @@ paths:
|
|||||||
description: object
|
description: object
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/Response'
|
$ref: '#/definitions/Response'
|
||||||
|
/api/api/verify-code:
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- Account API
|
||||||
|
operationId: ApiController.VerifyCode
|
||||||
/api/api/webhook:
|
/api/api/webhook:
|
||||||
post:
|
post:
|
||||||
tags:
|
tags:
|
||||||
@@ -453,11 +494,47 @@ paths:
|
|||||||
description: The Response object
|
description: The Response object
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/controllers.Response'
|
$ref: '#/definitions/controllers.Response'
|
||||||
|
/api/delete-chat:
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- Chat API
|
||||||
|
description: delete chat
|
||||||
|
operationId: ApiController.DeleteChat
|
||||||
|
parameters:
|
||||||
|
- in: body
|
||||||
|
name: body
|
||||||
|
description: The details of the chat
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/object.Chat'
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: The Response object
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/controllers.Response'
|
||||||
/api/delete-ldap:
|
/api/delete-ldap:
|
||||||
post:
|
post:
|
||||||
tags:
|
tags:
|
||||||
- Account API
|
- Account API
|
||||||
operationId: ApiController.DeleteLdap
|
operationId: ApiController.DeleteLdap
|
||||||
|
/api/delete-message:
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- Message API
|
||||||
|
description: delete message
|
||||||
|
operationId: ApiController.DeleteMessage
|
||||||
|
parameters:
|
||||||
|
- in: body
|
||||||
|
name: body
|
||||||
|
description: The details of the message
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/object.Message'
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: The Response object
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/controllers.Response'
|
||||||
/api/delete-model:
|
/api/delete-model:
|
||||||
post:
|
post:
|
||||||
tags:
|
tags:
|
||||||
@@ -800,6 +877,42 @@ paths:
|
|||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/definitions/object.Cert'
|
$ref: '#/definitions/object.Cert'
|
||||||
|
/api/get-chat:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- Chat API
|
||||||
|
description: get chat
|
||||||
|
operationId: ApiController.GetChat
|
||||||
|
parameters:
|
||||||
|
- in: query
|
||||||
|
name: id
|
||||||
|
description: The id ( owner/name ) of the chat
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: The Response object
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/object.Chat'
|
||||||
|
/api/get-chats:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- Chat API
|
||||||
|
description: get chats
|
||||||
|
operationId: ApiController.GetChats
|
||||||
|
parameters:
|
||||||
|
- in: query
|
||||||
|
name: owner
|
||||||
|
description: The owner of chats
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: The Response object
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/definitions/object.Chat'
|
||||||
/api/get-default-application:
|
/api/get-default-application:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
@@ -880,6 +993,42 @@ paths:
|
|||||||
tags:
|
tags:
|
||||||
- Account API
|
- Account API
|
||||||
operationId: ApiController.GetLdaps
|
operationId: ApiController.GetLdaps
|
||||||
|
/api/get-message:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- Message API
|
||||||
|
description: get message
|
||||||
|
operationId: ApiController.GetMessage
|
||||||
|
parameters:
|
||||||
|
- in: query
|
||||||
|
name: id
|
||||||
|
description: The id ( owner/name ) of the message
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: The Response object
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/object.Message'
|
||||||
|
/api/get-messages:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- Message API
|
||||||
|
description: get messages
|
||||||
|
operationId: ApiController.GetMessages
|
||||||
|
parameters:
|
||||||
|
- in: query
|
||||||
|
name: owner
|
||||||
|
description: The owner of messages
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: The Response object
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/definitions/object.Message'
|
||||||
/api/get-model:
|
/api/get-model:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
@@ -1690,48 +1839,6 @@ paths:
|
|||||||
description: The Response object
|
description: The Response object
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/object.TokenError'
|
$ref: '#/definitions/object.TokenError'
|
||||||
/api/login/oauth/code:
|
|
||||||
post:
|
|
||||||
tags:
|
|
||||||
- Token API
|
|
||||||
description: get OAuth code
|
|
||||||
operationId: ApiController.GetOAuthCode
|
|
||||||
parameters:
|
|
||||||
- in: query
|
|
||||||
name: id
|
|
||||||
description: The id ( owner/name ) of user
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
- in: query
|
|
||||||
name: client_id
|
|
||||||
description: OAuth client id
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
- in: query
|
|
||||||
name: response_type
|
|
||||||
description: OAuth response type
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
- in: query
|
|
||||||
name: redirect_uri
|
|
||||||
description: OAuth redirect URI
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
- in: query
|
|
||||||
name: scope
|
|
||||||
description: OAuth scope
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
- in: query
|
|
||||||
name: state
|
|
||||||
description: OAuth state
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: The Response object
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/object.TokenWrapper'
|
|
||||||
/api/login/oauth/introspect:
|
/api/login/oauth/introspect:
|
||||||
post:
|
post:
|
||||||
description: The introspection endpoint is an OAuth 2.0 endpoint that takes a
|
description: The introspection endpoint is an OAuth 2.0 endpoint that takes a
|
||||||
@@ -2001,11 +2108,57 @@ paths:
|
|||||||
description: The Response object
|
description: The Response object
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/controllers.Response'
|
$ref: '#/definitions/controllers.Response'
|
||||||
|
/api/update-chat:
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- Chat API
|
||||||
|
description: update chat
|
||||||
|
operationId: ApiController.UpdateChat
|
||||||
|
parameters:
|
||||||
|
- in: query
|
||||||
|
name: id
|
||||||
|
description: The id ( owner/name ) of the chat
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
- in: body
|
||||||
|
name: body
|
||||||
|
description: The details of the chat
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/object.Chat'
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: The Response object
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/controllers.Response'
|
||||||
/api/update-ldap:
|
/api/update-ldap:
|
||||||
post:
|
post:
|
||||||
tags:
|
tags:
|
||||||
- Account API
|
- Account API
|
||||||
operationId: ApiController.UpdateLdap
|
operationId: ApiController.UpdateLdap
|
||||||
|
/api/update-message:
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- Message API
|
||||||
|
description: update message
|
||||||
|
operationId: ApiController.UpdateMessage
|
||||||
|
parameters:
|
||||||
|
- in: query
|
||||||
|
name: id
|
||||||
|
description: The id ( owner/name ) of the message
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
- in: body
|
||||||
|
name: body
|
||||||
|
description: The details of the message
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/object.Message'
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: The Response object
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/controllers.Response'
|
||||||
/api/update-model:
|
/api/update-model:
|
||||||
post:
|
post:
|
||||||
tags:
|
tags:
|
||||||
@@ -2385,10 +2538,10 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/Response'
|
$ref: '#/definitions/Response'
|
||||||
definitions:
|
definitions:
|
||||||
2306.0xc0003a4480.false:
|
2306.0xc0004a1410.false:
|
||||||
title: "false"
|
title: "false"
|
||||||
type: object
|
type: object
|
||||||
2340.0xc0003a44b0.false:
|
2340.0xc0004a1440.false:
|
||||||
title: "false"
|
title: "false"
|
||||||
type: object
|
type: object
|
||||||
LaravelResponse:
|
LaravelResponse:
|
||||||
@@ -2480,9 +2633,9 @@ definitions:
|
|||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
data:
|
data:
|
||||||
$ref: '#/definitions/2306.0xc0003a4480.false'
|
$ref: '#/definitions/2306.0xc0004a1410.false'
|
||||||
data2:
|
data2:
|
||||||
$ref: '#/definitions/2340.0xc0003a44b0.false'
|
$ref: '#/definitions/2340.0xc0004a1440.false'
|
||||||
msg:
|
msg:
|
||||||
type: string
|
type: string
|
||||||
name:
|
name:
|
||||||
@@ -2657,6 +2810,37 @@ definitions:
|
|||||||
type: string
|
type: string
|
||||||
type:
|
type:
|
||||||
type: string
|
type: string
|
||||||
|
object.Chat:
|
||||||
|
title: Chat
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
category:
|
||||||
|
type: string
|
||||||
|
createdTime:
|
||||||
|
type: string
|
||||||
|
displayName:
|
||||||
|
type: string
|
||||||
|
messageCount:
|
||||||
|
type: integer
|
||||||
|
format: int64
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
organization:
|
||||||
|
type: string
|
||||||
|
owner:
|
||||||
|
type: string
|
||||||
|
type:
|
||||||
|
type: string
|
||||||
|
updatedTime:
|
||||||
|
type: string
|
||||||
|
user1:
|
||||||
|
type: string
|
||||||
|
user2:
|
||||||
|
type: string
|
||||||
|
users:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
object.Header:
|
object.Header:
|
||||||
title: Header
|
title: Header
|
||||||
type: object
|
type: object
|
||||||
@@ -2710,6 +2894,24 @@ definitions:
|
|||||||
type: string
|
type: string
|
||||||
username:
|
username:
|
||||||
type: string
|
type: string
|
||||||
|
object.Message:
|
||||||
|
title: Message
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
author:
|
||||||
|
type: string
|
||||||
|
chat:
|
||||||
|
type: string
|
||||||
|
createdTime:
|
||||||
|
type: string
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
organization:
|
||||||
|
type: string
|
||||||
|
owner:
|
||||||
|
type: string
|
||||||
|
text:
|
||||||
|
type: string
|
||||||
object.Model:
|
object.Model:
|
||||||
title: Model
|
title: Model
|
||||||
type: object
|
type: object
|
||||||
|
Reference in New Issue
Block a user