santhosh-tekuri/jsonschema

Extended the implementation of a new custom validation traversal logic(I'm not sure if there are any other side effects of this)

Closed this issue · 1 comments

Hello, I have extended the implementation of a new custom validation traversal logic. When “compileObjectKind(ctx *jsonschema.CompilerContext ,obj map[string]any)”, only when the attribute has this custom keyword will it be entered for comparison and retrieval, instead of throwing all Schema objects, including those in the attribute, for validation every time. The main solution is to address the issue of my complex verification logic and the potential impact on performance when there are too many custom fields.

seems like you are talking about custom vocabulary.

I am not sure what optimisation you are referring to.

a vocab's compile is always called. if the schema does not contain any of your keywords, then you simply return nil extSchema.