Bug 1480316 - API Doc for content view publishing is wrong
Summary: API Doc for content view publishing is wrong
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: API - Content
Version: 6.1.8
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: 6.4.0
Assignee: Nagoor Shaik
QA Contact: Lukáš Hellebrandt
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-08-10 16:35 UTC by Christine Fouant
Modified: 2020-09-10 11:12 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1329748
Environment:
Last Closed: 2018-10-16 19:19:36 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 20471 0 None None None 2017-08-10 16:35:03 UTC

Comment 1 Satellite Program 2017-09-22 20:04:31 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/20471 has been resolved.

Comment 3 Lukáš Hellebrandt 2018-06-28 09:57:08 UTC
FailedQA on Sat 6.4 snap 9.

Type is "correctly" changed to numeric. However,

1) id is still marked as required although API doesn't require it

2) The value is ignored and value from URL is used.

Having this parameter doesn't make sense at all.

# curl -s -X POST -k -u admin:changeme -d '{"id":<NONEXISTENT_ID>}' https://intel-bakersville-01.khw.lab.eng.bos.redhat.com/katello/api/content_views/<ID>/publish --header "Content-Type:application/json"

=> Success (while the id specified by the argument doesn't even exist)

Tested with content view publishing, not sure what other entities and actions are affected

Comment 4 Justin Sherrill 2018-07-02 14:32:54 UTC
Lukas, i think this maybe a misunderstanding about how these things work, as this is a combination of how rails works and how our api docs are presented:

Any api that requires an id as part of the URL will always show that api as required.  Examine these apis:

 GET /api/architectures/:id 
 PUT /api/auth_source_ldaps/:id 
 POST /katello/api/capsules/:id/content/sync 

These are just 3 examples of the dozens to hundreds of examples in our api docs.  In all cases the id param is required, but it is only used from the URL.  If you specify it as part of a body, it is ignored. 

Given all of this, i do not see either 1) or 2) as a bug, but instead are working as designed.  If you still consider these a bug, then feel free to file a bz for the entire application, as it is fairly consistent across the application and not specific to the content view publish api docs.  

Does that sound reasonable?

Comment 5 Lukáš Hellebrandt 2018-07-12 12:02:08 UTC
Sounds reasonable. Verifying as the type is changed correctly.

Comment 6 Bryan Kearney 2018-10-16 19:19:36 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2018:2927


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