Remove useless "/api/login/oauth/code" API and update Swagger

This commit is contained in:
Yang Luo
2023-04-22 09:47:52 +08:00
parent f3ea39d20c
commit ee8c2650c3
4 changed files with 625 additions and 146 deletions

View File

@ -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": {
"post": {
"tags": [
@ -107,6 +135,34 @@
"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": {
"post": {
"tags": [
@ -595,6 +651,14 @@
}
}
},
"/api/api/verify-code": {
"post": {
"tags": [
"Account API"
],
"operationId": "ApiController.VerifyCode"
}
},
"/api/api/webhook": {
"post": {
"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": {
"post": {
"tags": [
@ -708,6 +800,34 @@
"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": {
"post": {
"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": {
"get": {
"tags": [
@ -1357,6 +1532,61 @@
"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": {
"get": {
"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": {
"post": {
"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": {
"post": {
"tags": [
@ -3064,6 +3268,41 @@
"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": {
"post": {
"tags": [
@ -3644,11 +3883,11 @@
}
},
"definitions": {
"2306.0xc0003a4480.false": {
"2306.0xc0004a1410.false": {
"title": "false",
"type": "object"
},
"2340.0xc0003a44b0.false": {
"2340.0xc0004a1440.false": {
"title": "false",
"type": "object"
},
@ -3782,10 +4021,10 @@
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/2306.0xc0003a4480.false"
"$ref": "#/definitions/2306.0xc0004a1410.false"
},
"data2": {
"$ref": "#/definitions/2340.0xc0003a44b0.false"
"$ref": "#/definitions/2340.0xc0004a1440.false"
},
"msg": {
"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": {
"title": "Header",
"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": {
"title": "Model",
"type": "object",