fix: api server - server url prefix is not updated (#2650)

This commit is contained in:
Louis 2024-04-09 11:31:35 +07:00 committed by GitHub
parent 1244f03f66
commit 07e1a2295c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -86,6 +86,10 @@ export const startServer = async (configs?: ServerConfig): Promise<boolean> => {
specification: { specification: {
path: configs?.schemaPath ?? './../docs/openapi/jan.yaml', path: configs?.schemaPath ?? './../docs/openapi/jan.yaml',
baseDir: configs?.baseDir ?? './../docs/openapi', baseDir: configs?.baseDir ?? './../docs/openapi',
postProcessor: function (swaggerObject: any) {
swaggerObject.servers[0].url = configs?.prefix ?? '/v1'
return swaggerObject
},
}, },
}) })