Table of Contents

Enum HasManyCapabilities

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

Indicates what can be performed on a HasManyAttribute.

[PublicAPI]
[Flags]
public enum HasManyCapabilities

Fields

All = AllowView | AllowInclude | AllowFilter | AllowSet | AllowAdd | AllowRemove
AllowAdd = 16

Whether or not POST requests can add to the to-many relationship. Attempts to add when disabled will return an HTTP 422 response.

AllowFilter = 4

Whether or not the to-many relationship can be used in the count() and has() functions as part of the filter query string parameter. Attempts to use it when disabled will return an HTTP 400 response.

AllowInclude = 2

Whether or not the relationship can be included. Attempts to use it in the include query string parameter when disabled will return an HTTP 400 response.

AllowRemove = 32

Whether or not DELETE requests can remove from the to-many relationship. Attempts to remove when disabled will return an HTTP 422 response.

AllowSet = 8

Whether or not POST and PATCH requests can replace the relationship. Attempts to replace when disabled will return an HTTP 422 response.

AllowView = 1

Whether or not the relationship can be returned in responses. Attempts to explicitly request it via the fields query string parameter when disabled will return an HTTP 400 response. Otherwise, the relationship (and its related resources, when included) are silently omitted.

None = 0