-
Catch assertions and value errors during the attribute cleaning cycle and send the messages back as a serialized 400 response to the client.
-
Removed deprecated
include
resource option for declaring attributes. -
Moved attributes out of
armet.resources
.armet.resources.*Attribute
becomesarmet.attributes.*Attribute
. -
Facilitate properties defined for attributes:
-
read
(defaultTrue
) — attribute may be accessed directly (eg.GET /resource/attribute
orGET /resource/1/attribute
). Note that setting this toFalse
will still show the attribute in the body ofGET /resource
. Setinclude
toFalse
to hide it from the body. -
write
(defaultTrue
) — attribute may be modified through any operation (POST
,PUT
, orPATCH
on the body or directly). This can be set toTrue
,False
-
include
(defaultTrue
) — attribute is included in the response body. This can be set toTrue
,False
-
null
(default:True
) — attribute can accept anull
value. This is only checked (for obvious reasons) at modification operations and results in a validation error. This can be set toTrue
,False
-
required
(default:False
) — attribute must be present in the body. This is only checked (for obvious reasons) at modification operations and results in a validation error. This can be set toTrue
,False
-
collection
(default:False
) — attribute is to be treated as a collection. This means that the response body will always be at least an array of one and any operations (such as pagination) that are defined for collections are defined for it.
-
-
Added
name
parameter to attributes to override name in resource model (normally derived from the python name). -
Added simple path traversal for attributes (eg.
GET /path/attribute
orGET /path/slug/attribute
). -
Changed
slug
resource option to a string that maps to an existing attribute by their name.