/
warnings.go
30 lines (26 loc) · 1.39 KB
/
warnings.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package jsonapivalidator
import "errors"
var (
// WarnAttributesObjectFK is the warning produced when FKs may have been
// detected in the attributes object
WarnAttributesObjectFK = errors.New("Although has-one foreign keys (e.g. author_id) " +
"are often stored internally alongside other information to be " +
"represented in a resource object, these keys SHOULD NOT appear as " +
"attributes.")
// WarnAttributesObjectHasRelationshipsMember is the warning produced when a
// relationships member name has been detected anywhere in the attributes
// object
WarnAttributesObjectHasRelationshipsMember = errors.New("Complex data " +
"structures involving JSON objects and arrays are allowed as attribute " +
"values. However, any object that constitutes or is contained in an " +
"attribute MUST NOT contain a relationships member, as it has been " +
"reserved by this specification for future use.")
// WarnAttributesObjectHasLinksMember is the warning produced when a
// relationships member name has been detected anywhere in the attributes
// object
WarnAttributesObjectHasLinksMember = errors.New("Complex data " +
"structures involving JSON objects and arrays are allowed as attribute " +
"values. However, any object that constitutes or is contained in an " +
"attribute MUST NOT contain a links member, as it has been " +
"reserved by this specification for future use.")
)