danielgtaylor / danielgtaylor/eidolon
(default) gets converted to null
- Dominant language
- CoffeeScript
- Stars
- 6
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
Small reproducible test case:
``` js
const protagonist = require('protagonist');
const eidolon = require('eidolon');
const apib = `
# Data structures
## Foobar (object)
+ foo (enum)
+ bar (default)
+ baz
`;
protagonist.parse(apib, (errors, result) => {
const dataStructure = result.content[0].content[0].content[0].content[0];
const schema = eidolon.schema(dataStructure, {});
console.log(
JSON.stringify(schema, null, 4)
);
});
```
This yields:
``` json
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"foo": {
"enum": [
null,
"baz"
]
}
}
}
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.