-
-
Notifications
You must be signed in to change notification settings - Fork 7
Add post 'Get started with JSON Schema in Node.js' #9
Add post 'Get started with JSON Schema in Node.js' #9
Conversation
- Author avatar - Article cover image
The documentation page that was previously linked to doesn't provide any reference to installation. The page we're now linking to includes installation instructions and links to the CLI documentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've left a few suggestions.
It would be great if you could mention, at least at the end, which version of AJV you're using here.
I'd also like to just see a touch on what AJVs safe mode is, and how and why you would want to disable it.
Not to say that AJVs safe mode doesn't provide some good defaults, such as https://ajv.js.org/strict-mode.html#unconstrained-tuples, but it can easily prevent valid schemas from being allowed to run. It's a "gotcha" we are sometimes seeing.
I'd also like to change the header image. I really like https://unsplash.com/photos/a8YV2C3yBMk
I think it's good symbolism of getting started, not too difficult, but lots of potential.
(Happy to make that change if you've enabled edit by maintainers on your branch)
No problem.
I'm happy to add a paragraph or two on Ajv's strict mode. I haven't run into any issues myself though, so haven't had the need to adjust the strict defaults — could you give me an example of a valid schema that it would prevent from running?
Go for it! (edits by maintainers are enabled on this branch) |
Yeah sure. There are a few in the docs, but a specific example is adding any additional keywords which aren't part of the spec.
So a JSON Schema of It's mostly, I want people to be aware that, if their schema is blocked from being used by AJV, it might be because of strict mode, which is a limitation enabled by default, and not part of the JSON Schema specification. |
In a direct message discussiong, Simon agreed it was OK for me to make an editorial comment on AJVs safe mode before publishing. |
I haven't rewritten the introduction as I think it's still appropriate in this context.
Follow-up tasks: