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 | AllowSetAllowInclude = 2Whether or not the relationship can be included. Attempts to use it in the
includequery string parameter when disabled will return an HTTP 400 response.AllowSet = 4Whether or not POST and PATCH requests can replace the relationship. Attempts to replace when disabled will return an HTTP 422 response.
AllowView = 1Whether or not the relationship can be returned in responses. Attempts to explicitly request it via the
fieldsquery string parameter when disabled will return an HTTP 400 response. Otherwise, the relationship (and its related resources, when included) are silently omitted.None = 0