JSON Schema / IETF support
See original GitHub issueSo, apparently JSON Schema is an IETF standard (Informational), that is used in products like Swagger, and is some sort of alternative to node-simple-schema.
http://json-schema.org/ http://json-schema.org/documentation.html http://json-schema.org/latest/json-schema-core.html
Has there been any thought given to support json-schema objects and syntax? Perhaps through toSimpleJson()
and fromSimpleJson()
methods?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:7 (1 by maintainers)
Top Results From Across the Web
draft-zyp-json-schema-04 - IETF Datatracker
JSON Schema : core definitions and terminology (Internet-Draft, 2013) ... schema authors SHALL NOT expect these additional keywords to be supported by peer ......
Read more >Specification - JSON Schema
They are also available on the IETF main site: draft-bhutton-json-schema-01 ... The meta-schemas are schemas against which other schemas can be validated.
Read more >json-schema-spec/2022-09-decouple-from-ietf.md at main
JSON Schema is an individual draft. That means it isn't on a standards track with IETF and IETF is not involved nor supports...
Read more >RFC 8927: JSON Type Definition
This document describes a schema language for JSON [RFC8259] called JSON Type ... The principle of common patterns in JSON is why JTD...
Read more >JSON Schema Examples Tutorial - MongoDB
JSON (JavaScript Object Notation) is a simple and lightweight text-based data format. JSON Schema is an IETF standard providing a format for what...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi, I don’t have a horse in the race regarding how it’s package. The one thing I’ll say though, is don’t underestimate the value of having a well curated API.
As for MongoDB’s newish built-in JSONSchema validation - yes, I have! We’re very excited about the new functionality, and very much looking forward to using it.
However, maybe 80% or 90% of the work we do is with iOS apps and using Meteor as an application server. In the healthcare industry, there’s an industry wide initiative to enable standardized HTTP interfaces at all the hospitals and laboratories in the US. So we focus a lot of our time building client side apps that don’t actually use Mongo or DDP all that much. Rather, we tend use the Meteor build pipeline, and then fetch data from lots of different servers using HTTP. The hospital endpoints are suppose to be all the same, but there are implementation bugs, differences in interpretation, different versions of the standard, etc. So, we need the JSONSchemas on the client to do quality control.
We’re interested in someday landing on an NPM based
simpl-schema
+minimongo
+ajv
solution, and minimizing our overall usage of Atmosphere. But that’s probably a year away, and requires at least two more major refactors.Until then, SimpleSchema/Minimongo is the isomorphic solution we know works. Better to use it to work the JSONSchemas over to the client. Then we can lock down some acceptance tests and integration tests, and then refactor to the NPM packages.
@awatson1978 I agree with @coagmano that some sort of factory function is best, but I’d add that it should be a separate package with a dependency on simpl-schema. So rather than
SimpleSchema.fromJsonSchema
, it would be its own thing you import:If nobody else is interested in creating and owning this package, I can do it. But I do think it’s best to keep all of that separate. (The existing package should already be broken into a few different packages, IMO.)
Out of curiosity, are you using MongoDB and have you looked into their newish built-in JSONSchema validation? If you attach those to the mongo collections directly in Mongo, then
.attachSchema
may not even be necessary, although you’d have to parse mongo errors.