-
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
includeresource option for declaring attributes. -
Moved attributes out of
armet.resources.armet.resources.*Attributebecomesarmet.attributes.*Attribute. -
Facilitate properties defined for attributes:
-
read(defaultTrue) — attribute may be accessed directly (eg.GET /resource/attributeorGET /resource/1/attribute). Note that setting this toFalsewill still show the attribute in the body ofGET /resource. SetincludetoFalseto hide it from the body. -
write(defaultTrue) — attribute may be modified through any operation (POST,PUT, orPATCHon 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 anullvalue. 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
nameparameter to attributes to override name in resource model (normally derived from the python name). -
Added simple path traversal for attributes (eg.
GET /path/attributeorGET /path/slug/attribute). -
Changed
slugresource option to a string that maps to an existing attribute by their name.