Skip to content

Commit

Permalink
docs(website): fix schema (again) (#514)
Browse files Browse the repository at this point in the history
  • Loading branch information
ematipico authored Oct 12, 2023
1 parent 1f66cbb commit 68c5ac3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions website/src/pages/schemas/1.2.2/schema.json.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
// Run `BIOME_VERSION=<version number> cargo codegen-website
// to generate a new schema
import { readFileSync } from "fs";
import { join, resolve } from "path";

export function GET() {
const schema = {
$schema: "http://json-schema.org/draft-07/schema#",
Expand Down Expand Up @@ -2002,7 +1999,7 @@ export function GET() {
},
},
};
return new Response(schema, {
return new Response(JSON.stringify(schema), {
status: 200,
headers: {
"content-type": "application/json",
Expand Down
2 changes: 1 addition & 1 deletion xtask/codegen/src/generate_website.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export function GET() {"#,
);
content.push_str(&format!("const schema = {};", schema_content));
content.push_str(
r#"return new Response(schema, {
r#"return new Response(JSON.stringify(schema), {
status: 200,
headers: {
"content-type": "application/json"
Expand Down

0 comments on commit 68c5ac3

Please sign in to comment.