sagold / json-schema-library

Customizable and hackable json-validator and json-schema utilities for traversal, data generation and validation
MIT License
164 stars 19 forks source link

getTemplate loses compiled references #31

Closed Carl-Foster closed 1 year ago

Carl-Foster commented 1 year ago

We continue to have issues with getTemplate erroring out when we have referenced schemas. It appears that within the createTemplateSchema there are a number of copy / merge functions which lose the non-enumerable properties which have been compiled into the schema. This causes the getRoot function to not exist and instead of properly referencing the actual compiled schema, it instead tries to find the definitions from the core.rootSchema.

sagold commented 1 year ago

Hi.

Can you share an example of your setup (e.g. using addRemoteSchema, specific schemas) and which $refs fail?

Thank you!

sagold commented 1 year ago

Your fix has been published with json-schema-library@7.4.8 and resolves this issue.

Thank you very much!