Skip to content

Conversation

@f3l1x
Copy link
Member

@f3l1x f3l1x commented Dec 15, 2025

Implement support for JSON:API style nested query parameters using bracket notation (page[number], filter[status]) and colon notation (page:number).

Changes:

  • Add NestedParameterResolver utility class for parsing nested parameter names and accessing values from nested arrays
  • Update SimpleRouter to use NestedParameterResolver for query param extraction, enabling JSON:API style parameters
  • Add comprehensive tests for both the utility class and router
  • Add example JsonApiPaginationController demonstrating the feature

Example usage:
#[RequestParameter(name: 'page[number]', type: 'int', in: 'query')] #[RequestParameter(name: 'filter[status]', type: 'string', in: 'query')]

Implement support for JSON:API style nested query parameters using
bracket notation (page[number], filter[status]) and colon notation
(page:number).

Changes:
- Add NestedParameterResolver utility class for parsing nested parameter
  names and accessing values from nested arrays
- Update SimpleRouter to use NestedParameterResolver for query param
  extraction, enabling JSON:API style parameters
- Add comprehensive tests for both the utility class and router
- Add example JsonApiPaginationController demonstrating the feature

Example usage:
  #[RequestParameter(name: 'page[number]', type: 'int', in: 'query')]
  #[RequestParameter(name: 'filter[status]', type: 'string', in: 'query')]
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