<commit_before># Ember-cli-json-schema

[![Build Status](https://travis-ci.org/southpolesteve/ember-cli-json-schema.svg?branch=master)](https://travis-ci.org/southpolesteve/ember-cli-json-schema)

WARNING: This is still very much a work in progress. It does not yet fully implement the json-schema spec and is missing many critical features. I am currently working directly against master so expect breaking changes at any moment.

## Description

`ember-cli-json-schema` is provides a service that can load json schemas, create objects from schemas, and validate those objects. This addon will inject a `schema` service into your routes that can be used to preform these operations.

## Usage

``` javascript

var schema = {
  "title": "Person",
  "type": "object",
  "properties": {
    "firstName": {
      "type": "string"
    },
    "lastName": {
      "type": "string"
    },
    "age": {
      "description": "Age in years",
      "type": "integer"
    }
  },
  "required": ["firstName", "lastName"]
}

export default Ember.Route.extend({
  model: function(){
    this.schema.load('Person', schema );
    var model = this.schema.createObject('Person');
    return model;
  }
})

```


## Installation

* `git clone` this repository
* `npm install`
* `bower install`<commit_msg>Remove ugly quotes<commit_after># Ember-cli-json-schema

[![Build Status](https://travis-ci.org/southpolesteve/ember-cli-json-schema.svg?branch=master)](https://travis-ci.org/southpolesteve/ember-cli-json-schema)

WARNING: This is still very much a work in progress. It does not yet fully implement the json-schema spec and is missing many critical features. I am currently working directly against master so expect breaking changes at any moment.

## Description

`ember-cli-json-schema` is provides a service that can load json schemas, create objects from schemas, and validate those objects. This addon will inject a `schema` service into your routes that can be used to preform these operations.

## Usage

``` javascript

var schema = {
  title: "Person",
  type: "object",
  properties: {
    "firstName": {
      type: "string"
    },
    "lastName": {
      type: "string"
    },
    "age": {
      description: "Age in years",
      type: "integer"
    }
  },
  required: ["firstName", "lastName"]
}

export default Ember.Route.extend({
  model: function(){
    this.schema.load('Person', schema );
    var model = this.schema.createObject('Person');
    return model;
  }
})

```


## Installation

* `git clone` this repository
* `npm install`
* `bower install`
{'fraction_non_alphanumeric': 0.12905748924520924, 'fraction_numerical': 0.0, 'mean_word_length': 3.693577981651376, 'pattern_counts': {'":': 14, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '432739', 'n_tokens_mistral': 779, 'n_tokens_neox': 760, 'n_words': 253}