restfulobjects / restfulobjects-spec

The Restful Objects specification defines a set of RESTful resources, and corresponding JSON representations, for accessing and manipulating a domain object model.
http://restfulobjects.org
73 stars 10 forks source link

Property choices indicator #2

Closed danhaywood closed 11 years ago

danhaywood commented 11 years ago

ver: 1.0.0 raised by: richardpawson

The object representation generally contains enough information to render an Edit view of an object - without the need to follow additional links. For example, we know if each property is disabled or not. However, there is no hint at the Object level that a given property has associated choices - so the client ends up having to pursue each property link to find out whether it has Choices and, if so, to retrieve them. We think that the property info held in the Object representation should indicate whether or not there are choices - so that the client only has to follow links for those properties, when rendering an edit mode.

We could provide this info easily as an extension, but I think that it should really be added to the spec, as an optional json-property.

danhaywood commented 11 years ago

Per discussion http://restfulobjects.codeplex.com/discussions/375771,

all that is needed is a flag in the object representation, eg "hasChoices".

danhaywood commented 11 years ago

Implemented in RO spec 1.1.0