Comment 2 for bug 1664328

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

Reviewed: https://review.openstack.org/442588
Committed: https://git.openstack.org/cgit/openstack/craton/commit/?id=0f7ee6d79189b2d8c5a81cf9e9598f96575f511d
Submitter: Jenkins
Branch: master

commit 0f7ee6d79189b2d8c5a81cf9e9598f96575f511d
Author: git-harry <email address hidden>
Date: Tue Mar 7 15:33:08 2017 +0000

    Pretty-print format all JSON response bodies

    Flask-RESTful automatically converts a response body to JSON when it
    creates the Response object. The Flask app configuration option
    RESTFUL_JSON is added by this commit to appropriately modify how the
    JSON body is constructed.

    response_filter has been modified so that it returns a tuple of
    information that Flask-RESTful will use to create an appropriately
    formatted response.

    Resource.error_response is creating the Response object itself and so
    has been modified to format the JSON in the same way as Flask-RESTful.
    Ideally, error_response would not create a separate Response object
    however addressing this is a separate issue.

    Change-Id: I02eafaf48d7c6e2ceab0add2f78cf6aa1b890f18
    Closes-bug: 1664328