danielgtaylor / danielgtaylor/apisprout
apisprout is rejecting perfecly valid json references
- Dominant language
- Go
- Stars
- 719
- Forks
- 70
- PR merge metrics
- No merged PRs in 30d
Description
I have in my main spec document something like this:
```
components:
ListOfWidgets:
$ref: 'parts/widget/model.yaml#/ListOfWidgets`
Widget:
$ref: 'parts/widget/model.yaml#/Widget`
```
And `parts/widget/model.yaml` looks something like this:
```
ListOfWidgets:
type: array
items:
$ref: '#/Widget'
Widget:
properties:
id:
type: string
description:
type: string
```
apisprout rejects this because:
```
2019/05/31 14:37:49 expected prefix '#/components/schemas/' in URI '#/ListOfWidgets'
```
That seems unreasonable. apisprout should not be enforcing restrictions on the organization of documents. These are not schemas because the path includes `#/components/schemas`; they are schemas because they are included by reference in the `schemas` section of the specification.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.