We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f5d0e8f commit b8e628dCopy full SHA for b8e628d
src/JsonApiDotNetCore/QueryParameterServices/SparseFieldsService.cs
@@ -39,12 +39,11 @@ public List<AttrAttribute> Get(RelationshipAttribute relationship = null)
39
_selectedRelationshipFields.TryGetValue(relationship, out var fields);
40
return fields;
41
}
42
-
43
44
/// <inheritdoc/>
45
public virtual void Parse(KeyValuePair<string, StringValues> queryParameter)
46
{ // expected: articles?fields=prop1,prop2
47
- // articles?fields[articles]=prop1,prop2
+ // articles?fields[articles]=prop1,prop2 <-- this form in invalid UNLESS "articles" is actually a relationship on Article
48
// articles?fields[relationship]=prop1,prop2
49
var fields = new List<string> { nameof(Identifiable.Id) };
50
fields.AddRange(((string)queryParameter.Value).Split(QueryConstants.COMMA));
0 commit comments