catalog/packages/<package_id>/ui does not return json

Bug #1476543 reported by noa
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Murano
Fix Released
High
Lin Yang

Bug Description

when using the API call "catalog/packages/<package_id>/ui" using "accept" header of "application/json",

the response does not return in a JSON format, instead it returns a YAML format, and reports the type "text/html".

Tags: api
Lin Yang (lin-a-yang)
Changed in murano:
assignee: nobody → Lin Yang (lin-a-yang)
Changed in murano:
status: New → Confirmed
importance: Undecided → High
milestone: none → liberty-3
tags: added: api
Lin Yang (lin-a-yang)
Changed in murano:
status: Confirmed → In Progress
Revision history for this message
Lin Yang (lin-a-yang) wrote :

Current Content-Type is set to application/octet-stream, https://github.com/openstack/murano/blob/master/doc/source/specification/murano-repository.rst#get-ui-definition. Do we need to change it to application/json? Any comments will be appreciated.

Revision history for this message
noa (noa-koffman) wrote :

Hi,
in my opinion the Content-Type should match the "accapt" header of the request,
so in case the header is "application/json" then this should be the content type.

Revision history for this message
noa (noa-koffman) wrote :

sorry "accept" not "accapt"

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to murano (master)

Fix proposed to branch: master
Review: https://review.openstack.org/218191

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to murano (master)

Reviewed: https://review.openstack.org/218191
Committed: https://git.openstack.org/cgit/openstack/murano/commit/?id=1bc300dd3697c8aa2945959e546d0b92b81447b6
Submitter: Jenkins
Branch: master

commit 1bc300dd3697c8aa2945959e546d0b92b81447b6
Author: Lin Yang <email address hidden>
Date: Mon Aug 24 17:03:48 2015 +0800

    Fix silently overwrite user specified content type

    Previously, even user specified the response content type of api
    'catalog/packages/<package_id>/ui', which will be silently replaced
    by text/plain. To improve it, add list 'specific_content_types' to
    make resource controller can specify different content type for each
    action. And it will raise exception when user specified content type
    is unsupported.

    Change-Id: I5d56461333d730f0f9fbe715e9bb066e5b004203
    Closes-Bug: #1476543

Changed in murano:
status: In Progress → Fix Committed
Changed in murano:
status: Fix Committed → Fix Released
Changed in murano:
milestone: liberty-3 → 1.0.0
Changed in murano:
milestone: 1.0.0 → 1.0.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.