fix: fix Swagger docs page (#2025)

Signed-off-by: baihhh <2542274498@qq.com>
This commit is contained in:
Baihhh
2023-06-30 00:48:39 +08:00
committed by GitHub
parent 807aea5ec7
commit 91cb5f393a
7 changed files with 744 additions and 94 deletions

View File

@ -28,6 +28,24 @@ paths:
description: ""
schema:
$ref: '#/definitions/object.OidcDiscovery'
/api/add-adapter:
post:
tags:
- Adapter API
description: add adapter
operationId: ApiController.AddCasbinAdapter
parameters:
- in: body
name: body
description: The details of the adapter
required: true
schema:
$ref: '#/definitions/object.Adapter'
responses:
"200":
description: The Response object
schema:
$ref: '#/definitions/controllers.Response'
/api/add-application:
post:
tags:
@ -82,6 +100,24 @@ paths:
description: The Response object
schema:
$ref: '#/definitions/controllers.Response'
/api/add-group:
post:
tags:
- Group API
description: add group
operationId: ApiController.AddGroup
parameters:
- in: body
name: body
description: The details of the group
required: true
schema:
$ref: '#/definitions/object.Group'
responses:
"200":
description: The Response object
schema:
$ref: '#/definitions/controllers.Response'
/api/add-ldap:
post:
tags:
@ -386,6 +422,11 @@ paths:
description: The Response object
schema:
$ref: '#/definitions/controllers.Response'
/api/add-user-keys:
post:
tags:
- User API
operationId: ApiController.AddUserkeys
/api/add-webhook:
post:
tags:
@ -506,12 +547,12 @@ paths:
post:
tags:
- Enforce API
description: perform enforce
description: Call Casbin BatchEnforce API
operationId: ApiController.BatchEnforce
parameters:
- in: body
name: body
description: casbin request array
description: array of casbin requests
required: true
schema:
$ref: '#/definitions/object.CasbinRequest'
@ -555,6 +596,24 @@ paths:
tags:
- User API
operationId: ApiController.CheckUserPassword
/api/delete-adapter:
post:
tags:
- Adapter API
description: delete adapter
operationId: ApiController.DeleteCasbinAdapter
parameters:
- in: body
name: body
description: The details of the adapter
required: true
schema:
$ref: '#/definitions/object.Adapter'
responses:
"200":
description: The Response object
schema:
$ref: '#/definitions/controllers.Response'
/api/delete-application:
post:
tags:
@ -609,6 +668,24 @@ paths:
description: The Response object
schema:
$ref: '#/definitions/controllers.Response'
/api/delete-group:
post:
tags:
- Group API
description: delete group
operationId: ApiController.DeleteGroup
parameters:
- in: body
name: body
description: The details of the group
required: true
schema:
$ref: '#/definitions/object.Group'
responses:
"200":
description: The Response object
schema:
$ref: '#/definitions/controllers.Response'
/api/delete-ldap:
post:
tags:
@ -923,12 +1000,12 @@ paths:
post:
tags:
- Enforce API
description: perform enforce
description: Call Casbin Enforce API
operationId: ApiController.Enforce
parameters:
- in: body
name: body
description: casbin request
description: Casbin request
required: true
schema:
$ref: '#/definitions/object.CasbinRequest'
@ -960,6 +1037,42 @@ paths:
description: The Response object
schema:
$ref: '#/definitions/controllers.Response'
/api/get-adapter:
get:
tags:
- Adapter API
description: get adapter
operationId: ApiController.GetCasbinAdapter
parameters:
- in: query
name: id
description: The id ( owner/name ) of the adapter
required: true
type: string
responses:
"200":
description: The Response object
schema:
$ref: '#/definitions/object.Adapter'
/api/get-adapters:
get:
tags:
- Adapter API
description: get adapters
operationId: ApiController.GetCasbinAdapters
parameters:
- in: query
name: owner
description: The owner of adapters
required: true
type: string
responses:
"200":
description: The Response object
schema:
type: array
items:
$ref: '#/definitions/object.Adapter'
/api/get-app-login:
get:
tags:
@ -1183,6 +1296,42 @@ paths:
type: array
items:
$ref: '#/definitions/object.Cert'
/api/get-group:
get:
tags:
- Group API
description: get group
operationId: ApiController.GetGroup
parameters:
- in: query
name: id
description: The id ( owner/name ) of the group
required: true
type: string
responses:
"200":
description: The Response object
schema:
$ref: '#/definitions/object.Group'
/api/get-groups:
get:
tags:
- Group API
description: get groups
operationId: ApiController.GetGroups
parameters:
- in: query
name: owner
description: The owner of groups
required: true
type: string
responses:
"200":
description: The Response object
schema:
type: array
items:
$ref: '#/definitions/object.Group'
/api/get-ldap:
get:
tags:
@ -1327,7 +1476,7 @@ paths:
get:
tags:
- Organization API
description: get all organization names
description: get all organization name and displayName
operationId: ApiController.GetOrganizationNames
parameters:
- in: query
@ -1521,7 +1670,7 @@ paths:
"200":
description: The Response object
schema:
$ref: '#/definitions/object.pricing'
$ref: '#/definitions/object.Pricing'
/api/get-pricings:
get:
tags:
@ -1793,7 +1942,7 @@ paths:
"200":
description: The Response object
schema:
$ref: '#/definitions/object.subscription'
$ref: '#/definitions/object.Subscription'
/api/get-subscriptions:
get:
tags:
@ -2172,7 +2321,7 @@ paths:
"200":
description: The Response object
schema:
$ref: '#/definitions/Response'
$ref: '#/definitions/controllers.Response'
/api/login/oauth/access_token:
post:
tags:
@ -2351,9 +2500,9 @@ paths:
operationId: ApiController.MfaSetupInitiate
responses:
"200":
description: Response object
description: The Response object
schema:
$ref: '#/definitions/The'
$ref: '#/definitions/controllers.Response'
/api/mfa/setup/verify:
post:
tags:
@ -2480,6 +2629,29 @@ paths:
post:
tags:
- Login API
/api/update-adapter:
post:
tags:
- Adapter API
description: update adapter
operationId: ApiController.UpdateCasbinAdapter
parameters:
- in: query
name: id
description: The id ( owner/name ) of the adapter
required: true
type: string
- in: body
name: body
description: The details of the adapter
required: true
schema:
$ref: '#/definitions/object.Adapter'
responses:
"200":
description: The Response object
schema:
$ref: '#/definitions/controllers.Response'
/api/update-application:
post:
tags:
@ -2549,6 +2721,29 @@ paths:
description: The Response object
schema:
$ref: '#/definitions/controllers.Response'
/api/update-group:
post:
tags:
- Group API
description: update group
operationId: ApiController.UpdateGroup
parameters:
- in: query
name: id
description: The id ( owner/name ) of the group
required: true
type: string
- in: body
name: body
description: The details of the group
required: true
schema:
$ref: '#/definitions/object.Group'
responses:
"200":
description: The Response object
schema:
$ref: '#/definitions/controllers.Response'
/api/update-ldap:
post:
tags:
@ -2994,7 +3189,7 @@ paths:
"200":
description: '"The Response object"'
schema:
$ref: '#/definitions/Response'
$ref: '#/definitions/controllers.Response'
/api/webauthn/signup/begin:
get:
tags:
@ -3023,23 +3218,14 @@ paths:
"200":
description: '"The Response object"'
schema:
$ref: '#/definitions/Response'
$ref: '#/definitions/controllers.Response'
definitions:
1225.0xc0002e2ae0.false:
title: "false"
type: object
1260.0xc0002e2b10.false:
title: "false"
type: object
LaravelResponse:
title: LaravelResponse
type: object
Response:
title: Response
type: object
The:
title: The
type: object
controllers.AuthForm:
title: AuthForm
type: object
@ -3064,9 +3250,13 @@ definitions:
type: object
properties:
data:
$ref: '#/definitions/1225.0xc0002e2ae0.false'
additionalProperties:
description: support string | class | List<class> and os on
type: string
data2:
$ref: '#/definitions/1260.0xc0002e2b10.false'
additionalProperties:
description: support string | class | List<class> and os on
type: string
msg:
type: string
name:
@ -3090,8 +3280,8 @@ definitions:
jose.JSONWebKey:
title: JSONWebKey
type: object
object.&{179844 0xc000a02f90 false}:
title: '&{179844 0xc000a02f90 false}'
object:
title: object
type: object
object.AccountItem:
title: AccountItem
@ -3220,7 +3410,7 @@ definitions:
title: CasbinRequest
type: array
items:
$ref: '#/definitions/object.&{179844 0xc000a02f90 false}'
$ref: '#/definitions/object.CasbinRequest'
object.Cert:
title: Cert
type: object
@ -3295,6 +3485,44 @@ definitions:
throughput:
type: number
format: double
object.Group:
title: Group
type: object
properties:
children:
type: array
items:
$ref: '#/definitions/object.Group'
contactEmail:
type: string
createdTime:
type: string
displayName:
type: string
isEnabled:
type: boolean
isTopGroup:
type: boolean
key:
type: string
manager:
type: string
name:
type: string
owner:
type: string
parentId:
type: string
title:
type: string
type:
type: string
updatedTime:
type: string
users:
type: array
items:
$ref: '#/definitions/object.User'
object.Header:
title: Header
type: object
@ -3395,18 +3623,18 @@ definitions:
properties:
countryCode:
type: string
id:
type: string
enabled:
type: boolean
isPreferred:
type: boolean
mfaType:
type: string
recoveryCodes:
type: array
items:
type: string
secret:
type: string
type:
type: string
url:
type: string
object.Model:
@ -3415,6 +3643,8 @@ definitions:
properties:
createdTime:
type: string
description:
type: string
displayName:
type: string
isEnabled:
@ -3520,6 +3750,10 @@ definitions:
type: string
owner:
type: string
passwordOptions:
type: array
items:
type: string
passwordSalt:
type: string
passwordType:
@ -3607,6 +3841,8 @@ definitions:
type: string
createdTime:
type: string
description:
type: string
displayName:
type: string
domains:
@ -3687,8 +3923,6 @@ definitions:
type: string
displayName:
type: string
hasTrial:
type: boolean
isEnabled:
type: boolean
name:
@ -3904,6 +4138,8 @@ definitions:
properties:
createdTime:
type: string
description:
type: string
displayName:
type: string
domains:
@ -3995,6 +4231,8 @@ definitions:
type: string
isEnabled:
type: boolean
isReadOnly:
type: boolean
name:
type: string
organization:
@ -4117,6 +4355,10 @@ definitions:
title: User
type: object
properties:
accessKey:
type: string
accessSecret:
type: string
address:
type: array
items:
@ -4135,6 +4377,8 @@ definitions:
type: string
avatar:
type: string
avatarType:
type: string
azuread:
type: string
baidu:
@ -4205,6 +4449,10 @@ definitions:
type: string
google:
type: string
groups:
type: array
items:
type: string
hash:
type: string
heroku:
@ -4272,6 +4520,10 @@ definitions:
$ref: '#/definitions/object.ManagedAccount'
meetup:
type: string
mfaEmailEnabled:
type: boolean
mfaPhoneEnabled:
type: boolean
microsoftonline:
type: string
multiFactorAuths:
@ -4312,6 +4564,8 @@ definitions:
type: string
preHash:
type: string
preferredMfaType:
type: string
properties:
additionalProperties:
type: string
@ -4320,6 +4574,10 @@ definitions:
ranking:
type: integer
format: int64
recoveryCodes:
type: array
items:
type: string
region:
type: string
roles:
@ -4356,6 +4614,8 @@ definitions:
type: string
title:
type: string
totpSecret:
type: string
tumblr:
type: string
twitch:
@ -4404,12 +4664,14 @@ definitions:
type: string
email:
type: string
groups:
type: array
items:
type: string
iss:
type: string
name:
type: string
organization:
type: string
phone:
type: string
picture:
@ -4448,12 +4710,6 @@ definitions:
type: string
url:
type: string
object.pricing:
title: pricing
type: object
object.subscription:
title: subscription
type: object
protocol.CredentialAssertion:
title: CredentialAssertion
type: object