feat: fix comment and configs for successfully generating OpenAPI typescript-axios sdk (#2560)

* fix: fix swagger.json, successfully generate java sdk

* fix:fix comment and change some content for successfully generating typescript-axios sdk
This commit is contained in:
xiao-kong-long
2023-12-29 15:12:40 +08:00
committed by GitHub
parent c4819602ec
commit e7c015f288
12 changed files with 338 additions and 150 deletions

View File

@ -811,9 +811,9 @@
],
"responses": {
"200": {
"description": "object",
"description": "The Response object",
"schema": {
"$ref": "#/definitions/Response"
"$ref": "#/definitions/controllers.Response"
}
}
}
@ -839,9 +839,9 @@
],
"responses": {
"200": {
"description": "object",
"description": "The Response object",
"schema": {
"$ref": "#/definitions/Response"
"$ref": "#/definitions/controllers.Response"
}
}
}
@ -881,9 +881,9 @@
],
"responses": {
"200": {
"description": "object",
"description": "The Response object",
"schema": {
"$ref": "#/definitions/Response"
"$ref": "#/definitions/controllers.Response"
}
}
}
@ -935,7 +935,10 @@
"description": "array of casbin requests",
"required": true,
"schema": {
"$ref": "#/definitions/object.CasbinRequest"
"type": "array",
"items": {
"type": "string"
}
}
},
{
@ -1108,7 +1111,7 @@
"description": "The enforcer object",
"required": true,
"schema": {
"$ref": "#/definitions/object.Enforce"
"$ref": "#/definitions/object.Enforcer"
}
}
],
@ -1187,9 +1190,9 @@
"operationId": "ApiController.DeleteMfa",
"responses": {
"200": {
"description": "object",
"description": "The Response object",
"schema": {
"$ref": "#/definitions/Response"
"$ref": "#/definitions/controllers.Response"
}
}
}
@ -1657,7 +1660,10 @@
"description": "Casbin request",
"required": true,
"schema": {
"$ref": "#/definitions/object.CasbinRequest"
"type": "array",
"items": {
"type": "string"
}
}
},
{
@ -1809,7 +1815,7 @@
"200": {
"description": "The Response object",
"schema": {
"$ref": "#/definitions/Response"
"$ref": "#/definitions/controllers.Response"
}
}
}
@ -1962,7 +1968,7 @@
"200": {
"description": "The Response object",
"schema": {
"$ref": "#/definitions/Response"
"$ref": "#/definitions/controllers.Response"
}
}
}
@ -2208,7 +2214,7 @@
"200": {
"description": "The Response object",
"schema": {
"$ref": "#/definitions/LdapResp"
"$ref": "#/definitions/controllers.LdapResp"
}
}
}
@ -3826,9 +3832,9 @@
"operationId": "ApiController.MfaSetupEnable",
"responses": {
"200": {
"description": "object",
"description": "The Response object",
"schema": {
"$ref": "#/definitions/Response"
"$ref": "#/definitions/controllers.Response"
}
}
}
@ -3860,9 +3866,9 @@
"operationId": "ApiController.MfaSetupVerify",
"responses": {
"200": {
"description": "object",
"description": "The Response object",
"schema": {
"$ref": "#/definitions/Response"
"$ref": "#/definitions/controllers.Response"
}
}
}
@ -3996,9 +4002,9 @@
"operationId": "ApiController.SetPreferredMfa",
"responses": {
"200": {
"description": "object",
"description": "The Response object",
"schema": {
"$ref": "#/definitions/Response"
"$ref": "#/definitions/controllers.Response"
}
}
}
@ -4057,7 +4063,7 @@
"200": {
"description": "The Response object",
"schema": {
"$ref": "#/definitions/LdapSyncResp"
"$ref": "#/definitions/controllers.LdapSyncResp"
}
}
}
@ -4925,7 +4931,7 @@
"200": {
"description": "The Response object",
"schema": {
"$ref": "#/definitions/LaravelResponse"
"$ref": "#/definitions/controllers.LaravelResponse"
}
}
}
@ -5131,22 +5137,6 @@
}
},
"definitions": {
"LaravelResponse": {
"title": "LaravelResponse",
"type": "object"
},
"LdapResp": {
"title": "LdapResp",
"type": "object"
},
"LdapSyncResp": {
"title": "LdapSyncResp",
"type": "object"
},
"Response": {
"title": "Response",
"type": "object"
},
"casbin.Enforcer": {
"title": "Enforcer",
"type": "object"
@ -5179,6 +5169,66 @@
}
}
},
"controllers.LaravelResponse": {
"title": "LaravelResponse",
"type": "object",
"properties": {
"created_at": {
"type": "string"
},
"email": {
"type": "string"
},
"email_verified_at": {
"type": "string"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"updated_at": {
"type": "string"
}
}
},
"controllers.LdapResp": {
"title": "LdapResp",
"type": "object",
"properties": {
"existUuids": {
"type": "array",
"items": {
"type": "string"
}
},
"users": {
"type": "array",
"items": {
"$ref": "#/definitions/object.LdapUser"
}
}
}
},
"controllers.LdapSyncResp": {
"title": "LdapSyncResp",
"type": "object",
"properties": {
"exist": {
"type": "array",
"items": {
"$ref": "#/definitions/object.LdapUser"
}
},
"failed": {
"type": "array",
"items": {
"$ref": "#/definitions/object.LdapUser"
}
}
}
},
"controllers.NotificationForm": {
"title": "NotificationForm",
"type": "object",
@ -5236,10 +5286,6 @@
}
}
},
"jose.JSONWebKey": {
"title": "JSONWebKey",
"type": "object"
},
"model.Model": {
"title": "Model",
"type": "object"
@ -5368,6 +5414,14 @@
"type": "integer",
"format": "int64"
},
"failedSigninLimit": {
"type": "integer",
"format": "int64"
},
"failedSigninfrozenTime": {
"type": "integer",
"format": "int64"
},
"forgetUrl": {
"type": "string"
},
@ -5480,12 +5534,6 @@
}
}
},
"object.CasbinRequest": {
"title": "CasbinRequest",
"type": "array",
"items": {
}
},
"object.Cert": {
"title": "Cert",
"type": "object",
@ -5527,10 +5575,6 @@
}
}
},
"object.Enforce": {
"title": "Enforce",
"type": "object"
},
"object.Enforcer": {
"title": "Enforcer",
"type": "object",
@ -5771,6 +5815,66 @@
}
}
},
"object.LdapUser": {
"title": "LdapUser",
"type": "object",
"properties": {
"EmailAddress": {
"type": "string"
},
"Mail": {
"type": "string"
},
"MobileTelephoneNumber": {
"type": "string"
},
"PostalAddress": {
"type": "string"
},
"RegisteredAddress": {
"type": "string"
},
"TelephoneNumber": {
"type": "string"
},
"address": {
"type": "string"
},
"cn": {
"type": "string"
},
"displayName": {
"type": "string"
},
"email": {
"type": "string"
},
"gidNumber": {
"type": "string"
},
"groupId": {
"type": "string"
},
"memberOf": {
"type": "string"
},
"mobile": {
"type": "string"
},
"uid": {
"type": "string"
},
"uidNumber": {
"type": "string"
},
"userPrincipalName": {
"type": "string"
},
"uuid": {
"type": "string"
}
}
},
"object.ManagedAccount": {
"title": "ManagedAccount",
"type": "object",
@ -7529,22 +7633,6 @@
],
"example": "Paid"
},
"protocol.CredentialAssertion": {
"title": "CredentialAssertion",
"type": "object"
},
"protocol.CredentialAssertionResponse": {
"title": "CredentialAssertionResponse",
"type": "object"
},
"protocol.CredentialCreation": {
"title": "CredentialCreation",
"type": "object"
},
"protocol.CredentialCreationResponse": {
"title": "CredentialCreationResponse",
"type": "object"
},
"util.SystemInfo": {
"title": "SystemInfo",
"type": "object",

View File

@ -525,9 +525,9 @@ paths:
$ref: '#/definitions/controllers.EmailForm'
responses:
"200":
description: object
description: The Response object
schema:
$ref: '#/definitions/Response'
$ref: '#/definitions/controllers.Response'
/api/api/send-notification:
post:
tags:
@ -543,9 +543,9 @@ paths:
$ref: '#/definitions/controllers.NotificationForm'
responses:
"200":
description: object
description: The Response object
schema:
$ref: '#/definitions/Response'
$ref: '#/definitions/controllers.Response'
/api/api/send-sms:
post:
tags:
@ -571,9 +571,9 @@ paths:
$ref: '#/definitions/controllers.SmsForm'
responses:
"200":
description: object
description: The Response object
schema:
$ref: '#/definitions/Response'
$ref: '#/definitions/controllers.Response'
/api/api/verify-code:
post:
tags:
@ -606,7 +606,9 @@ paths:
description: array of casbin requests
required: true
schema:
$ref: '#/definitions/object.CasbinRequest'
type: array
items:
type: string
- in: query
name: permissionId
description: permission id
@ -718,7 +720,7 @@ paths:
description: The enforcer object
required: true
schema:
$ref: '#/definitions/object.Enforce'
$ref: '#/definitions/object.Enforcer'
responses:
"200":
description: ""
@ -768,9 +770,9 @@ paths:
operationId: ApiController.DeleteMfa
responses:
"200":
description: object
description: The Response object
schema:
$ref: '#/definitions/Response'
$ref: '#/definitions/controllers.Response'
/api/delete-model:
post:
tags:
@ -1071,7 +1073,9 @@ paths:
description: Casbin request
required: true
schema:
$ref: '#/definitions/object.CasbinRequest'
type: array
items:
type: string
- in: query
name: permissionId
description: permission id
@ -1172,7 +1176,7 @@ paths:
"200":
description: The Response object
schema:
$ref: '#/definitions/Response'
$ref: '#/definitions/controllers.Response'
/api/get-application:
get:
tags:
@ -1272,7 +1276,7 @@ paths:
"200":
description: The Response object
schema:
$ref: '#/definitions/Response'
$ref: '#/definitions/controllers.Response'
/api/get-email-and-phone:
get:
tags:
@ -1433,7 +1437,7 @@ paths:
"200":
description: The Response object
schema:
$ref: '#/definitions/LdapResp'
$ref: '#/definitions/controllers.LdapResp'
/api/get-ldaps:
get:
tags:
@ -2496,9 +2500,9 @@ paths:
operationId: ApiController.MfaSetupEnable
responses:
"200":
description: object
description: The Response object
schema:
$ref: '#/definitions/Response'
$ref: '#/definitions/controllers.Response'
/api/mfa/setup/initiate:
post:
tags:
@ -2518,9 +2522,9 @@ paths:
operationId: ApiController.MfaSetupVerify
responses:
"200":
description: object
description: The Response object
schema:
$ref: '#/definitions/Response'
$ref: '#/definitions/controllers.Response'
/api/notify-payment:
post:
tags:
@ -2607,9 +2611,9 @@ paths:
operationId: ApiController.SetPreferredMfa
responses:
"200":
description: object
description: The Response object
schema:
$ref: '#/definitions/Response'
$ref: '#/definitions/controllers.Response'
/api/signup:
post:
tags:
@ -2648,7 +2652,7 @@ paths:
"200":
description: The Response object
schema:
$ref: '#/definitions/LdapSyncResp'
$ref: '#/definitions/controllers.LdapSyncResp'
/api/unlink:
post:
tags:
@ -3219,7 +3223,7 @@ paths:
"200":
description: The Response object
schema:
$ref: '#/definitions/LaravelResponse'
$ref: '#/definitions/controllers.LaravelResponse'
/api/userinfo:
get:
tags:
@ -3351,18 +3355,6 @@ paths:
schema:
$ref: '#/definitions/object.TokenError'
definitions:
LaravelResponse:
title: LaravelResponse
type: object
LdapResp:
title: LdapResp
type: object
LdapSyncResp:
title: LdapSyncResp
type: object
Response:
title: Response
type: object
casbin.Enforcer:
title: Enforcer
type: object
@ -3385,6 +3377,46 @@ definitions:
type: string
title:
type: string
controllers.LaravelResponse:
title: LaravelResponse
type: object
properties:
created_at:
type: string
email:
type: string
email_verified_at:
type: string
id:
type: string
name:
type: string
updated_at:
type: string
controllers.LdapResp:
title: LdapResp
type: object
properties:
existUuids:
type: array
items:
type: string
users:
type: array
items:
$ref: '#/definitions/object.LdapUser'
controllers.LdapSyncResp:
title: LdapSyncResp
type: object
properties:
exist:
type: array
items:
$ref: '#/definitions/object.LdapUser'
failed:
type: array
items:
$ref: '#/definitions/object.LdapUser'
controllers.NotificationForm:
title: NotificationForm
type: object
@ -3514,6 +3546,12 @@ definitions:
expireInHours:
type: integer
format: int64
failedSigninLimit:
type: integer
format: int64
failedSigninfrozenTime:
type: integer
format: int64
forgetUrl:
type: string
formBackgroundUrl:
@ -3588,11 +3626,6 @@ definitions:
$ref: '#/definitions/object.ThemeData'
tokenFormat:
type: string
object.CasbinRequest:
title: CasbinRequest
type: array
items:
$ref: '#/definitions/object.CasbinRequest'
object.Cert:
title: Cert
type: object
@ -3621,9 +3654,6 @@ definitions:
type: string
type:
type: string
object.Enforce:
title: Enforce
type: object
object.Enforcer:
title: Enforcer
type: object
@ -3786,6 +3816,46 @@ definitions:
type: string
username:
type: string
object.LdapUser:
title: LdapUser
type: object
properties:
EmailAddress:
type: string
Mail:
type: string
MobileTelephoneNumber:
type: string
PostalAddress:
type: string
RegisteredAddress:
type: string
TelephoneNumber:
type: string
address:
type: string
cn:
type: string
displayName:
type: string
email:
type: string
gidNumber:
type: string
groupId:
type: string
memberOf:
type: string
mobile:
type: string
uid:
type: string
uidNumber:
type: string
userPrincipalName:
type: string
uuid:
type: string
object.ManagedAccount:
title: ManagedAccount
type: object