Closed justin-tay closed 6 months ago
Attention: Patch coverage is 85.71429%
with 48 lines
in your changes are missing coverage. Please review.
Project coverage is 78.51%. Comparing base (
fed46cf
) to head (42cbbe5
).
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Hi @justin-tay
Will this also fix https://github.com/networknt/json-schema-validator/issues/475#issuecomment-1618381541 ?
Hi @justin-tay
Will this also fix #475 (comment) ?
That should already have been fixed as it has nothing to do with implementing custom vocabularies. That issue has to do with the lack of support for $dynamicRef
which was fixed in
It did, thanks!!
Closes #977, closes #829
This adds support for customizing
This contains breaking changes in how custom meta-schemas are created and the documentation updates assume it will be released as 1.4.0.
JsonSchemaFactory
JsonSchemaFactory
builderdefaultMetaSchemaURI
->defaultMetaSchemaIri
enableUriSchemaCache
->enableSchemaCache
JsonMetaSchemaFactory
which can be used to restrict the loading of meta-schemas that aren't explicitly defined in theJsonSchemaFactory
. TheDisallowUnknownJsonMetaSchemaFactory
can be used to only allow explicitly configured meta-schemas.JsonMetaSchema
Version201909
andVersion202012
had most of the keywords moved to their respective vocabularies.getUri
->getIri
vocabularyFactory
to allow for custom vocabularies.unknownKeywordFactory
. By default this uses theUnknownKeywordFactory
implementation that logs a warning and returns aAnnotationKeyword
. TheDisallowUnknownKeywordFactory
can be used to disallow the use of unknown keywords.$vocabulary
with value oftrue
that are not known to the implementation.ValidatorTypeCode
getNonFormatKeywords
has been removed and replaced withgetKeywords
. This now includes theformat
keyword as theJsonMetaSchema.Builder
now needs to know if theformat
keyword was configured, as it might not be in meta-schemas that don't define the format vocabulary.VersionCode
for each of theValidatorTypeCode
were modified to remove the keywords that are defined in vocabularies forVersion201909
andVersion202012
.Vocabulary
Keyword
instances instead of the string keyword value as it needs to know the explicit implementation. For instance the implementation for theitems
keyword in Draft 2019-09 and Draft 2020-12 are different.getId
->getIri