Comments (3)
Released in 2.0.0. Schema keys are deep-stringified to support symbols.
Note: symbol values are not supported (eg, type: :object
above).
from json_schemer.
Have you got an example for what this trips up on?
from json_schemer.
Have you got an example for what this trips up on? @jamietanna
For example, Using activerecord_json_validator
and passing a schema with symbolized keys like this :
validates :data, presence: false, json: { message: ->(errors) { errors }, schema: { type: :object } }
Raise this error :
JSONSchemer::InvalidSymbolKey (schemas must use string keys)
But like this
validates :data, presence: false, json: { message: ->(errors) { errors }, schema: { "type" => :object } }
Works fine
Refs:
from json_schemer.
Related Issues (20)
- Ecma 262 Validation for patterns HOT 1
- URI Escaping Error HOT 3
- tab space in json message validation fails HOT 2
- Type array validation always returning false with extra options
- array not required returns the message: "1 item required; only 0 were given" in the json schema HOT 2
- Add support for Draft 2020-12 HOT 1
- Can the gem put some short and readable validation result? HOT 4
- JSON pointers: "/" and "~" are not escaped HOT 1
- Non-string data keys HOT 10
- Regression in ref resolution for local nesting HOT 3
- Parse and resolve schema `$ref`s w/out validating HOT 6
- Introduce optional callbacks for validating non-built-in contentType, contentEncoding, format HOT 8
- Include JSONSchemaTestSuite as git submodule HOT 3
- en HOT 1
- Challege 1.1 HOT 1
- Challege 1.1
- Join forces with voxpupuli/json-schema HOT 3
- Improve pretty error messages when schema composition constraints are violated HOT 10
- Use discriminator in json-schemas (not openAPI) for better error messaging? HOT 8
- Local Refs not resolving properly HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from json_schemer.