Re:Everything old is new again: Microservices
by _asummers on Wednesday May 09, 2018 @08:51AM
(#17029371)
> It's far better than JSON schema anyway since you can enforce whatever custom validation you like.
IMO, the value of JSON Schema isn't that you have no validation that exists outside of JSON Schema, the value is that you can front load a TON of the validation into it, and share that vocabulary between your services. If you publish a JSON Schema about your endpoint, I can read that or feed it into tooling to produce a form to consume it. As someone working on the Elixir JSON Schema lib currently, the places where we COULDN'T express the validation with JSON Schema were often more interesting.
IMO, the value of JSON Schema isn't that you have no validation that exists outside of JSON Schema, the value is that you can front load a TON of the validation into it, and share that vocabulary between your services. If you publish a JSON Schema about your endpoint, I can read that or feed it into tooling to produce a form to consume it. As someone working on the Elixir JSON Schema lib currently, the places where we COULDN'T express the validation with JSON Schema were often more interesting.