jsf icon indicating copy to clipboard operation
jsf copied to clipboard

Make "definitions" variable in JSF._parse method

Open jtyoung84 opened this issue 2 years ago • 3 comments

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

jtyoung84 avatar Jul 06 '22 20:07 jtyoung84

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: @.***>

ghandic avatar Jul 06 '22 22:07 ghandic

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).

jtyoung84 avatar Jul 06 '22 22:07 jtyoung84

Viable if we can get #3 fixed

ghandic avatar Jul 12 '22 03:07 ghandic