IBM/agile-tutorial

Create `/basic/merge` resource

Closed this issue · 0 comments

As a user
I need to merge the list with another list
So that the list content can be updated.

Assumptions:

  • The main.py file should contain the following content.
@basic_ns.route('/merge/<string:csv>')
@basic_ns.doc(params={'csv': 'Comma-separated integer values.'}, description='Merge lists.')
class MergeList(Resource):
    def put(self, csv):
        my_list.extend(bs.csv_to_list(csv))
        return my_list

Acceptance criteria:

Given that the application stores a list of integers
When the /basic/merge resource is called
Then a new list of integers is merged to the current list.