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

Allows base paths to include query parameters #209

Merged
merged 5 commits into from
Aug 25, 2021

Conversation

jsilland
Copy link
Contributor

This is a test case and a fix for #207.

When the base path of an operation contains a query string, those parameters are:

  1. extracted before appending any path parameters to the path
  2. merged with the query parameters passed by the client

In the case of a conflict between the parameters passed in the API call and the ones declared in the base path, the former prevails. This gives end control to clients.

This is a test case and a fix for go-openapi#207.

When the base path of an operation contains a query string, those parameters are:

1. extracted before appending any path parameters to the path
2. merged with the query parameters

In the case of a conflict between the parameters passed in the API call and the ones declared in the base path, the former prevails. This gives the end control to clients.

Signed-off-by: Julien Silland <julien@soliton.io>
Signed-off-by: Julien Silland <julien@soliton.io>
Signed-off-by: Julien Silland <julien@soliton.io>
Signed-off-by: Julien Silland <julien@soliton.io>
Signed-off-by: Julien Silland <julien@soliton.io>
@jsilland
Copy link
Contributor Author

The linter flagged that I was ignoring the return value from SetQueryParam — which I think wasn't flagged in my setup because the actual return value from that function is always nil. I've added a case to handle that on the calling side.

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

Successfully merging this pull request may close these issues.

None yet

2 participants