macisamuele / jsonschema-equivalent Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Integrate https://github.com/json-schema-org/JSON-Schema-Test-Suite tests run by one of the rust validators (valico, jsonschema-valid or jsonschema) before and after optimisation to ensure that we're not altering the schema.
If you're reading this please help me valiate the the assumption as the reported equivalences will most probably be translated in rules that the tool will run
The table is not considered to be fully-inclusive of all the possible cases, these were the results of a few hours digging.
NOTE: Few of them might be simple to implement, others might be more involved.
Done | Before | After |
---|---|---|
✅ | {"allOf":[{"maximum": 2}, {"minimum": 1}]} |
{"maximum": 2, "minimum": 1} |
✅ | {"allOf":[{"type": "number"}, {"type": "string"}]} |
false |
✅ | {"allOf":[{"type": "number"}], "type": "object"} |
false |
✅ | {"allOf": [false]} |
false |
❌ | {"allOf": [{"type": "number", "maximum": 1, "minmum": 2}]} |
false |
❌ | {"anyOf": [true]} |
true |
❌ | {"anyOf": [true], "type": "number"} |
{"type": "number"} |
✅ | {"type": "number", "const": "value"} |
false |
✅ | {"type": "number", "enum": [1, 2, "3"]} |
{"type": "number", "enum": [1, 2]} |
❌ | {"enum": []} |
false |
❌ | {"type": "number", "minimum": 2, "maximum": 6, "enum": [2, 4, 6]} |
{"type": "number", "minimum": 2, "maximum": 6, "multipleOf": 2} |
❌ | {"type": ["number", "string"], "not": {"type": "string"}} |
{"type": "number"} |
❌ | {"type": "number", "not": {"maximum": 1}} |
{"type": "number", "minimum": 1} |
❌ | {"oneOf": [{"type": "number"}, {"type": "number"}]} |
false |
✅ | {"type": ["array", "boolean", "integer", "null", "number", "object", "string"]} |
true |
✅ | {"type": ["array", "boolean", "null", "number", "object", "string"]} |
true |
✅ | {"if": {"type": "string"}, "then": true, "else": {"type": "string"}} |
{"if": {"type": "string"}, "else": {"type": "string"}} |
✅ | {"if": {"type": "string"}, "then": {"type": "string"}, "else": true} |
{"if": {"type": "string"}, "then": {"type": "string"}} |
✅ | {"type": "number", "if": {"type": "string"}, "then": true, "else": true} |
{"type": "number"} |
❌ | {"type": "number", "if": {"type": "string"}, "then": false, "else": false} |
false |
❌ | {"type": "number", "if": {"type": "string"}, "then": {"minimum": 2, "multipleOf": 4}, "else": {"minimum": 3, "multipleOf": 4}} |
{"type": "number", "multipleOf": 4, "if": {"type": "string"}, "then": {"minimum": 2}, "else": {"minimum": 3}} |
❌ | {"type": "number", "minimum": 3, "multipleOf": 10} |
{"type": "number", "minimum": 10, "multipleOf": 10} |
❌ | {"type": "number", "minimum": 2, "maximum": 4, "multipleOf": 3} |
{"type": "number", "const": 3} |
net2
crate has been deprecated; usesocket2
instead
Details | |
---|---|
Status | unmaintained |
Package | net2 |
Version | 0.2.34 |
URL | deprecrated/net2-rs@3350e38 |
Date | 2020-05-01 |
The net2
crate has been deprecated
and users are encouraged to considered socket2
instead.
See advisory page for additional details.
The tool might benefit from two helpers (which might be very tedious to implement)
allOf
does)anyOf
does)A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.