rails json schema validation code example
Example 1: rails json schema validation
gem 'activerecord_json_validator'
Example 2: rails json schema validation
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema",
"properties": {
"city": { "type": "string" },
"country": { "type": "string" }
},
"required": ["country"]
}