Enum HasOneCapabilities
- Namespace
- JsonApiDotNetCore.Resources.Annotations
- Assembly
- JsonApiDotNetCore.Annotations.dll
Indicates what can be performed on a HasOneAttribute.
[PublicAPI]
[Flags]
public enum HasOneCapabilities
Fields
All = AllowView | AllowInclude | AllowSet
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.AllowSet = 4
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