Skip to content

Commit 41c11a2

Browse files
authored
update schema generation and update schema to draft 07 (#1422)
1 parent 8296e40 commit 41c11a2

File tree

5 files changed

+165837
-111517
lines changed

5 files changed

+165837
-111517
lines changed

bin/generate-schema.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
1-
// joi-to-json-schema currently does not support v16 of Joi (https://github.com/lightsofapollo/joi-to-json-schema/issues/57)
2-
const { convert } = require('@koa-lite/joi-schema')
1+
const parse = require('joi-to-json')
32
const fs = require('node:fs')
43
const { schema } = require('../lib/schema')
54
const inputArguments = process.argv.slice(2) || []
65

6+
const originalSchema = parse(
7+
schema(),
8+
'json',
9+
{},
10+
{ includeSchemaDialect: true }
11+
)
12+
713
const jsonSchema = {
814
title: 'JSON schema for Release Drafter yaml files',
915
id: 'https://github.com/release-drafter/release-drafter/blob/master/schema.json',
10-
$schema: 'http://json-schema.org/draft-04/schema#',
11-
...convert(schema()),
16+
...originalSchema,
1217
}
1318

1419
exports.jsonSchema = jsonSchema

0 commit comments

Comments
 (0)