Open bbrala opened 3 years ago
ping @maartenpaauw @rocksheep
I think the result should be as per spec:
# Array of Pets
type: array
items:
$ref: '#/components/schemas/Pet'
Right not the it seems the data property is:
# Array of Pets
type: object
items:
$ref: '#/components/schemas/Pet'
Couldn't fix it unfortunately, got lost in the code. Any change you could have a look?
I tried to reproduce this bug, but in the implementation, the HasMany
relationship between Post
and Comment
works as expected and produces
{
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/resources.posts.relationship.comments.fetch"
}
}
}
Can you provide more context to the problem?
Check the related pr it proves the bug :)
I'm a bit blind this morning, yes for the request bodies this was a real bug. But it should be fixed now, you can try it out with your branch for #13!
HasMany::make('answers', 'answers')->type('concession-answers'),
results in
but should be