Skip to content

Conversation

@iamnamananand996
Copy link
Member

@iamnamananand996 iamnamananand996 commented Jan 26, 2026

Description

Refs: https://app.devin.ai/sessions/64b3914c128f4cfa957eaab189b9c426
Requested by: @iamnamananand996

Adds support for deep object query parameters to the Ruby SDK generator, following the same pattern as the PHP implementation. Nested objects are now encoded using bracket notation (e.g., filter[name]=john&filter[age]=30).

Changes Made

  • Added new QueryParamsUtility class that generates a Ruby utility with flatten_query_params method
  • Modified EndpointGenerator to wrap query parameters with the flatten call before passing to Faraday
  • Updated AbstractionUtilities and ClientsGenerator to thread the utility through the generation pipeline
  • Added changelog entry for version 0.8.4

The generated Ruby utility handles:

  • Simple nested objects: {filter: {name: "john"}}filter[name]=john
  • Deeply nested objects: {filter: {user: {name: "john"}}}filter[user][name]=john
  • Arrays (exploded format): {tags: ["a", "b"]}tags=a&tags=b
  • Arrays of objects: {objects: [{key: "val"}]}objects[key]=val

Testing

  • Unit tests added/updated
  • Manual testing completed (lint checks pass, TypeScript compiles)
  • CI checks passing

Human Review Checklist

  • Verify the Ruby code strings in QueryParamsUtility.ts (lines 42-62) are syntactically correct Ruby
  • Verify the array of objects merge logic { |_k, old, new_val| [*old, *new_val].flatten } handles edge cases correctly
  • Confirm all generateEndpoints call sites have been updated with the new queryParamsUtility parameter
  • Consider whether seed tests should be run to verify generated SDK output

@devin-ai-integration
Copy link
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants