update api view

This commit is contained in:
AceDataCloud committed 2023-01-20 20:28:06 +08:00
1 parent 2b32240fe0
commit f8f34b0084
9 files changed
+326 -56

No files matched your search

+33 -3
View File
@@ -1,13 +1,43 @@
export interface ISchema {
properties: {
[key: string]: ISchema;
};
type: 'object' | 'array' | 'string' | 'number';
title: string;
optional: boolean;
}
export interface IRequest {
id: string;
body: ISchema;
headers: ISchema;
queries: ISchema;
params: ISchema;
method: 'GET' | 'POST' | 'HEAD' | 'PUT' | 'DELETE' | 'CONNECT' | 'OPTIONS' | 'TRACE' | 'PATCH';
}
export interface IResponse {
id: string;
title: string;
description?: string;
example?: string;
isSuccess: boolean;
errorCode?: string;
body: ISchema;
headers: ISchema;
}
export interface IApi {
id: string;
path: string;
endpoint: string;
alias: string;
title?: string;
description?: string;
tags?: string[];
endpoint?: string;
request: IRequest;
responses: IResponse[];
isFree?: boolean;
requestMethod?: boolean;
swaggerConfiguration?: string;
service?: string;
createdAt?: string;
updatedAt?: string;