@@ -164,13 +164,8 @@ properties. This is the default configuration in effect if you don't specify an
164164 value :
165165 strategy : scalars
166166 fields :
167- href :
168- enabled : false
169167 customData :
170168 strategy : scalars
171- fields :
172- href :
173- enabled : false
174169 groups :
175170 strategy : defined
176171 elements :
@@ -188,23 +183,18 @@ So what does this mean? You can summarize this in English as the following:
188183
189184 - all of the account's `scalar `_ (i.e. non object/collection) fields to be included, each as a JSON name/value pair.
190185
191- - However, I want specific overriding rules for the ``href ``, ``customData `` and ``groups `` fields. For these:
192-
193- - don't include the account's ``href `` field. My origin server(s) behind the gateway probably won't talk
194- directly with Stormpath and won't know what to do with that url, so exclude it
186+ - However, I want specific overriding rules for the ``customData `` and ``groups `` fields. For these:
195187
196188 - ``customData `` isn't a scalar, but I want it included anyway, so I'm going to define conversion rules for it
197- too. Those are :
189+ too. That is :
198190
199191 - Include any of the customData's scalar properties automatically
200192
201- - However, don't include the customData's ``href ``, since my origin server(s) won't know what to do with it.
202-
203193 - ``groups `` isn't a scalar (it's a ``GroupsCollection `` object), but I want it included anyway.
204194
205195 - However, in this case I want to include *only * fields that are explicitly *defined * in its ``fields ``
206196 list. (In this case, even though the strategy is ``defined ``, no actual ``fields `` have been specified.
207- This means that *no * fields on the ``GroupsCollection `` object itself, like 'size' and 'limit' will be
197+ This means that *no * fields on the ``GroupsCollection `` object itself, like 'href', ' size' and 'limit' will be
208198 included. We just want the collection's elements, described next.)
209199
210200 - The collection ``elements `` are enabled so I do want the elements in the collection.
@@ -221,6 +211,7 @@ bytes transmitted over the network, the actual value won't be pretty-printed):
221211.. code-block :: json
222212
223213 {
214+ "href" : " https://api.stormpath.com/v1/accounts/753veZGE2aIy64VnTrF5Ov" ,
224215 "username" : " tk421" ,
225216226217 "givenName" : " TK421" ,
@@ -233,20 +224,23 @@ bytes transmitted over the network, the actual value won't be pretty-printed):
233224 "passwordModifiedAt" : " 2016-12-15T19:58:55.000Z" ,
234225 "emailVerificationToken" : null ,
235226 "customData" : {
227+ "href" : " https://api.stormpath.com/v1/accounts/753veZGE2aIy64VnTrF5Ov/customData" ,
236228 "createdAt" : " 2016-12-15T19:58:55.272Z" ,
237229 "modifiedAt" :" 2016-12-15T19:59:23.729Z" ,
238230 "favoriteColor" : " Blaster Black"
239231 },
240232 "groups" : {
241233 "items" : [
242234 {
235+ "href" : " https://api.stormpath.com/v1/groups/4NQzRKj0qDq1wIg9M0jUfa" ,
243236 "name" : " dsguards" ,
244237 "description" : " Death Star Guards" ,
245238 "status" : " ENABLED" ,
246239 "createdAt" : " 2016-12-28T00:34:46.453Z" ,
247240 "modifiedAt" :" 2016-12-28T00:34:46.453Z"
248241 },
249242 {
243+ "href" : " https://api.stormpath.com/v1/groups/9fBEMQtvElx2Zn7a0ku1Dj" ,
250244 "name" : " troopers" ,
251245 "description" : " All stormtroopers" ,
252246 "status" : " ENABLED" ,
@@ -398,6 +392,23 @@ The ``enabled`` conversion property indicates if the field will be included in t
398392the value is ``false ``, that field will not be included at all in the output sent to the origin server. The default
399393value is ``true ``.
400394
395+ For example, the following config indicates that, although the general strategy is to include the user account's
396+ scalar fields, the ``href `` field is excluded/omitted from the output JSON entirely:
397+
398+ .. code-block :: yaml
399+ :emphasize-lines : 8-9
400+
401+ stormpath :
402+ zuul :
403+ account :
404+ header :
405+ value :
406+ strategy : scalars
407+ fields :
408+ href :
409+ enabled : false
410+
411+
401412 .. _object conversion field :
402413
403414``field ``
0 commit comments