Skip to content

Refactor of request params parsing process#947

Merged
dblock merged 11 commits intoruby-grape:masterfrom
numbata:request-param-parsers
May 24, 2025
Merged

Refactor of request params parsing process#947
dblock merged 11 commits intoruby-grape:masterfrom
numbata:request-param-parsers

Conversation

@numbata
Copy link
Contributor

@numbata numbata commented Feb 17, 2025

This pull request splits the request parameter handling into separate parser classes for headers, routes, and bodies. This means the code is more organized and easier to work with, making life easier for contributors and maintainers. It's a step toward adding new features-like contract-based parameter parsing-without having to tangle everything up in one place.

By separating concerns, developers can more easily customize or extend the way parameters are handled. In the future, we will be able to add stricter validation or additional checks simply by creating or updating a parser class. Overall, these changes should keep things cleaner, pave the way for stronger parameter validation, and help the project evolve smoothly.

In two words: my main goal here is to be able to add contract-based request params parser as one of the next steps.

@numbata numbata force-pushed the request-param-parsers branch from 719d29c to 55a94d0 Compare February 18, 2025 09:29
@numbata
Copy link
Contributor Author

numbata commented Feb 18, 2025

Some changes extracted into #948.

@numbata numbata force-pushed the request-param-parsers branch from a99e07a to 011800a Compare February 19, 2025 14:52
@numbata numbata marked this pull request as ready for review February 22, 2025 21:33
@numbata numbata force-pushed the request-param-parsers branch from 157b1dd to bffbbd4 Compare May 14, 2025 20:14
@dblock
Copy link
Member

dblock commented May 18, 2025

Rebase the conditional super_diff in tests? Should just be there.

@numbata numbata force-pushed the request-param-parsers branch from bffbbd4 to 8591b5d Compare May 22, 2025 21:43
@numbata numbata force-pushed the request-param-parsers branch from 8591b5d to 15331a0 Compare May 22, 2025 22:17
@numbata numbata force-pushed the request-param-parsers branch from 15331a0 to 513d35b Compare May 22, 2025 22:23
@dblock dblock merged commit 41bca66 into ruby-grape:master May 24, 2025
21 checks passed
numbata added a commit to numbata/grape-swagger that referenced this pull request Dec 6, 2025
* wip

* Form params parser. First step

* Cleanup mess a bit

* Fix specs

* Let rubocop be happy

* Fixes after rubocop autocorrection

* Cleanup a little

* Fix spec

* Add requst param parser regestry

* Refactor param parsers

* Fix rubocop offenses
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