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

fix!: Add Support for multiValueQueryStringParameters #181

Merged
merged 3 commits into from
Nov 4, 2024

Conversation

sternetj
Copy link
Contributor

@sternetj sternetj commented Nov 4, 2024

No description provided.

Comment on lines 41 to 47
multiValueQueryStringParameters: {
_tag: [
'http://lifeomic.com/fhir/questionnaire-type|survey-form',
'http://lifeomic.com/fhir/dataset|0bb18fef-4e2d-4b91-a623-09527265a8b3',
'http://lifeomic.com/fhir/primary|0343bfcf-4e2d-4b91-a623-095272783bf3',
],
},
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left the array values in queryStringParameters because I assume some service or workflow relied on this. In my testing, having duplicate parameters across queryStringParameters and multiValueQueryStringParameters made it so the values were parsed as an array when included in multiValueQueryStringParameters and were parsed as an empty string when only included in queryStringParameters

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at how serverless-http parses the values, I think this is a mistake. I will switch to make sure they aren't duplicated.

@sternetj sternetj force-pushed the handle-multiValueQueryStringParameters branch from 9059383 to 44b021b Compare November 4, 2024 20:53
@sternetj sternetj changed the title Add Support for multiValueQueryStringParameters fix: Add Support for multiValueQueryStringParameters Nov 4, 2024
swain
swain previously approved these changes Nov 4, 2024
@@ -31,12 +31,14 @@ test('Can parse URLs with duplicate parameters', () => {
httpMethod: 'GET',
path: '/lifeomic/dstu3/Questionnaire',
queryStringParameters: {
pageSize: '25',
},
multiValueQueryStringParameters: {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this not be a breaking change in alpha since queryStringParameters will now never include any array query params?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah that does seem breaking. I'll update it.

BREAKING CHANGE: multi-value query params are now sent using the multiValueQueryStringParameters request property.
@lifeomic-probot
Copy link

lifeomic-probot bot commented Nov 4, 2024

⚠️ Detected a breaking change in commit f3acd81

Merging this PR will result in a major version bump.

Created by lifeomic-probot (Enforce Semantic Commits)

@sternetj sternetj changed the title fix: Add Support for multiValueQueryStringParameters fix!: Add Support for multiValueQueryStringParameters Nov 4, 2024
@sternetj sternetj requested a review from aecorredor November 4, 2024 21:32
@sternetj sternetj merged commit 9d123f2 into master Nov 4, 2024
6 checks passed
@sternetj sternetj deleted the handle-multiValueQueryStringParameters branch November 4, 2024 21:49
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.

3 participants