chore(seed): migrate imdb fixture to OpenAPI input#15809
Conversation
Extract add-openapi-specs.sh and update export-openapi-test.sh from the stale swap-seed-inputs-2 branch. Wire exhaustive and imdb fixtures to use their existing openapi.yml via api.specs in generators.yml.
Replace the monolithic add-openapi-specs.sh with two scripts: - copy-openapi-specs.sh: copies seed OpenAPI specs into test-definition dirs without modifying generators.yml (safe to run on all fixtures) - wire-openapi-specs.sh: adds api.specs block to generators.yml, only for fixtures still using Fern definitions (skips any fixture that already has an api: block — openapi, proto, asyncapi, etc.) Both accept optional fixture names to operate on a subset.
Check for an existing api: block in generators.yml instead of just checking for openapi.yml on disk. Prevents creating orphan spec files for fixtures that are already wired to openapi/proto/asyncapi inputs at non-standard paths.
Add generate-openapi-overrides.py that reads an OpenAPI spec and the Fern definition directory structure to produce x-fern-sdk-group-name and x-fern-sdk-method-name overrides preserving the package hierarchy. Integrated into copy-openapi-specs.sh (auto-generates overrides after copying specs) and wire-openapi-specs.sh (wires overrides reference into generators.yml when present). Applied to imdb and exhaustive fixtures.
Fix auth scheme name to lowercase 'bearer' to match Fern definition output. Remaining diffs (error naming, type placement, path param wrapping) are acceptable structural differences from the OpenAPI→IR path and do not affect SDK API surface or behavior.
…I input Same acceptable structural diffs as ts-sdk and go-sdk: error naming, type placement, path param wrapping. No spec tuning needed beyond the bearer scheme fix already applied.
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.
SDK Generation Benchmark ResultsComparing PR branch against median of 5 nightly run(s) on Full benchmark table (click to expand)
main (generator): generator-only time via --skip-scripts (includes Docker image build, container startup, IR parsing, and code generation — this is the same Docker-based flow customers use via |
Docs Generation Benchmark ResultsComparing PR branch against median of 5 nightly run(s) on
Docs generation runs |
Co-Authored-By: bot_apk <apk@cognition.ai>
…gration # Conflicts: # seed/python-sdk/imdb/poetry.lock
Summary
scripts/copy-openapi-specs.sh— copies seed OpenAPI specs into test-definition dirs + generates overridesscripts/wire-openapi-specs.sh— wiresapi.specsblock into generators.yml with overridesscripts/generate-openapi-overrides.py— generatesx-fern-sdk-group-name/x-fern-sdk-method-nameoverrides from spec + definition directory structurescripts/export-openapi-test.sh— validates specs with Spectralimdbfixture from Fern definition input to OpenAPI spec inputimdbseed outputs across all SDK generators (ts-sdk, go-sdk, java-sdk, csharp-sdk, php-sdk, rust-sdk, swift-sdk, ruby-sdk-v2, openapi)Spec tuning applied
Bearer→bearer(lowercase) to match Fern definition outputAccepted structural diffs
These are inherent to the OpenAPI→IR path vs Fern definition→IR path and don't affect SDK API surface or behavior:
MovieDoesNotExistError→NotFoundError)resources/<pkg>/types/→api/types/)types/→client/requests/)GetXxxRequestwrapper types for GET endpoints with path paramsContext
First fixture migration for the Seed Fixture Consolidation project. Establishes the workflow and scripts that subsequent fixture migrations (starting with
exhaustivein FER-10463) will use.Test plan