Uploaded image for project: 'edge-orders'
  1. edge-orders
  2. EDGORDERS-27

Honor Accept header

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • P3
    • Resolution: Done
    • None
    • 2.2.1
    • None

    Description

      Overview:
      Currently edge-orders always returns the gobi xml response. We need to open that up to be much more flexible.

      Approach
      simply pass the provided accept header when proxying to the backend and let the backend process or reject the request

      • For errors in the edge API, use the error responses you've defined here (for now)
      • Create a JIRA for implementing error templates, specified via configuration
      • Return all responses from the backend as-is - success, failure, etc.
      • Responses from the backend should not be parsed or validated
      • The RAML cannot specify schemas for any responses since they will differ depending on the 'type' query argument.
        1. If the backend returns text/plain, wrap in the XML/JSON error response format
        2. Story for mod-gobi to return error XML conforming to the schema currently in use - currently returns text/plain
        3. Story for edge-orders to remove the wrapping and return responses as-is (depends on the mod-gobi work above)
        4.Models and scheams for gobi order responses (success) can be removed - no longer needed
        5.For now, leave the examples in RAML - remove as part of #3

      Acceptance criteria:

      • logic updated
      • unit tests updated

      TestRail: Results

        Attachments

          1. EDGEORDERS-27.postman_collection.json
            15 kB
          2. screenshot-1.png
            screenshot-1.png
            307 kB
          3. Verified_on_testing1.PNG
            Verified_on_testing1.PNG
            34 kB
          4. verified.png
            verified.png
            306 kB

          Issue Links

            Activity

              People

                yauheni_kuzmianok Yauheni Kuzmianok
                aliaksandr_pautau Aliaksandr Pautau
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  TestRail: Runs

                    TestRail: Cases