json-schema-org / json-schema-spec

The JSON Schema specification
http://json-schema.org/
Other
3.8k stars 266 forks source link

Consider "API best practices" section #544

Open awwright opened 6 years ago

awwright commented 6 years ago

There should be a section with guidelines for how to write a validator API. The section would be informative (non-normative), on observations on how to best expose the functionality that JSON Schema offers for validation and forward-compatibility.

Topics would include (feel free to edit list/suggest edits):

carlosaq commented 6 years ago

Does any know if there are something ready or only will be start to define?

awwright commented 6 years ago

@carlosaq I'm not sure what you're asking.

handrews commented 6 years ago

@awwright a lot of these things are things that already have issues filed to be resolved as part of the spec work. There should not be an overlap between that and any best practices document work. Some covered by #314 and related issues, others by issues tagged with the "output" label.

Even considered as best practices, this is a large grab-bag of different things. Can we

a.) whittle this down to things that aren't being addressed, and should not be addressed, elsewhere b.) organize this a bit- there are several different kinds of implementation advice c.) figure out a heuristic for what really needs to be in a spec appendix and what should go on the web site

gregsdennis commented 6 years ago

Try and find the smallest change that would cause validation to pass, and suggest making that.

That's some heavy-duty analysis.

Overall I like the idea of this. Manatee.Json already supports many of these. I'd be happy to provide examples of how it's implemented to give some direction.

As @handrews mentioned, I know we already have issues for some of these. https://github.com/json-schema-org/json-schema-spec/issues/396 comes to mind immediately.