Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
tkurki committed Nov 4, 2024
1 parent 09280dc commit 1d20317
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions generate-schema
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down

0 comments on commit 1d20317

Please sign in to comment.