Skip to content

fix(yml): read oauth2 additional param name and value as strings - #9875

Merged
bijin-bruno merged 2 commits into
usebruno:mainfrom
lohit-bruno:fix/yml-oauth2-additional-params-empty-strings
Nov 16, 2026
Merged

bijin-bruno merged 2 commits into
usebruno:mainfrom
lohit-bruno:fix/yml-oauth2-additional-params-empty-strings

Conversation

@lohit-bruno

@lohit-bruno lohit-bruno commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

bru-5011

Contribution Checklist:

  • I've used AI significantly to create this pull request
  • The pull request only addresses one issue or adds one feature.
  • The pull request does not introduce any breaking changes
  • I have tested these changes locally and confirmed they work as expected.
  • I have added screenshots or gifs to help explain the change if applicable.
  • I have read the contribution guidelines.
  • Create an issue and link to the pull request.
  • I've run the claude code review skill locally.

Summary by CodeRabbit

  • Bug Fixes
    • OAuth2 token parameters with empty names or values are now retained as empty strings instead of being replaced with null or omitted.
    • Numeric and boolean parameter values are converted to strings when read.
    • Empty additional parameter values are preserved when converting collections between formats.

@coderabbitai

coderabbitai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

OAuth2 additional parameter names and values now use ensureString during reverse mapping. Tests cover missing, numeric, boolean, and empty values, including round-trip conversion and YAML parsing.

Changes

OAuth2 parameter mapping

Layer / File(s) Summary
String conversion and coverage
packages/bruno-filestore/src/formats/yml/common/auth-oauth2.ts, packages/bruno-filestore/src/formats/yml/common/auth-oauth2.spec.ts, packages/bruno-filestore/src/formats/yml/parseItem.spec.ts
reverseAdditionalParameters converts parameter names and values with ensureString. Tests cover missing, numeric, boolean, and empty values, plus round-trip conversion and YAML parsing.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix

Merge Risk: Minimal · up to c6729

This change keeps empty OAuth2 additional parameter names and values as strings instead of null. The scope is narrow, tests cover it, and no merge-blocking risk remains.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title states the main change: OAuth2 additional parameter names and values are now read as strings. The raw summary confirms that reverseAdditionalParameters now uses ensureString instead of `valu…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title states the main change: OAuth2 additional parameter names and values are now read as strings. The raw summary confirms that reverseAdditionalParameters now uses ensureString instead of value || null, and that tests cover empty, numeric, and boolean values. The title matches the changeset and the linked objective (keeping empty OAuth2 additional param names and values as strings instead of null). The title uses a conventional commit prefix and is concise.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Empty strings keep their place
Zero and false become text
Names cross the mapping
Round trips bring values back
YAML joins the test parade

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between bed0a84 and c67293b.

Files selected for processing: 3

  • packages/bruno-filestore/src/formats/yml/common/auth-oauth2.spec.ts
  • packages/bruno-filestore/src/formats/yml/common/auth-oauth2.ts
  • packages/bruno-filestore/src/formats/yml/parseItem.spec.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@lohit-bruno lohit-bruno changed the title fix(yml): keep empty OAuth2 additional param names and values as strings instead of null fix(yml): read oauth2 additional param name and value as strings Nov 16, 2026
@bijin-bruno
bijin-bruno merged commit ff9f2d0 into usebruno:main Nov 16, 2026
27 of 29 checks passed
aparna-bruno pushed a commit to aparna-bruno/bruno that referenced this pull request Nov 20, 2026
…sebruno#9875)

* fix(yml): coerce oauth2 additional param name and value to strings with ensureString

* test(yml): cover oauth2 additional param string coercion on parse and round-trip
sid-bruno pushed a commit that referenced this pull request Nov 24, 2026
…9875)

* fix(yml): coerce oauth2 additional param name and value to strings with ensureString

* test(yml): cover oauth2 additional param string coercion on parse and round-trip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants