mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-23 10:45:47 +08:00
fix: provide detailed description of ldap in swagger (#2094)
* provide detailed description of ldap in swagger * modify the directory of swagger fix: provide detailed description of ldap in swagger
This commit is contained in:
parent
7bfb74ba18
commit
f923a8f0d7
@ -38,8 +38,11 @@ type LdapSyncResp struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// GetLdapUsers
|
// GetLdapUsers
|
||||||
// @Tag Account API
|
|
||||||
// @Title GetLdapser
|
// @Title GetLdapser
|
||||||
|
// @Tag Account API
|
||||||
|
// @Description get ldap users
|
||||||
|
// Param id string true "id"
|
||||||
|
// @Success 200 {object} LdapResp The Response object
|
||||||
// @router /get-ldap-users [get]
|
// @router /get-ldap-users [get]
|
||||||
func (c *ApiController) GetLdapUsers() {
|
func (c *ApiController) GetLdapUsers() {
|
||||||
id := c.Input().Get("id")
|
id := c.Input().Get("id")
|
||||||
@ -94,8 +97,11 @@ func (c *ApiController) GetLdapUsers() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// GetLdaps
|
// GetLdaps
|
||||||
// @Tag Account API
|
|
||||||
// @Title GetLdaps
|
// @Title GetLdaps
|
||||||
|
// @Tag Account API
|
||||||
|
// @Description get ldaps
|
||||||
|
// @Param owner query string false "owner"
|
||||||
|
// @Success 200 {array} object.Ldap The Response object
|
||||||
// @router /get-ldaps [get]
|
// @router /get-ldaps [get]
|
||||||
func (c *ApiController) GetLdaps() {
|
func (c *ApiController) GetLdaps() {
|
||||||
owner := c.Input().Get("owner")
|
owner := c.Input().Get("owner")
|
||||||
@ -104,8 +110,11 @@ func (c *ApiController) GetLdaps() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// GetLdap
|
// GetLdap
|
||||||
// @Tag Account API
|
|
||||||
// @Title GetLdap
|
// @Title GetLdap
|
||||||
|
// @Tag Account API
|
||||||
|
// @Description get ldap
|
||||||
|
// @Param id query string true "id"
|
||||||
|
// @Success 200 {object} object.Ldap The Response object
|
||||||
// @router /get-ldap [get]
|
// @router /get-ldap [get]
|
||||||
func (c *ApiController) GetLdap() {
|
func (c *ApiController) GetLdap() {
|
||||||
id := c.Input().Get("id")
|
id := c.Input().Get("id")
|
||||||
@ -120,8 +129,11 @@ func (c *ApiController) GetLdap() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// AddLdap
|
// AddLdap
|
||||||
// @Tag Account API
|
|
||||||
// @Title AddLdap
|
// @Title AddLdap
|
||||||
|
// @Tag Account API
|
||||||
|
// @Description add ldap
|
||||||
|
// @Param body body object.Ldap true "The details of the ldap"
|
||||||
|
// @Success 200 {object} controllers.Response The Response object
|
||||||
// @router /add-ldap [post]
|
// @router /add-ldap [post]
|
||||||
func (c *ApiController) AddLdap() {
|
func (c *ApiController) AddLdap() {
|
||||||
var ldap object.Ldap
|
var ldap object.Ldap
|
||||||
@ -160,8 +172,11 @@ func (c *ApiController) AddLdap() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// UpdateLdap
|
// UpdateLdap
|
||||||
// @Tag Account API
|
|
||||||
// @Title UpdateLdap
|
// @Title UpdateLdap
|
||||||
|
// @Tag Account API
|
||||||
|
// @Description update ldap
|
||||||
|
// @Param body body object.Ldap true "The details of the ldap"
|
||||||
|
// @Success 200 {object} controllers.Response The Response object
|
||||||
// @router /update-ldap [post]
|
// @router /update-ldap [post]
|
||||||
func (c *ApiController) UpdateLdap() {
|
func (c *ApiController) UpdateLdap() {
|
||||||
var ldap object.Ldap
|
var ldap object.Ldap
|
||||||
@ -198,8 +213,11 @@ func (c *ApiController) UpdateLdap() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// DeleteLdap
|
// DeleteLdap
|
||||||
// @Tag Account API
|
|
||||||
// @Title DeleteLdap
|
// @Title DeleteLdap
|
||||||
|
// @Tag Account API
|
||||||
|
// @Description delete ldap
|
||||||
|
// @Param body body object.Ldap true "The details of the ldap"
|
||||||
|
// @Success 200 {object} controllers.Response The Response object
|
||||||
// @router /delete-ldap [post]
|
// @router /delete-ldap [post]
|
||||||
func (c *ApiController) DeleteLdap() {
|
func (c *ApiController) DeleteLdap() {
|
||||||
var ldap object.Ldap
|
var ldap object.Ldap
|
||||||
@ -222,8 +240,11 @@ func (c *ApiController) DeleteLdap() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// SyncLdapUsers
|
// SyncLdapUsers
|
||||||
// @Tag Account API
|
|
||||||
// @Title SyncLdapUsers
|
// @Title SyncLdapUsers
|
||||||
|
// @Tag Account API
|
||||||
|
// @Description sync ldap users
|
||||||
|
// @Param id query string true "id"
|
||||||
|
// @Success 200 {object} LdapSyncResp The Response object
|
||||||
// @router /sync-ldap-users [post]
|
// @router /sync-ldap-users [post]
|
||||||
func (c *ApiController) SyncLdapUsers() {
|
func (c *ApiController) SyncLdapUsers() {
|
||||||
id := c.Input().Get("id")
|
id := c.Input().Get("id")
|
||||||
|
@ -188,7 +188,27 @@
|
|||||||
"tags": [
|
"tags": [
|
||||||
"Account API"
|
"Account API"
|
||||||
],
|
],
|
||||||
"operationId": "ApiController.AddLdap"
|
"description": "add ldap",
|
||||||
|
"operationId": "ApiController.AddLdap",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"in": "body",
|
||||||
|
"name": "body",
|
||||||
|
"description": "The details of the ldap",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/object.Ldap"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "The Response object",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/controllers.Response"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/api/add-message": {
|
"/api/add-message": {
|
||||||
@ -1086,7 +1106,27 @@
|
|||||||
"tags": [
|
"tags": [
|
||||||
"Account API"
|
"Account API"
|
||||||
],
|
],
|
||||||
"operationId": "ApiController.DeleteLdap"
|
"description": "delete ldap",
|
||||||
|
"operationId": "ApiController.DeleteLdap",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"in": "body",
|
||||||
|
"name": "body",
|
||||||
|
"description": "The details of the ldap",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/object.Ldap"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "The Response object",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/controllers.Response"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/api/delete-message": {
|
"/api/delete-message": {
|
||||||
@ -2098,7 +2138,25 @@
|
|||||||
"tags": [
|
"tags": [
|
||||||
"Account API"
|
"Account API"
|
||||||
],
|
],
|
||||||
"operationId": "ApiController.GetLdap"
|
"description": "get ldap",
|
||||||
|
"operationId": "ApiController.GetLdap",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"in": "query",
|
||||||
|
"name": "id",
|
||||||
|
"description": "id",
|
||||||
|
"required": true,
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "The Response object",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/object.Ldap"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/api/get-ldap-users": {
|
"/api/get-ldap-users": {
|
||||||
@ -2106,7 +2164,16 @@
|
|||||||
"tags": [
|
"tags": [
|
||||||
"Account API"
|
"Account API"
|
||||||
],
|
],
|
||||||
"operationId": "ApiController.GetLdapser"
|
"description": "get ldap users",
|
||||||
|
"operationId": "ApiController.GetLdapser",
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "The Response object",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/LdapResp"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/api/get-ldaps": {
|
"/api/get-ldaps": {
|
||||||
@ -2114,7 +2181,27 @@
|
|||||||
"tags": [
|
"tags": [
|
||||||
"Account API"
|
"Account API"
|
||||||
],
|
],
|
||||||
"operationId": "ApiController.GetLdaps"
|
"description": "get ldaps",
|
||||||
|
"operationId": "ApiController.GetLdaps",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"in": "query",
|
||||||
|
"name": "owner",
|
||||||
|
"description": "owner",
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "The Response object",
|
||||||
|
"schema": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/definitions/object.Ldap"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/api/get-message": {
|
"/api/get-message": {
|
||||||
@ -4139,7 +4226,25 @@
|
|||||||
"tags": [
|
"tags": [
|
||||||
"Account API"
|
"Account API"
|
||||||
],
|
],
|
||||||
"operationId": "ApiController.SyncLdapUsers"
|
"description": "sync ldap users",
|
||||||
|
"operationId": "ApiController.SyncLdapUsers",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"in": "query",
|
||||||
|
"name": "id",
|
||||||
|
"description": "id",
|
||||||
|
"required": true,
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "The Response object",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/LdapSyncResp"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/api/unlink": {
|
"/api/unlink": {
|
||||||
@ -4329,7 +4434,27 @@
|
|||||||
"tags": [
|
"tags": [
|
||||||
"Account API"
|
"Account API"
|
||||||
],
|
],
|
||||||
"operationId": "ApiController.UpdateLdap"
|
"description": "update ldap",
|
||||||
|
"operationId": "ApiController.UpdateLdap",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"in": "body",
|
||||||
|
"name": "body",
|
||||||
|
"description": "The details of the ldap",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/object.Ldap"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "The Response object",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/controllers.Response"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/api/update-message": {
|
"/api/update-message": {
|
||||||
@ -5152,6 +5277,14 @@
|
|||||||
"title": "LaravelResponse",
|
"title": "LaravelResponse",
|
||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
|
"LdapResp": {
|
||||||
|
"title": "LdapResp",
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
|
"LdapSyncResp": {
|
||||||
|
"title": "LdapSyncResp",
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
"Response": {
|
"Response": {
|
||||||
"title": "Response",
|
"title": "Response",
|
||||||
"type": "object"
|
"type": "object"
|
||||||
@ -5681,6 +5814,59 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"object.Ldap": {
|
||||||
|
"title": "Ldap",
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"autoSync": {
|
||||||
|
"type": "integer",
|
||||||
|
"format": "int64"
|
||||||
|
},
|
||||||
|
"baseDn": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"createdTime": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"enableSsl": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"filter": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"filterFields": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"host": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"id": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"lastSync": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"owner": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"password": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"port": {
|
||||||
|
"type": "integer",
|
||||||
|
"format": "int64"
|
||||||
|
},
|
||||||
|
"serverName": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"username": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"object.ManagedAccount": {
|
"object.ManagedAccount": {
|
||||||
"title": "ManagedAccount",
|
"title": "ManagedAccount",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
@ -122,7 +122,20 @@ paths:
|
|||||||
post:
|
post:
|
||||||
tags:
|
tags:
|
||||||
- Account API
|
- Account API
|
||||||
|
description: add ldap
|
||||||
operationId: ApiController.AddLdap
|
operationId: ApiController.AddLdap
|
||||||
|
parameters:
|
||||||
|
- in: body
|
||||||
|
name: body
|
||||||
|
description: The details of the ldap
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/object.Ldap'
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: The Response object
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/controllers.Response'
|
||||||
/api/add-message:
|
/api/add-message:
|
||||||
post:
|
post:
|
||||||
tags:
|
tags:
|
||||||
@ -702,7 +715,20 @@ paths:
|
|||||||
post:
|
post:
|
||||||
tags:
|
tags:
|
||||||
- Account API
|
- Account API
|
||||||
|
description: delete ldap
|
||||||
operationId: ApiController.DeleteLdap
|
operationId: ApiController.DeleteLdap
|
||||||
|
parameters:
|
||||||
|
- in: body
|
||||||
|
name: body
|
||||||
|
description: The details of the ldap
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/object.Ldap'
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: The Response object
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/controllers.Response'
|
||||||
/api/delete-message:
|
/api/delete-message:
|
||||||
post:
|
post:
|
||||||
tags:
|
tags:
|
||||||
@ -1360,17 +1386,48 @@ paths:
|
|||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
- Account API
|
- Account API
|
||||||
|
description: get ldap
|
||||||
operationId: ApiController.GetLdap
|
operationId: ApiController.GetLdap
|
||||||
|
parameters:
|
||||||
|
- in: query
|
||||||
|
name: id
|
||||||
|
description: id
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: The Response object
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/object.Ldap'
|
||||||
/api/get-ldap-users:
|
/api/get-ldap-users:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
- Account API
|
- Account API
|
||||||
|
description: get ldap users
|
||||||
operationId: ApiController.GetLdapser
|
operationId: ApiController.GetLdapser
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: The Response object
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/LdapResp'
|
||||||
/api/get-ldaps:
|
/api/get-ldaps:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
- Account API
|
- Account API
|
||||||
|
description: get ldaps
|
||||||
operationId: ApiController.GetLdaps
|
operationId: ApiController.GetLdaps
|
||||||
|
parameters:
|
||||||
|
- in: query
|
||||||
|
name: owner
|
||||||
|
description: owner
|
||||||
|
type: string
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: The Response object
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/definitions/object.Ldap'
|
||||||
/api/get-message:
|
/api/get-message:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
@ -2703,7 +2760,19 @@ paths:
|
|||||||
post:
|
post:
|
||||||
tags:
|
tags:
|
||||||
- Account API
|
- Account API
|
||||||
|
description: sync ldap users
|
||||||
operationId: ApiController.SyncLdapUsers
|
operationId: ApiController.SyncLdapUsers
|
||||||
|
parameters:
|
||||||
|
- in: query
|
||||||
|
name: id
|
||||||
|
description: id
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: The Response object
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/LdapSyncResp'
|
||||||
/api/unlink:
|
/api/unlink:
|
||||||
post:
|
post:
|
||||||
tags:
|
tags:
|
||||||
@ -2827,7 +2896,20 @@ paths:
|
|||||||
post:
|
post:
|
||||||
tags:
|
tags:
|
||||||
- Account API
|
- Account API
|
||||||
|
description: update ldap
|
||||||
operationId: ApiController.UpdateLdap
|
operationId: ApiController.UpdateLdap
|
||||||
|
parameters:
|
||||||
|
- in: body
|
||||||
|
name: body
|
||||||
|
description: The details of the ldap
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/object.Ldap'
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: The Response object
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/controllers.Response'
|
||||||
/api/update-message:
|
/api/update-message:
|
||||||
post:
|
post:
|
||||||
tags:
|
tags:
|
||||||
@ -3367,6 +3449,12 @@ definitions:
|
|||||||
LaravelResponse:
|
LaravelResponse:
|
||||||
title: LaravelResponse
|
title: LaravelResponse
|
||||||
type: object
|
type: object
|
||||||
|
LdapResp:
|
||||||
|
title: LdapResp
|
||||||
|
type: object
|
||||||
|
LdapSyncResp:
|
||||||
|
title: LdapSyncResp
|
||||||
|
type: object
|
||||||
Response:
|
Response:
|
||||||
title: Response
|
title: Response
|
||||||
type: object
|
type: object
|
||||||
@ -3725,6 +3813,42 @@ definitions:
|
|||||||
type: string
|
type: string
|
||||||
username:
|
username:
|
||||||
type: string
|
type: string
|
||||||
|
object.Ldap:
|
||||||
|
title: Ldap
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
autoSync:
|
||||||
|
type: integer
|
||||||
|
format: int64
|
||||||
|
baseDn:
|
||||||
|
type: string
|
||||||
|
createdTime:
|
||||||
|
type: string
|
||||||
|
enableSsl:
|
||||||
|
type: boolean
|
||||||
|
filter:
|
||||||
|
type: string
|
||||||
|
filterFields:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
host:
|
||||||
|
type: string
|
||||||
|
id:
|
||||||
|
type: string
|
||||||
|
lastSync:
|
||||||
|
type: string
|
||||||
|
owner:
|
||||||
|
type: string
|
||||||
|
password:
|
||||||
|
type: string
|
||||||
|
port:
|
||||||
|
type: integer
|
||||||
|
format: int64
|
||||||
|
serverName:
|
||||||
|
type: string
|
||||||
|
username:
|
||||||
|
type: string
|
||||||
object.ManagedAccount:
|
object.ManagedAccount:
|
||||||
title: ManagedAccount
|
title: ManagedAccount
|
||||||
type: object
|
type: object
|
||||||
|
Loading…
x
Reference in New Issue
Block a user