diff options
Diffstat (limited to 'common/jsonschema.js')
-rw-r--r-- | common/jsonschema.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/common/jsonschema.js b/common/jsonschema.js index 9c4a70c..3a82702 100644 --- a/common/jsonschema.js +++ b/common/jsonschema.js @@ -57,7 +57,7 @@ #FROM common/jsonschema/scan.js IMPORT SchemaScanResult, scan -#FROM common/entities.js IMPORT haketilo_schema_name_regex +#FROM common/entities.js IMPORT parse_schema_uri #EXPORT scan #EXPORT SchemaScanResult @@ -89,9 +89,8 @@ const haketilo_schemas = [ ].reduce((ac, s) => Object.assign(ac, {[s.$id]: s}), {}); for (const [$id, schema] of [...Object.entries(haketilo_schemas)]) { - const match = haketilo_schema_name_regex.exec($id); - const schema_name = - `${match.groups.name_base}-${match.groups.major}.schema.json`; + const parsed = parse_schema_uri($id); + const schema_name = `${parsed.name_base}-${parsed.major}.schema.json`; haketilo_schemas[schema_name] = schema; } |