fix: 后端代码格式化

This commit is contained in:
Tim
2025-09-18 14:42:25 +08:00
parent 70f7442f0c
commit 72b2b82e02
325 changed files with 15341 additions and 12370 deletions

View File

@@ -1,4 +1,4 @@
import type { MediaAdapter } from 'fumadocs-openapi';
import type { MediaAdapter } from "fumadocs-openapi";
export const OpenIsleMediaAdapter: MediaAdapter = {
encode(data) {
@@ -6,16 +6,16 @@ export const OpenIsleMediaAdapter: MediaAdapter = {
},
// returns code that inits a `body` variable, used for request body
generateExample(data, ctx) {
if (ctx.lang === 'js') {
if (ctx.lang === "js") {
return `const body = "hello world"`;
}
if (ctx.lang === 'python') {
if (ctx.lang === "python") {
return `body = "hello world"`;
}
if (ctx.lang === 'go' && 'addImport' in ctx) {
ctx.addImport('strings');
if (ctx.lang === "go" && "addImport" in ctx) {
ctx.addImport("strings");
return `body := strings.NewReader("hello world")`;
}