fix(cli): don't exclude streaming ref schemas needed by other operations#14291
Merged
fix(cli): don't exclude streaming ref schemas needed by other operations#14291
Conversation
Contributor
🌱 Seed Test SelectorSelect languages to run seed tests for:
How to use: Click the ⋯ menu above → "Edit" → check the boxes you want → click "Update comment". Tests will run automatically and snapshots will be committed to this PR. |
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.
Tip: disable this comment in your organization's Code Review settings.
Swimburger
approved these changes
Mar 30, 2026
8 tasks
fern-support
pushed a commit
that referenced
this pull request
Apr 10, 2026
…reaming test cases Add endpoints 8-14 covering x-fern-streaming extension patterns that have been the source of multiple regressions: - Endpoint 8: basic stream-condition with $ref request body (#13568) - Endpoint 9: stream-condition with x-fern-type-name (#14256) - Endpoints 10-11: shared request schema across streaming/non-streaming (#14291) - Endpoint 12: discriminated union request with allOf-inherited stream condition field, reproducing the Vectara regression (FER-9556, #14730) - Endpoint 13: nullable stream condition field (#13605) - Endpoint 14: x-fern-streaming with SSE format only (no stream-condition)
jsklan
added a commit
that referenced
this pull request
Apr 10, 2026
… union variants (#14874) * feat(seed): augment server-sent-events-openapi fixture with x-fern-streaming test cases Add endpoints 8-14 covering x-fern-streaming extension patterns that have been the source of multiple regressions: - Endpoint 8: basic stream-condition with $ref request body (#13568) - Endpoint 9: stream-condition with x-fern-type-name (#14256) - Endpoints 10-11: shared request schema across streaming/non-streaming (#14291) - Endpoint 12: discriminated union request with allOf-inherited stream condition field, reproducing the Vectara regression (FER-9556, #14730) - Endpoint 13: nullable stream condition field (#13605) - Endpoint 14: x-fern-streaming with SSE format only (no stream-condition) * chore(seed): add debug script for SSE pipeline stage inspection Runs the locally-built Fern CLI against the server-sent-events-openapi fixture through each transformation stage (openapi-ir, write-definition, ir), collecting outputs in .local/results/ for inspection. Continues past failures so all stages produce output even when earlier ones error. Usage: pnpm tsx scripts/debug-sse-pipeline.ts * chore(seed): comment out endpoint 9 (x-fern-type-name collision) Endpoint 9's ChatCompletionRequest name collision blocks IR generation for the entire fixture. Comment it out so the remaining endpoints can be tested end-to-end. Uncomment when investigating the x-fern-type-name disambiguation fix (PR #14256) in isolation. * fix: deduplicate stream condition properties in discriminated union variants When a discriminated union's variants inherit the stream condition field from a base schema via extends, the property appeared twice in generated Python code — once from the union's base properties (pinned as a literal) and once from the variant's extended properties (as boolean). This caused SyntaxError: Duplicate keyword argument in generated wire tests and pydantic model definitions. Two fixes: 1. DynamicTypeLiteralMapper.ts: filter objectEntries that overlap with baseFields when building samePropertiesAsObject variant constructor args 2. simple_discriminated_union_generator.py: skip variant properties whose wire_value matches any union base property Fixes FER-9556 Co-Authored-By: bot_apk <apk@cognition.ai> * chore: update ir-to-jsonschema snapshots for server-sent-events-openapi fixture Co-Authored-By: bot_apk <apk@cognition.ai> * chore: add server-sent-events-openapi to go-sdk allowed failures Co-Authored-By: bot_apk <apk@cognition.ai> * fix: preserve AST references for streaming endpoint imports in wire tests Co-Authored-By: bot_apk <apk@cognition.ai> * style: fix biome formatting in WireTestGenerator.ts Co-Authored-By: bot_apk <apk@cognition.ai> * fix: escape triple quotes in docstrings and suppress mypy overload errors in exported client wrapper Co-Authored-By: judah <jsklan.development@gmail.com> * chore: update seed snapshot for exported client type ignore comment Co-Authored-By: judah <jsklan.development@gmail.com> * fix: use actual stream condition property name in WireMock body patterns Instead of hardcoding 'stream' in the matchesJsonPath body pattern, extract the actual stream condition property name from the SSE endpoint's example request body. This fixes WireMock stub routing for APIs that use a different property name (e.g. 'stream_response' in the Vectara API). Co-Authored-By: judah <jsklan.development@gmail.com> * fix: use explicit None check for mypy type narrowing in wrapper class Co-Authored-By: judah <jsklan.development@gmail.com> * fix: update CLI changelog version ordering and regenerate IR test snapshots Co-Authored-By: judah <jsklan.development@gmail.com> * nit * fix(python): replace type: ignore with proper @overload signatures in exported client wrapper Mirror the base client's @overload signatures on the wrapper class and use **kwargs pass-through for super().__init__(), so mypy is satisfied without suppressing the error. --------- Co-authored-by: jsklan <jsklan.development@gmail.com> Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: bot_apk <apk@cognition.ai> Co-authored-by: jsklan <100491078+jsklan@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
When processing stream condition endpoints, the OpenAPI importer was excluding the streaming request body's referenced schema. This caused issues when the same schema was referenced by other operations — it would be missing from the generated output.
Changes Made
excludeSchemacall: Stopped excluding the streaming request body ref schema during stream condition processing, since it may be needed by other endpointslet→const, type-only importsTesting