1164: Rename the orders endpoint that exports CSV

Test Case #:1164

Test Case Name:Rename the orders endpoint that exports CSV

System: OpenLMIS

Subsystem: blue

Test case designed by:

Design Date:04.11.2016

Short description

Currently the requisition service has this endpoint:

/orders/{id}/csv

We want to make the name of the endpoint generic so we are better prepared to support other export formats in the future:

/orders/{id}/export?type=csv

The

type=csv

parameter is optional. Currently the default type is CSV. If users hit the endpoint without specifying a type, they get the CSV. Having this name convention will better prepare us to export additional types in the future. Addition of any other export formats is not part of this ticket.

Acceptance Criteria

  • In Requisition service, the endpoint for /orders/ {id}/csv isremoved and replaced with /orders/{id}

    /export

  • That endpoint exports CSV both with and without ?type=csv being explicitly specified
  • The UI is updated so clicking the "Export CSV" button/link works by hitting the new endpoint location
  • Any other parts of OpenLMIS v3 that use this endpoint are changed to work by hitting this new endpoint location
  • Tests are updated
  • RAML is updated (openlmis-requisition /src/main/resources/api-definition.yaml)

                                                                                                                                                   

Pre – conditions:

                                                                                                                                                                                                                                                       

Step

Action

Expected system response

Comment

1

Check on swagger:

  • In Requisition service, the endpoint for /orders/ {id}/csv isremoved and replaced with /orders/{id}/export
           

                                                                                                                            

                                                 

2

Check if:

  • That endpoint exports CSV both with and without ?type=csv being explicitly specified

with:

without:




3

Check if:

RAML is updated (openlmis-requisition /src/main/resources/api-definition.yaml) 

 


4




5




OpenLMIS: the global initiative for powerful LMIS software