danielgtaylor / danielgtaylor/aglio
enum has null values in JSON schema output
- Dominant language
- CoffeeScript
- Stars
- 4.7k
- Forks
- 471
- PR merge metrics
- No merged PRs in 30d
Description
Running aglio on [this file](https://github.com/danielgtaylor/aglio/files/518349/example.txt) produces a JSON schema for GET /notes like this:
```
{
"type": "array",
"items": {
"enum": [
null,
null
]
},
"$schema": "http://json-schema.org/draft-04/schema#"
}
```
Note the two nulls. `enum` in JSON schema can't accept subschemas, so `oneOf` should be generated instead, and the nulls should be replaced with the actual JSON subschemas.
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the output with the attached example.txt using aglio and inspect the JSON schema generation path for GET /notes. Done means the generated schema uses oneOf for subschemas and contains the actual JSON subschemas instead of null enum entries.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- coffeescript
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100