Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue: Params does not work, when there are multiple values for a key #106

Closed
raghavendrabankapur opened this issue Mar 9, 2018 · 4 comments
Assignees

Comments

@raghavendrabankapur
Copy link
Collaborator

raghavendrabankapur commented Mar 9, 2018

For a request in the Param's, if we have multiple values for a key, we are not able to match the score for that request and return 410 saying could not find the mapping.

In a request for a query string parameter, we can have only one value. But in the structure, we are allowing an array of values that can be passed. That means for that key, it can be anything among the passed values.

example

  "Params": [
        {
          "Name": "searched",
          "Values": ["test","test2"]
        }
      ]

here in params, we have the key "searched" and values being "test" and "test2". Now my request can be like
http://localhost:9092/xyz?searched=test
http://localhost:9092/xyz?searched=test2

We can have either of them. But we cannot have like http://localhost:9092/xyz?searched=test1,test2

In this case, in the RequestMessageParamMatcher.cs file, we are deciding the score based on the count of values. Ideally, this should have been done if the list contains the requests param value.

@StefH StefH self-assigned this Mar 10, 2018
@StefH StefH changed the title Params does not work, when there are multiple values for a key Issue: Params does not work, when there are multiple values for a key Mar 10, 2018
@StefH
Copy link
Collaborator

StefH commented Mar 10, 2018

Thanks for this report.

@StefH
Copy link
Collaborator

StefH commented Mar 10, 2018

Will be fixed soon, please watch updates here + NuGet.

@StefH StefH closed this as completed Mar 10, 2018
StefH added a commit that referenced this issue Mar 10, 2018
@raghavendrabankapur
Copy link
Collaborator Author

raghavendrabankapur commented Mar 10, 2018 via email

@StefH
Copy link
Collaborator

StefH commented Mar 10, 2018

Already fixed, no need for PR.

StefH added a commit that referenced this issue Mar 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants