mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-24 22:03:54 +00:00
feat: specify the api's auth type (#2715)
This commit is contained in:
@@ -4,7 +4,7 @@ import * as path from 'path';
|
||||
import { convertOpenApi } from './openapi';
|
||||
|
||||
const rootPath = 'projects/app/src/pages/api';
|
||||
const exclude = ['/admin', '/proApi'];
|
||||
const exclude = ['/admin', '/proApi', 'test.ts'];
|
||||
|
||||
function getAllFiles(dir: string) {
|
||||
let files: string[] = [];
|
||||
@@ -39,6 +39,22 @@ const openapi = convertOpenApi({
|
||||
version: '1.0.0',
|
||||
author: 'FastGPT'
|
||||
},
|
||||
components: {
|
||||
securitySchemes: {
|
||||
apiKey: {
|
||||
type: 'apiKey',
|
||||
name: 'Authorization',
|
||||
in: 'header',
|
||||
scheme: 'bearer'
|
||||
},
|
||||
token: {
|
||||
type: 'apiKey',
|
||||
in: 'token',
|
||||
name: 'token',
|
||||
scheme: 'basic'
|
||||
}
|
||||
}
|
||||
},
|
||||
servers: [
|
||||
{
|
||||
url: 'http://localhost:4000'
|
||||
|
Reference in New Issue
Block a user