You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixed: Global options not respected in relationship links rendering (#946)
* Bugfix: relationship links were rendered for ToMany relationships, even when explicitly turned off in global options (and not configured on the relationship itself).
* Added tests and clarified documentation. Removed verification logic in value setters because this is a flags enum, so the checks were incorrect. For example, you are not allowed to pass `Links.Paging`, but are allowed to pass `Links.Related | Links.Paging` or `Links.All`, which all mean "include paging in the set of links".
@@ -154,13 +141,13 @@ public interface IJsonApiOptions
154
141
boolEnableLegacyFilterNotation{get;}
155
142
156
143
/// <summary>
157
-
/// Determines whether the <see cref="JsonSerializerSettings.NullValueHandling"/> serialization setting can be overridden by using a query string parameter.
144
+
/// Determines whether the <see cref="JsonSerializerSettings.NullValueHandling"/> serialization setting can be controlled using a query string parameter.
/// Determines whether the <see cref="JsonSerializerSettings.DefaultValueHandling"/> serialization setting can be overridden by using a query string parameter.
150
+
/// Determines whether the <see cref="JsonSerializerSettings.DefaultValueHandling"/> serialization setting can be controlled using a query string parameter.
/// Used to expose a property on a resource class as a JSON:API to-many relationship (https://jsonapi.org/format/#document-resource-object-relationships).
7
7
/// </summary>
8
+
/// <example>
9
+
/// <code><![CDATA[
10
+
/// public class Author : Identifiable
11
+
/// {
12
+
/// [HasMany(PublicName = "articles")]
13
+
/// public List<Article> Articles { get; set; }
14
+
/// }
15
+
/// ]]></code>
16
+
/// </example>
8
17
[AttributeUsage(AttributeTargets.Property)]
9
18
publicclassHasManyAttribute:RelationshipAttribute
10
19
{
11
-
/// <summary>
12
-
/// Creates a HasMany relational link to another resource.
0 commit comments