forked from MapComplete/MapComplete
Chore: update generateSchemas to work with current version
This commit is contained in:
parent
3319c516c9
commit
84df5b5624
4 changed files with 236 additions and 227 deletions
|
@ -81,7 +81,7 @@ function WalkScheme<T>(
|
|||
|
||||
fullScheme = fullScheme ?? scheme
|
||||
if (!skipRoot) {
|
||||
let t = onEach(scheme, path)
|
||||
const t = onEach(scheme, path)
|
||||
if (t !== undefined) {
|
||||
const isRequired = required?.indexOf(path.at(-1)) >= 0
|
||||
results.push({
|
||||
|
@ -385,7 +385,7 @@ function main() {
|
|||
console.log("Trying to read", path)
|
||||
let content = readFileSync(path, { encoding: "utf8" })
|
||||
content = content.substring("export default ".length)
|
||||
let parsed = JSON.parse(content)
|
||||
const parsed = JSON.parse(content)
|
||||
parsed["additionalProperties"] = false
|
||||
|
||||
for (const key in parsed.definitions) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue