mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-24 22:03:54 +00:00
chore: openapi doc generator (#2644)
* chore: extract the type and comment from apis * chore: template code * feat: openapi * pref: openapi generator. send into public/openapi folder
This commit is contained in:
22
scripts/openapi/type.d.ts
vendored
Normal file
22
scripts/openapi/type.d.ts
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
export type ApiMetaData = {
|
||||
name?: string;
|
||||
author?: string;
|
||||
version?: string;
|
||||
};
|
||||
|
||||
export type ApiType = {
|
||||
description?: string;
|
||||
path: string;
|
||||
url: string;
|
||||
query?: itemType | itemType[];
|
||||
body?: itemType | itemType[];
|
||||
response?: itemType | itemType[];
|
||||
method: 'GET' | 'POST' | 'PUT' | 'DELETE';
|
||||
} & ApiMetaData;
|
||||
|
||||
export type itemType = {
|
||||
comment?: string;
|
||||
key?: string;
|
||||
type: string;
|
||||
required?: boolean;
|
||||
};
|
Reference in New Issue
Block a user