mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-06-04 17:08:47 +08:00
fix: 后端代码格式化
This commit is contained in:
@@ -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")`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user