santhosh-tekuri/jsonschema

Feature request: Pass custom compiler into "convenience" functions like CompileString

Closed this issue ยท 2 comments

yannh commented

Hello ๐Ÿ‘‹ A bug was reported to Kubeconform recently which was caused by us incorrectly using this library, and defaulting to an incorrect draft version of jsonschema. Here is the patch that fixes the issue - however I could not use "CompileString" directly and had to essentially copy its implementation ๐Ÿ˜…

Maybe this JSONSchema library could provide a way to use these convenience functions, passing a defautl Draft version, or a custom compiler? I guess our current workaround is really not too bad though :) Thanks!!

WONT_FIX

these are convenient functions like http.Get and http.Post.

just like http.Get and http.Post does not allow to pass custom http.Client, the same applies here.

yannh commented

Fair enough :) Thanks!