Giter Club home page Giter Club logo

bender's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

bender's Issues

Add SPM support

Swift Package Manager might become mainstream to manage 3rd party dependencies and it would be better to add support for Bender

Reference cycle for nested recursive structures

According to README there is reference cycle between an item rule and an array rule for nested structures. It might be better to provide new way to validate recursive structures without memory leaks.
screen shot 2018-11-08 at 3 33 11 pm

Supporting of combining schemas

JSON Schema includes a few keywords for combining schemas together. There are special operators for it: 'allOf', 'anyOf', 'oneOf'. Need to add the similar features to Bender.

Nontrivial behavior of using optional parameters with proxy rules.

There is an json object with "bottomLevelKey" = null.
Actual behavior of validation using testRule described below: validation fails.
Expected behavior: validation finishes successfully because testRule contains only .optional parameters.
let testRule = ClassRule(YourModel()).optional("topLevelKey", rule(StringRule, atPath: "bottomLevelKey")) { $0.value = $1 }

Supporting all aspects of JSON schema specification.

According to http://json-schema.org/latest/json-schema-validation.html there is the list of used validation categories for JSON (already supported items are marked โœ”):

  • validation of string instances;
  • validation of numeric instances;
  • regular expressions and patterns;
  • default values for missing keywords;
  • validation of container instances;
  • validation keywords sorted by instance types;
  • multiplyOf;
  • maximum and exclusiveMaximum (for numeric items);
  • minimum and exclusiveMinimum (for numeric items);
  • maxLength and minLength (for stringified items);
  • maxItems and minItems (for arrays);
  • maxProperties and minProperties (for dictionaries);
  • uniqueItems;
  • required;
  • enum;
  • type;
  • allOf;
  • anyOf;
  • oneOf;
  • not;
  • definitions;
  • additionalProperties, properties and patternProperties;
  • date-time;
  • email;
  • hostname / ipv4 / ipv6 / uri /

Bender may support all of them by default. If something cannot be added into framework for any reasons need to implement examples of its usage.

Swift 5.1

Please add support of the Swift 5.1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.