Files
FastGPT/scripts/openapi/type.d.ts
Finley Ge 78ad2791cd 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
2024-09-09 15:43:09 +08:00

23 lines
433 B
TypeScript

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;
};