Table of Contents

Class ResourceLinksAttribute

Namespace
JsonApiDotNetCore.Resources.Annotations
Assembly
JsonApiDotNetCore.Annotations.dll

When put on a resource class, overrides global configuration for which links to render.

[PublicAPI]
[AttributeUsage(AttributeTargets.Class|AttributeTargets.Struct)]
public sealed class ResourceLinksAttribute : Attribute
Inheritance
ResourceLinksAttribute
Inherited Members

Properties

Configures which links to write in the relationship-level links object for all relationships of this resource type. Defaults to NotConfigured, which falls back to RelationshipLinks in global options. This can be overruled per relationship by setting Links.

public LinkTypes RelationshipLinks { get; set; }

Property Value

LinkTypes

Configures which links to write in the resource-level links object for this resource type. Defaults to NotConfigured, which falls back to ResourceLinks in global options.

public LinkTypes ResourceLinks { get; set; }

Property Value

LinkTypes

Configures which links to write in the top-level links object for this resource type. Defaults to NotConfigured, which falls back to TopLevelLinks in global options.

public LinkTypes TopLevelLinks { get; set; }

Property Value

LinkTypes