Comments (2)
The santization you're trying to do needs to be performed before schema evaluation. JSON Schema evaluation absolutely should not modify the instance.
As far as getting a keyword to run before another.... I don't think I have a solution for that. [DependsOnAnnotationsFrom]
instructs a keyword to run after another.
What you could do is subclass MinKeyword
and MaxKeyword
and apply the attribute on the subclasses. When you register the keywords, they'll override the default ones. (You'll need to provide converters as well.)
from json-everything.
I agree, the santizing has to be done before schema evaluation. However, in our case we're using json schema to first detect the used schema, to know what properties we need to sanitize.
We've implemented it in another way, only annotating the fields with the sanitizers that need to run for the field. Our system now first evaluates the jsonschema to detect sanitizers, apply the sanitizers and afterwards evaluate the schema again to see if sanitizing the values did not break the patterns or min/max length constraints.
Thanks for your input!
from json-everything.
Related Issues (20)
- How to export or save JsonSchema to plaintext? HOT 4
- How to write a JsonSchemaBuilder for a class that has a property of a class? HOT 4
- Schema generation doesn't work on site HOT 1
- maximum/minimum use decimal which do not parse certain many double "number" strings HOT 3
- `Json.Schema.JsonSchema.Evaluate` throws "`System.OverflowException`: Value was either too large or too small for a Decimal." HOT 4
- Get json data from only required properties based on the attributes set HOT 5
- Schema validation crashes with stack overflow HOT 12
- Patch Path Not Escaping Forward Slash HOT 6
- EvaluationResults default value shows up in Annotations when number out or range, but not on other situations HOT 3
- Performance vs Newtonsoft.Json.Schema HOT 6
- Pattern and PatternProperties keyword performance and security improvements HOT 3
- Schema validation doesn't fill EvaluationResults with any Errors for anyOf HOT 3
- ValidateMetaSchema option not working
- Why is NullableAttribute needed for nullable properties HOT 3
- Peformance issue with certain type of schema HOT 6
- XML comment generation doesn't work beyond the first level of nesting HOT 8
- Referencing Known Schema-Type Mappings during Schema Generation HOT 5
- Incorrect Definition Name in secondary classes HOT 2
- Handling `description` on type vs on property HOT 1
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-everything.