forked from Mirrors/jsonapi
add documentation for primative custom types only
This commit is contained in:
parent
1947fea11f
commit
e22856db88
17
README.md
17
README.md
|
@ -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
|
### Errors
|
||||||
This package also implements support for JSON API compatible `errors` payloads using the following types.
|
This package also implements support for JSON API compatible `errors` payloads using the following types.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue