thephpleague / json-guard

Validation of json-schema.org compliant schemas.
http://json-guard.thephpleague.com/
MIT License
175 stars 26 forks source link

Expand docs on json-reference requirement #133

Closed adamquaile closed 6 years ago

adamquaile commented 6 years ago

It's stated in https://github.com/thephpleague/json-guard/blob/master/docs/simple-example.md that json-reference is only required if you're using references, but the only usage example here does. At least for me this is the first page I go to to remind myself how to set everything up.

I'm sure this is the most common usage and most people will want to install this dependency anyway, but would it be worth adding a usage example without the optional dependency? Perhaps with a link to the overview where it would be explained in more depth.

Also, perhaps adding a composer suggest to remind people of the extra dependency and its name at install time would be helpful..?

Thanks!

matt-allan commented 6 years ago

Not sure, maybe swap the examples from http://json-guard.thephpleague.com/validation/overview and http://json-guard.thephpleague.com/simple-example?

I chose the example with references for the introduction because most users are just using swagger or json-schema and as a result are probably using references.

A suggest would be a great addition.

matt-allan commented 6 years ago

Hi @adamquaile,

Thanks for the suggestions. I Updated the docs and added the suggest to composer.json.