POST {.openapi__method}
-\`\`\`
+\`\`\`text translate=no
http://localhost:8080/test
\`\`\`
@@ -154,7 +154,7 @@ Generated server url
{% cut "application/json" %}
-\`\`\`json
+\`\`\`json translate=no
{
"A": {}
}
@@ -220,7 +220,7 @@ exports[`Recursive references in schemas where the cycle itself is not trivially
POST {.openapi__method}
-\`\`\`
+\`\`\`text translate=no
http://localhost:8080/test
\`\`\`
@@ -247,7 +247,7 @@ Generated server url
{% cut "application/json" %}
-\`\`\`json
+\`\`\`json translate=no
{
"A": {}
}
diff --git a/src/__snapshots__/required.test.ts.snap b/src/__snapshots__/required.test.ts.snap
index 46512ea..bc39822 100644
--- a/src/__snapshots__/required.test.ts.snap
+++ b/src/__snapshots__/required.test.ts.snap
@@ -14,7 +14,7 @@ exports[`required renders correct required 1`] = `
POST {.openapi__method}
-\`\`\`
+\`\`\`text translate=no
http://localhost:8080/test
\`\`\`
@@ -61,7 +61,7 @@ Generated server url
{% cut "application/json" %}
-\`\`\`json
+\`\`\`json translate=no
{
"d": 0,
"e": 0
@@ -125,7 +125,7 @@ Cat class
{% cut "application/json" %}
-\`\`\`json
+\`\`\`json translate=no
{
"type": "string",
"foo": "string"
diff --git a/src/includer/ui/common.ts b/src/includer/ui/common.ts
index e4820d0..65c68c3 100644
--- a/src/includer/ui/common.ts
+++ b/src/includer/ui/common.ts
@@ -50,7 +50,11 @@ function bold(text: string) {
function code(text: string, type = 'text', translate = false) {
const appliedType = type && text.length <= 2000 ? type : 'text';
- return EOL + ['```' + appliedType + ` ${translate ? '' : 'translate=no'}`, text, '```'].join(EOL) + EOL;
+ return (
+ EOL +
+ ['```' + appliedType + ` ${translate ? '' : 'translate=no'}`, text, '```'].join(EOL) +
+ EOL
+ );
}
function method(text: string, path: string, server: V3Server) {