Enum AttrCapabilities
- Namespace
- JsonApiDotNetCore.Resources.Annotations
- Assembly
- JsonApiDotNetCore.Annotations.dll
Indicates what can be performed on an AttrAttribute.
[PublicAPI]
[Flags]
public enum AttrCapabilities
Fields
All = AllowView | AllowCreate | AllowChange | AllowFilter | AllowSort
AllowChange = 4
Whether or not PATCH requests can update the attribute value. Attempts to update when disabled will return an HTTP 422 response.
AllowCreate = 2
Whether or not POST requests can assign the attribute value. Attempts to assign when disabled will return an HTTP 422 response.
AllowFilter = 8
Whether or not the attribute can be filtered on. Attempts to use it in the
filter
query string parameter when disabled will return an HTTP 400 response.AllowSort = 16
Whether or not the attribute can be sorted on. Attempts to use it in the
sort
query string parameter when disabled will return an HTTP 400 response.AllowView = 1
Whether or not the attribute value 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 attribute is silently omitted.None = 0