cybertk / cybertk/csonschema

$schema is the last key in the compiled jsonschema

Open
#1 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
CoffeeScript
Stars
8
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Given a csonschema like this

``` coffeescript
name: 'string'
phone_no: 'phoneNumber'
email: 'email'
password: 'string'
verification_code: 'verificationCode'

$required: 'password'
```

will compiled into

``` json
{
"type": "object",
"properties": {
"name": {
"type": "string"
},
"phone_no": {
"type": "string"
},
"email": {
"type": "string",
"format": "email"
},
"password": {
"type": "string"
},
"verification_code": {
"type": "number"
}
},
"required": [
"password"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-04/schema"
}
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.