danielgtaylor / danielgtaylor/aglio

Arrays in JSONSchema do not contain `items` field

Open
#243 5 comments 5 reactions 0 assignees View on GitHub
Dominant language
CoffeeScript
Stars
4.7k
Forks
471
PR merge metrics
No merged PRs in 30d

Description

Hey,

Using the example blueprint, with master (and overriding protagonist to version 1.3.0-dev.0), I'd expect the output JSONSchema to be the same as the [example render](http://htmlpreview.github.io/?https://raw.githubusercontent.com/danielgtaylor/aglio/blob/master/examples/default.html).

Right now, I get a discrepancy in the `200 Response` in the `GET /notes` endpoint.

**Expected:**

``` json
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "Unique identifier"
},
"title": {
"type": "string",
"description": "Single line description"
},
"body": {
"type": "string",
"description": "Full description of the note which supports Markdown."
}
},
"required": [
"id",
"title"
]
},
"$schema": "http://json-schema.org/draft-04/schema#"
}
```

**Actual:**

``` json
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array"
}
```

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.