Skip to content

Use relationships as navigations in sparse field queries#584

Merged
wisepotato merged 4 commits into
dev-v4from
fix/sparse-field-navigation
Oct 22, 2019
Merged

Use relationships as navigations in sparse field queries#584
wisepotato merged 4 commits into
dev-v4from
fix/sparse-field-navigation

Conversation

@maurei

@maurei maurei commented Oct 17, 2019

Copy link
Copy Markdown
Member

This PR makes the sparse field selection syntax consistent. Only articles?fields[ RELATIONHIP_PATH ] is now allowed. See #583.

When the old syntax is used, eg articles?fields[articles]=title, a constructive error message is generated: Should be "articles?fields=title".

Closes #583

Comment thread test/UnitTests/QueryParameters/SparseFieldsServiceTests.cs
Comment thread src/JsonApiDotNetCore/QueryParameterServices/SparseFieldsService.cs
Comment thread src/JsonApiDotNetCore/QueryParameterServices/SparseFieldsService.cs
Comment thread src/JsonApiDotNetCore/QueryParameterServices/SparseFieldsService.cs
Comment thread test/UnitTests/QueryParameters/SparseFieldsServiceTests.cs Outdated
@wisepotato wisepotato merged commit 928ac1e into dev-v4 Oct 22, 2019
@wisepotato wisepotato deleted the fix/sparse-field-navigation branch October 22, 2019 14:11
@maurei maurei mentioned this pull request Oct 23, 2019
14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants