Skip to content

Commit b8e628d

Browse files
committed
docs: add extra comment
1 parent f5d0e8f commit b8e628d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/JsonApiDotNetCore/QueryParameterServices/SparseFieldsService.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,11 @@ public List<AttrAttribute> Get(RelationshipAttribute relationship = null)
3939
_selectedRelationshipFields.TryGetValue(relationship, out var fields);
4040
return fields;
4141
}
42-
4342

4443
/// <inheritdoc/>
4544
public virtual void Parse(KeyValuePair<string, StringValues> queryParameter)
4645
{ // expected: articles?fields=prop1,prop2
47-
// articles?fields[articles]=prop1,prop2
46+
// articles?fields[articles]=prop1,prop2 <-- this form in invalid UNLESS "articles" is actually a relationship on Article
4847
// articles?fields[relationship]=prop1,prop2
4948
var fields = new List<string> { nameof(Identifiable.Id) };
5049
fields.AddRange(((string)queryParameter.Value).Split(QueryConstants.COMMA));

0 commit comments

Comments
 (0)