Skip to content

Comma separated query string implementation not delivering the desired payload #93

Description

@sanathko

I have a URL (GET REQUEST) of the following pattern

^/testpath/1/test?pathid=1
^/testpath/1/test?pathid=1,2
^/testpath/1/test?pathid=1,2,5
where pathid query string parameters are comma separated

I have the following stubby mappings to match these url patterns

- request:
    url: ^/testpath/(.*)/test
    query:
      pathid: '1'
    method: GET
  response:
    headers:
      Content-Type: application/json
    status: 200
    file: response/path-1.json

- request:
    url: ^/testpath/(.*)/test
    query:
      pathid: '1,2'
    method: GET
  response:
    headers:
      Content-Type: application/json
    status: 200
    file: response/path-2.json

- request:
    url: ^/testpath/(.*)/test
    query:
      pathid: '1,2,5'
    method: GET
  response:
    headers:
      Content-Type: application/json
    status: 200
    file: response/path-3.json

but I can't get this URL mapping to properly deliver different payloads based on different parameter combinations.

1 -> payload1
1,2 -> payload2
1,2,5 -> payload3
how can this be done?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions