json_schemer icon indicating copy to clipboard operation
json_schemer copied to clipboard

Output formatting

Open davishmcclurg opened this issue 6 years ago • 4 comments

Implement the JSON Schema spec's "basic" output format: https://github.com/json-schema-org/json-schema-spec/pull/679

davishmcclurg avatar Mar 12 '19 06:03 davishmcclurg

Very interested in this feature!

Just a heads up to let you know people are looking forward to using this.

jfeltesse-mdsol avatar Apr 03 '19 03:04 jfeltesse-mdsol

@jfeltesse-mdsol good to know! Is the current output not working for you? I'm curious to hear how the spec's output format will be more useful.

davishmcclurg avatar Apr 17 '19 05:04 davishmcclurg

It's about future proofing. Right now I've not put your gem to use in any project, still exploring, but when I do so it'd be nice to know the code I'll write around won't be thrown away is 6 months.

Related to this we have other languages in use at my company and while making a cross-language shared wrapper library is probably not worth it, reviewing and maintaining other languages is going to be much easier if everyone processes the same kind of data structures, as standardized by the spec.

jfeltesse-mdsol avatar Apr 18 '19 06:04 jfeltesse-mdsol

@davishmcclurg This feature is also very interesting for me!

obahareth avatar Jul 04 '19 11:07 obahareth

Released in 2.0.0. Use output_format option (classic/flag/basic/detailed/verbose):

JSONSchemer.schema(schema).validate(data, :output_format => 'basic')

davishmcclurg avatar Aug 20 '23 20:08 davishmcclurg