Skip to content

Add QueryStringToArray Filter#168

Merged
carnage merged 1 commit intomembrane-php:mainfrom
charjr:custom-query-parsing
Dec 27, 2023
Merged

Add QueryStringToArray Filter#168
carnage merged 1 commit intomembrane-php:mainfrom
charjr:custom-query-parsing

Conversation

@charjr
Copy link
Collaborator

@charjr charjr commented Dec 22, 2023

This filter

  1. explodes on & into segments.

  2. explodes each value on = into pairs.

  3. inserts each pair as a key-value pair into an array (without overwriting)

The result is an array<string,string[]>

See the test for example outputs.

What this does is handle collecting the data together based on properties, after which it will still need to handle the style elsewhere. This can be added to the beforeSet for query parameters, something in each field processor will need to handle individual styles.

A combination of differing styles and explodes should not cause issue referring to this:
OAI/OpenAPI-Specification#1508

@carnage carnage merged commit 78acf18 into membrane-php:main Dec 27, 2023
@charjr charjr deleted the custom-query-parsing branch March 25, 2024 18:09
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.

2 participants