Skip to content

chore(seed): migrate imdb fixture to OpenAPI input#15809

Merged
jsklan merged 23 commits into
mainfrom
judah/seed-openapi-migration
May 14, 2026
Merged

chore(seed): migrate imdb fixture to OpenAPI input#15809
jsklan merged 23 commits into
mainfrom
judah/seed-openapi-migration

Conversation

@jsklan
Copy link
Copy Markdown
Contributor

@jsklan jsklan commented May 8, 2026

Summary

  • Add migration scripts for the seed fixture consolidation project:
    • scripts/copy-openapi-specs.sh — copies seed OpenAPI specs into test-definition dirs + generates overrides
    • scripts/wire-openapi-specs.sh — wires api.specs block into generators.yml with overrides
    • scripts/generate-openapi-overrides.py — generates x-fern-sdk-group-name / x-fern-sdk-method-name overrides from spec + definition directory structure
    • scripts/export-openapi-test.sh — validates specs with Spectral
  • Migrate the imdb fixture from Fern definition input to OpenAPI spec input
  • Regenerate imdb seed 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

  • Renamed security scheme Bearerbearer (lowercase) to match Fern definition output

Accepted structural diffs

These are inherent to the OpenAPI→IR path vs Fern definition→IR path and don't affect SDK API surface or behavior:

  • Error class renaming (e.g., MovieDoesNotExistErrorNotFoundError)
  • Type relocation (resources/<pkg>/types/api/types/)
  • Request type relocation (types/client/requests/)
  • Path parameter wrapping (direct param → request object)
  • Leading slash removal in URL paths
  • New GetXxxRequest wrapper types for GET endpoints with path params

Context

First fixture migration for the Seed Fixture Consolidation project. Establishes the workflow and scripts that subsequent fixture migrations (starting with exhaustive in FER-10463) will use.

Test plan

  • All SDK generators pass for imdb (generation + build + test)
  • Output diffs reviewed and categorized as acceptable
  • CI passes

Open in Devin Review

jsklan added 16 commits May 8, 2026 11:23
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.
@jsklan jsklan marked this pull request as ready for review May 8, 2026 17:33
@jsklan jsklan requested a review from amckinney as a code owner May 8, 2026 17:33
Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@jsklan jsklan changed the title chore(seed): migrate exhaustive+imdb fixtures to OpenAPI input chore(seed): migrate imdb fixture to OpenAPI input + add migration scripts May 8, 2026
@jsklan jsklan changed the title chore(seed): migrate imdb fixture to OpenAPI input + add migration scripts chore(seed): migrate imdb fixture to OpenAPI input May 8, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

SDK Generation Benchmark Results

Comparing PR branch against median of 5 nightly run(s) on main (latest: 2026-05-13T05:16:22Z).

Full benchmark table (click to expand)
Generator Spec main (generator) main (E2E) PR (generator) Delta
csharp-sdk square 68s (n=5) 101s (n=5) 61s -7s (-10.3%)
go-sdk square 129s (n=5) 275s (n=5) 123s -6s (-4.7%)
java-sdk square 205s (n=5) 264s (n=5) 185s -20s (-9.8%)
php-sdk square 56s (n=5) 77s (n=5) 51s -5s (-8.9%)
python-sdk square 132s (n=5) 231s (n=5) 133s +1s (+0.8%)
ruby-sdk-v2 square 81s (n=5) 118s (n=5) 87s +6s (+7.4%)
rust-sdk square 158s (n=5) 157s (n=5) 156s -2s (-1.3%)
swift-sdk square 53s (n=5) 746s (n=5) 47s -6s (-11.3%)
ts-sdk square 89s (n=5) 107s (n=5) 221s +132s (+148.3%)

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 fern generate). main (E2E): full customer-observable time including build/test scripts (nightly baseline, informational). Delta is computed against generator-only baseline.
⚠️ = generation exited with a non-zero exit code (timing may not reflect a successful run).
Baseline from nightly runs on main (latest: 2026-05-13T05:16:22Z). Trigger benchmark-baseline to refresh.
Last updated: 2026-05-13 19:36 UTC

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

Docs Generation Benchmark Results

Comparing PR branch against median of 5 nightly run(s) on main (latest: 2026-05-13T05:16:22Z).

Fixture main PR Delta
docs 275.8s (n=5) 234.6s (35 versions) -41.2s (-14.9%)

Docs generation runs fern generate --docs --preview end-to-end against the benchmark fixture with 35 API versions (each version: markdown processing + OpenAPI-to-IR + FDR upload).
Delta is computed against the nightly baseline on main.
Baseline from nightly run(s) on main (latest: 2026-05-13T05:16:22Z). Trigger benchmark-baseline to refresh.
Last updated: 2026-05-13 19:33 UTC

Co-Authored-By: bot_apk <apk@cognition.ai>
…gration

# Conflicts:
#	seed/python-sdk/imdb/poetry.lock
graphite-app[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

@jsklan jsklan closed this May 12, 2026
@jsklan jsklan reopened this May 12, 2026
@jsklan jsklan closed this May 13, 2026
@jsklan jsklan reopened this May 13, 2026
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 new potential issue.

View 7 additional findings in Devin Review.

Open in Devin Review

Comment thread scripts/generate-openapi-overrides.py
@jsklan jsklan closed this May 13, 2026
@jsklan jsklan reopened this May 13, 2026
@jsklan jsklan merged commit 42f728e into main May 14, 2026
211 checks passed
@jsklan jsklan deleted the judah/seed-openapi-migration branch May 14, 2026 22:09
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