[
https://issues.apache.org/jira/browse/ISIS-1274?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15033257#comment-15033257
]
ASF subversion and git services commented on ISIS-1274:
-------------------------------------------------------
Commit 5f46ef13fa3b427a34e4ab48e4098fe6a1f26f98 in isis's branch
refs/heads/master from [~danhaywood]
[ https://git-wip-us.apache.org/repos/asf?p=isis.git;h=5f46ef1 ]
ISIS-1274: new simplified Accept header and corresponding returned content type
now more-or-less implemented.
For domain objects, domain object (parented) collections, and actions, can
specify an Accept header of 'application/json;profile="urn:org.apache.isis/v1"
This will generate a simplified representation, with the original RO v1.0
representation still available under a '$$ro' property
For collections and actions returning lists, a list is returned rather than a
map. The RO v1.0 representation is available as an object in this list, with a
single '$$ro' property.
The caller can distinguish whether a domain object or collection or list has
been returned by checking the Content-Type header. This uses a 'repr-type'
parameter to distinguish, so will take the values of either:
- domain object:
application/json;profile="urn:org.apache.isis/v1";repr-type="object"
- parented collection:
application/json;profile="urn:org.apache.isis/v1";repr-type="object-collection"
- standalone list (from action):
application/json;profile="urn:org.apache.isis/v1";repr-type="list"
In addition, the '$$ro' representation can be suppressed completely by using
the 'suppress' parameter for the Accept header, eg
application/json;profile="urn:org.apache.isis/v1";suppress="true"
> ContentNegotiationService for simplified representations for custom RO clients
> ------------------------------------------------------------------------------
>
> Key: ISIS-1274
> URL: https://issues.apache.org/jira/browse/ISIS-1274
> Project: Isis
> Issue Type: New Feature
> Components: Core
> Affects Versions: 1.10.0
> Reporter: Dan Haywood
> Assignee: Dan Haywood
> Fix For: 1.11.0
>
>
> based on a new Accept header value, specific to org.apache.isis
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)