Bug 976813 - submitting a resource with links in body fails to parse
Summary: submitting a resource with links in body fails to parse
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: REST
Version: 4.8
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: RHQ 4.9
Assignee: Heiko W. Rupp
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-21 14:11 UTC by Libor Zoubek
Modified: 2015-11-02 00:43 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-09-24 19:08:49 UTC
Embargoed:


Attachments (Terms of Use)

Description Libor Zoubek 2013-06-21 14:11:52 UTC
Description of problem: Our REST api has a little inconvenience. We add 'links' to response bodies (for example resource, alert def and almost everything else). This is good. But if a client wants to send such body back, server does not accept such object (with 'links' key)

This is inconvenient for clients, because they have to "clean up" a body from links

Version-Release number of selected component (if applicable):
RHQ 4.8-master

How reproducible: always

Consider auto-import discovery queue script:

resources = requests.get(endpoint+'resource?status=NEW').json()
for res in resources:
    res['status'] = 'committed'
    req = requests.put(endpoint+'resource/%d' % res['resourceId'],data=json.dumps(res))


Actual results: this code does not work, because in $res body are links, server refuses such resource.

Expected results: server should ignore links (or maybe any other unknown keys within resource body)

Comment 1 Heiko W. Rupp 2013-06-27 16:02:24 UTC
master a4b1412282bb4423cb7fbafc67ad8d03a6b08727

Comment 2 Heiko W. Rupp 2013-09-24 19:08:49 UTC
Bulk closing of RHQ 4.9 verified items


Note You need to log in before you can comment on or make changes to this bug.