Closed karenetheridge closed 1 year ago
I don't understand. I see both subSchemas.json and subSchemas-defs.json still being used. The former is used by drafts 3-7, and the latter by 2019-09 and later. Both are needed, because one uses definitions
and the other uses $defs
.
@karenetheridge Sorry, I should have been more clear. There are multiple copies of these schemas, so it gets confusing which copies are being discussed.
/remotes/subSchemas.json
(used up to draft-07. Can use definitions
.)/remotes/subSchemas-defs.json
(not used)/remotes/draft2019-09/subSchemas.json
(not used)/remotes/draft2019-09/subSchemas-defs.json
(used by 2019-09. Uses $defs
.)/remotes/draft2020-12/subSchemas.json
(not used)/remotes/draft2020-12/subSchemas-defs.json
(used by 2020-12. Uses $defs
.)/remotes/draft-next/subSchemas.json
(not used)/remotes/draft-next/subSchemas-defs.json
(used by draft-next. Uses $defs
.)Since /remotes/subSchemas-defs.json
and /remotes/draft*/subSchemas.json
are never used, they can be removed leaving us with ...
/remotes/subSchemas.json
(used up to draft-07. Can use definitions
.)/remotes/draft2019-09/subSchemas-defs.json
(used by 2019-09. Uses $defs
.)/remotes/draft2020-12/subSchemas-defs.json
(used by 2020-12. Uses $defs
.)/remotes/draft-next/subSchemas-defs.json
(used by draft-next. Uses $defs
.)We can take the clean up one step further. Since there's no /remotes/draft*/subSchemas.json
anymore, the -defs
postfix is unnecessary and removing makes the naming consistent.
/remotes/subSchemas.json
(used up to draft-07. Can use definitions
.)/remotes/draft2019-09/subSchemas.json
(used by 2019-09. Uses $defs
.)/remotes/draft2020-12/subSchemas.json
(used by 2020-12. Uses $defs
.)/remotes/draft-next/subSchemas.json
(used by draft-next. Uses $defs
.)ok. I'll open a new PR.
I found this while adding checks for $refs to non-schema locations to my implementation.