jsf
jsf copied to clipboard
Make "definitions" variable in JSF._parse method
The latest JSON Schema draft versions recommend using $defs
instead of definitions
with the note that the actual reference pointer should be extracted from the $ref
fragment. I think it will require a change in the _parse
method of https://github.com/ghandic/jsf/blob/main/src/jsf/parser.py
I don’t think it is instead of definitions, it has a different usecase, it’s intention is to be overwritten while in subschemas. Looks like an additional feature and would need to maintain a subschema context rather than adding to the global context
PR’s welcome
Sent from my iPhone
On 7 Jul 2022, at 06:38, jtyoung84 @.***> wrote:
The latest JSON Schema draft versions recommend using $defs instead of definitions with the note that the actual reference pointer should be extracted from the $ref fragment. I think it will require a change in the _parse method of https://github.com/ghandic/jsf/blob/main/src/jsf/parser.py
— Reply to this email directly, view it on GitHubhttps://github.com/ghandic/jsf/issues/35, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AFTJMQLAVRFASZGPRGKZCTDVSXVFBANCNFSM523B43WQ. You are receiving this because you are subscribed to this thread.Message ID: @.***>
After perusing the release notes for draft 2019-09, definitions
was renamed to $defs
with the caveat that definitions
should still be honored for backwards compatibility. This might be a non-issue then if the jsf library currently only supports up to draft 7 (#3).
Viable if we can get #3 fixed