Bug 1115836 - syntax error in content_view_filter API docs causes apipie:cache warnings
Summary: syntax error in content_view_filter API docs causes apipie:cache warnings
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: API
Version: Nightly
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: Unspecified
Assignee: Martin Bacovsky
QA Contact: sthirugn@redhat.com
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-03 08:45 UTC by Martin Bacovsky
Modified: 2019-09-26 18:10 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-09-11 12:29:41 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 6480 0 None None None 2016-04-22 16:50:03 UTC

Description Martin Bacovsky 2014-07-03 08:45:08 UTC
Description of problem:

rake apipie:cache produces following warnings 

 ___________________________________________________________________________
| Maruku tells you:
+---------------------------------------------------------------------------
| Could not find ref_id = "security, bugfix, enhancement" for md_link([
|       md_entity("lsquo"),
|       "security",
|       md_entity("rsquo"),
|       ", ",
|       md_entity("lsquo"),
|       "bugfix",
|       md_entity("rsquo"),
|       ", ",
|       md_entity("lsquo"),
|       "enhancement",
|       md_entity("rsquo")
| ], nil)
| Available refs are []
+---------------------------------------------------------------------------
!/home/mbacovsk/.gem/ruby/gems/maruku-0.7.1/lib/maruku/output/to_html.rb:656:in `to_html_link'
!/home/mbacovsk/.gem/ruby/gems/maruku-0.7.1/lib/maruku/output/to_html.rb:891:in `block in array_to_html'
!/home/mbacovsk/.gem/ruby/gems/maruku-0.7.1/lib/maruku/output/to_html.rb:879:in `each'
!/home/mbacovsk/.gem/ruby/gems/maruku-0.7.1/lib/maruku/output/to_html.rb:879:in `array_to_html'
\___________________________________________________________________________

Not creating a link for ref_id = "security, bugfix, enhancement".

The cause for this is syntax error in API docs


Version-Release number of selected component (if applicable):
Nightly

How reproducible:
Always

Steps to Reproduce:
1. run apipie:cache
2.
3.

Actual results:
warnings

Expected results:
no warnings

Additional info:
diff --git a/app/controllers/katello/api/v2/content_view_filters_controller.rb b/app/controllers/katello/api/v2/content_view_filters_controller.rb
index 961e679..28bfe22 100644
--- a/app/controllers/katello/api/v2/content_view_filters_controller.rb
+++ b/app/controllers/katello/api/v2/content_view_filters_controller.rb
@@ -84,7 +84,7 @@ class Api::V2::ContentViewFiltersController < Api::V2::ApiController
       N_("Get errata that are available to be added to the filter")
   param :content_view_id, :identifier, :desc => N_("content view identifier")
   param :id, :identifier, :desc => N_("filter identifier"), :required => true
-  param :types, Array, :desc => N_("Errata types array ['security', 'bugfix', 'enhancement']")
+  param :types, Array, :desc => N_("Errata types array \\['security', 'bugfix', 'enhancement'\\]")
   param :start_date, DateTime, :desc => N_("Start date that Errata was issued on to filter by")
   param :end_date, DateTime, :desc => N_("End date that Errata was issued on to filter by")
   def available_errata
[

Comment 2 Martin Bacovsky 2014-07-03 09:00:06 UTC
Created redmine issue http://projects.theforeman.org/issues/6480 from this bug

Comment 3 Bryan Kearney 2014-07-07 16:05:51 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/6480 has been closed

Comment 5 sthirugn@redhat.com 2014-09-04 16:32:58 UTC
Verified. I am not very sure what the issue creator is intending to fix.  But I validated that the API commands work fine (see below) with 'bugfix' or 'security' or 'enhancement' type searches. Please open new bugs with more info if necessary.

# curl -X GET -H "Accept:application/json" -H "Content-Type: application/json" -u admin:changeme --insecure -d '{"id":"17","types":["security"]}' https://sat6box/katello/api/v2/content_view_filters/17/available_errata

# curl -X GET -H "Accept:application/json" -H "Content-Type: application/json" -u admin:changeme --insecure -d '{"id":"17","types":["bugfix"]}' https://sat6box/katello/api/v2/content_view_filters/17/available_errata

# curl -X GET -H "Accept:application/json" -H "Content-Type: application/json" -u admin:changeme --insecure -d '{"id":"17","types":["enhancement"]}' https://sat6box/katello/api/v2/content_view_filters/17/available_errata

# curl -X GET -H "Accept:application/json" -H "Content-Type: application/json" -u admin:changeme --insecure -d '{"id":"17","types":["bugfix","security","enhancement"]}' https://sat6box/katello/api/v2/content_view_filters/17/available_errata

Version Tested:
GA Snap 7 - Satellite-6.0.4-RHEL-6-20140829.0

* apr-util-ldap-1.3.9-3.el6_0.1.x86_64
* candlepin-0.9.23-1.el6_5.noarch
* candlepin-common-1.0.1-1.el6_5.noarch
* candlepin-scl-1-5.el6_4.noarch
* candlepin-scl-quartz-2.1.5-5.el6_4.noarch
* candlepin-scl-rhino-1.7R3-1.el6_4.noarch
* candlepin-scl-runtime-1-5.el6_4.noarch
* candlepin-selinux-0.9.23-1.el6_5.noarch
* candlepin-tomcat6-0.9.23-1.el6_5.noarch
* elasticsearch-0.90.10-6.el6sat.noarch
* foreman-1.6.0.42-1.el6sat.noarch
* foreman-compute-1.6.0.42-1.el6sat.noarch
* foreman-gce-1.6.0.42-1.el6sat.noarch
* foreman-libvirt-1.6.0.42-1.el6sat.noarch
* foreman-ovirt-1.6.0.42-1.el6sat.noarch
* foreman-postgresql-1.6.0.42-1.el6sat.noarch
* foreman-proxy-1.6.0.30-1.el6sat.noarch
* foreman-selinux-1.6.0.14-1.el6sat.noarch
* foreman-vmware-1.6.0.42-1.el6sat.noarch
* katello-1.5.0-30.el6sat.noarch
* katello-ca-1.0-1.noarch
* katello-certs-tools-1.5.6-1.el6sat.noarch
* katello-installer-0.0.62-1.el6sat.noarch
* openldap-2.4.23-34.el6_5.1.x86_64
* openldap-devel-2.4.23-34.el6_5.1.x86_64
* pulp-katello-0.3-4.el6sat.noarch
* pulp-nodes-common-2.4.1-0.5.rc1.el6sat.noarch
* pulp-nodes-parent-2.4.1-0.5.rc1.el6sat.noarch
* pulp-puppet-plugins-2.4.1-0.5.rc1.el6sat.noarch
* pulp-puppet-tools-2.4.1-0.5.rc1.el6sat.noarch
* pulp-rpm-plugins-2.4.1-0.5.rc1.el6sat.noarch
* pulp-selinux-2.4.1-0.5.rc1.el6sat.noarch
* pulp-server-2.4.1-0.5.rc1.el6sat.noarch
* python-ldap-2.3.10-1.el6.x86_64
* ruby193-rubygem-net-ldap-0.3.1-3.el6sat.noarch
* ruby193-rubygem-runcible-1.1.0-2.el6sat.noarch

Comment 6 Bryan Kearney 2014-09-11 12:29:41 UTC
This was delivered with Satellite 6.0 which was released on 10 September 2014.


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