FastGPT/packages/global/openapi/index.ts
Finley Ge b22ba1aa53
chore: customDomain openapi doc && new nextapi code snippets (#6082)
* perf: faq

* index

* delete dataset

* delete dataset

* perf: delete dataset

* init

* fix: faq

* refresh

* empty tip

* chore: customDomain openapi doc && new nextapi code snippets

* chore: update doc

* remove ivalid code

* snippets

---------

Co-authored-by: archer <545436317@qq.com>
2025-12-12 15:28:03 +08:00

51 lines
1.2 KiB
TypeScript

import { createDocument } from 'zod-openapi';
import { ChatPath } from './core/chat';
import { ApiKeyPath } from './support/openapi';
import { TagsMap } from './tag';
import { PluginPath } from './core/plugin';
import { WalletPath } from './support/wallet';
import { CustomDomainPath } from './support/customDomain';
export const openAPIDocument = createDocument({
openapi: '3.1.0',
info: {
title: 'FastGPT API',
version: '0.1.0',
description: 'FastGPT API 文档'
},
paths: {
...ChatPath,
...ApiKeyPath,
...PluginPath,
...WalletPath,
...CustomDomainPath
},
servers: [{ url: '/api' }],
'x-tagGroups': [
{
name: '对话',
tags: [TagsMap.chatSetting, TagsMap.chatPage]
},
{
name: '插件相关',
tags: [TagsMap.pluginToolTag, TagsMap.pluginTeam]
},
{
name: '插件-管理员',
tags: [TagsMap.pluginAdmin, TagsMap.pluginMarketplace, TagsMap.pluginToolAdmin]
},
{
name: 'ApiKey',
tags: [TagsMap.apiKey]
},
{
name: '支付',
tags: [TagsMap.walletBill, TagsMap.walletDiscountCoupon]
},
{
name: '自定义域名',
tags: [TagsMap.customDomain]
}
]
});