Skip to content

feat(postman): disable optional query parameters by default in Postman collections#11442

Merged
jsklan merged 3 commits intomainfrom
devin/1767811108-postman-disable-optional-query-params
Jan 7, 2026
Merged

feat(postman): disable optional query parameters by default in Postman collections#11442
jsklan merged 3 commits intomainfrom
devin/1767811108-postman-disable-optional-query-params

Conversation

@jsklan
Copy link
Copy Markdown
Contributor

@jsklan jsklan commented Jan 7, 2026

Description

Optional query parameters in generated Postman collections now appear unchecked by default in the Postman UI. This prevents users from accidentally sending optional parameters they don't intend to use.

Link to Devin run: https://app.devin.ai/sessions/856aff1fcdf64cdf81e4df76bd67dd60
Requested by: @jsklan

Changes Made

  • Added disabled: optional<boolean> field to the PostmanUrlVariable type definition in collection.yml
  • Updated getQueryParams() in GeneratedExampleRequest.ts to set disabled: true for optional query parameters
  • Added unrecognizedObjectKeys: "passthrough" option to serialization in writePostmanCollection.ts (required because the Postman SDK doesn't yet have the disabled field in its schema)
  • Bumped postman generator version to 0.5.0
  • Updated seed test outputs (17 collection.json files)

Implementation Notes

  1. Optionality Detection: The task description suggested using availability?.required, but this field doesn't exist in the IR types. Instead, I used the standard pattern from other generators: valueType.type === "container" && valueType.container.type === "optional".

  2. Serialization Workaround: The @fern-fern/postman-sdk package doesn't have the disabled field defined in its PostmanUrlVariable type. To preserve the field during serialization, I added unrecognizedObjectKeys: "passthrough" to the jsonOrThrow call. This allows the new field to pass through until the SDK is regenerated.

Human Review Checklist

  • Verify the approach of checking valueType for optionality is the correct pattern
  • Confirm this behavior is desired for all HTTP methods (GET, POST, PATCH, etc.)
  • Review the passthrough workaround - is this acceptable until the SDK is updated?
  • Verify version bump to 0.5.0 is appropriate for this feature change

Testing

  • Seed tests run successfully (103/103 passed)
  • Verified disabled: true appears in generated collection.json files for optional parameters
  • Unit tests added/updated
  • Manually imported seed output collection into postman to see difference

Before:

image

After:

image

…n collections

Co-Authored-By: judah@buildwithfern.com <jsklan.development@gmail.com>
@jsklan jsklan requested review from dsinghvi and tjb9dc as code owners January 7, 2026 18:40
@devin-ai-integration
Copy link
Copy Markdown
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

devin-ai-integration bot and others added 2 commits January 7, 2026 18:43
Co-Authored-By: judah@buildwithfern.com <jsklan.development@gmail.com>
…ry params

Co-Authored-By: judah@buildwithfern.com <jsklan.development@gmail.com>
@jsklan jsklan merged commit f0e1c39 into main Jan 7, 2026
105 checks passed
@jsklan jsklan deleted the devin/1767811108-postman-disable-optional-query-params branch January 7, 2026 20:44
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