Skip to content

AllowedIncludesAttribute

class in JsonApiToolkit.Attributes

Restricts which relationships can be included in responses. Returns 403 Forbidden if requested includes don't match the allowlist.

public class AllowedIncludesAttribute

Constructors

AllowedIncludesAttribute(allowedIncludes: String[])

Initializes a new instance with the specified allowed include patterns.

Parameters - allowedIncludes: Include patterns to allow (supports wildcards).

Properties

AllowedIncludes : String[]

Gets the allowed include patterns.

Methods

OnActionExecuting(context: ActionExecutingContext)

: void

Validates requested includes and filter paths against the allowed patterns.

Parameters - context