add documentation for primative custom types only

This commit is contained in:
Sam Woodard 2018-10-11 09:08:03 -07:00
parent 1947fea11f
commit e22856db88
1 changed files with 17 additions and 0 deletions

View File

@ -343,6 +343,23 @@ func (post Post) JSONAPIRelationshipMeta(relation string) *Meta {
}
```
### Custom types
Custom types are supported for primitive types, only, as attributes. Examples,
```go
type CustomIntType int
type CustomFloatType float64
type CustomStringType string
```
Types like following are not supported, but may be in the future:
```go
type CustomMapType map[string]interface{}
type CustomSliceMapType []map[string]interface{}
```
### Errors
This package also implements support for JSON API compatible `errors` payloads using the following types.