cybertk / cybertk/csonschema

If $raw is used the other settings will be discarded

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

Description

Hi

I was attempting to do something as:

``` coffee
errors:
global: 'string'
$raw:
additionalProperties: true
```

But it compiled to:

``` json
{
"type": "object",
"properties": {
"message": {
"type": "string"
},
"errors": {
"additionalProperties": true
}
},
"required": [
"message",
"errors"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-04/schema"
}
```

If you notice there is no reference to the `global` property.

---

It's possible to make it work through the `properties` in the raw part, like:

``` coffee
errors:
$raw:
properties:
global: 'string'
additionalProperties: true
```

But it would be a _nice to have_ feature

😃

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.