Skip to content

Commit

Permalink
fix: created escapd json schema first
Browse files Browse the repository at this point in the history
  • Loading branch information
BelfordZ authored Apr 8, 2020
1 parent 3ec95e8 commit f3eb4fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const {JsonSchemaToTypes} = require("@etclabscore/json-schema-to-types");
const refParser = require("json-schema-ref-parser");

const generateTypes = async (s) => {
const escapedS = JSON.stringify(s).replace(/"/g, "\\\"");
const parsed = await refParser.dereference(s);
// the title set is particularly ugly, so we set a new one
parsed.definitions.schema.title = "JSONSchema";
Expand All @@ -20,8 +21,7 @@ const generateTypes = async (s) => {

const transpiler = new JsonSchemaToTypes(parsed);
const ts = transpiler.toTs();

const escapedS = JSON.stringify(s).replace(/"/g, "\\\"");

const go = [
"package meta_schema",
"",
Expand Down

0 comments on commit f3eb4fa

Please sign in to comment.