fix: refine Swagger docs headers and dynamic examples

This commit is contained in:
MythEclipse
2026-05-18 07:43:15 +07:00
parent 6feca3564a
commit 9aedc59b69
+5 -1
View File
@@ -1,3 +1,5 @@
import { config } from '../env';
const errorSchema = (example: string) => ({
type: 'object',
properties: {
@@ -117,7 +119,7 @@ export const handleSwaggerJson = async (): Promise<Response> => {
},
download_url: {
type: 'string',
example: 'https://tele.asepharyana.tech/f/xYz123',
example: `${config.baseUrl}/f/xYz123`,
},
},
}),
@@ -269,6 +271,8 @@ export const handleSwaggerHtml = async (): Promise<Response> => {
status: 200,
headers: {
'content-type': 'text/html; charset=utf-8',
'access-control-allow-origin': '*',
'x-content-type-options': 'nosniff',
},
});
};