From 1d203170837709eb75c8a1975a330614703edb1f Mon Sep 17 00:00:00 2001 From: Teppo Kurki Date: Tue, 29 Oct 2024 22:14:56 +0200 Subject: [PATCH] wip --- generate-schema | 2 ++ package.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/generate-schema b/generate-schema index 595c160..dc92e24 100755 --- a/generate-schema +++ b/generate-schema @@ -5,7 +5,9 @@ const { resolve } = require('path') const $RefParser = require('@apidevtools/json-schema-ref-parser') const program = TJS.getProgramFromFiles([resolve(__dirname, 'src/plugin.ts')]) +console.error(program) const schemaFromTs = TJS.generateSchema(program, 'PluginConfig') +console.error(JSON.stringify(schemaFromTs, null, 2)) let schema = {} $RefParser.dereference(schemaFromTs, (err, derefSchema) => { if (err) { diff --git a/package.json b/package.json index e8f27a0..4ea21cb 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,7 @@ }, "license": "Apache-2.0", "devDependencies": { + "@apidevtools/json-schema-ref-parser": "^9.0.0", "@signalk/server-api": "^2.3.0", "@types/chai": "^4.3.3", "@types/express": "^4.17.17", @@ -35,7 +36,6 @@ "eslint": "^8.34.0", "eslint-config-prettier": "^8.6.0", "eslint-plugin-prettier": "^4.2.1", - "json-schema-ref-parser": "^9.0.9", "mocha": "^10.0.0", "prettier": "^2.8.4", "ts-node": "^10.9.1",