[pull] main from fern-api:main#764
Merged
Merged
Conversation
…iminated-union base inference (#16183) fix(openapi): skip inherited and propagate optionality in inferred discriminated-union base properties When `infer-discriminated-union-base-properties: true`, the OpenAPI parser no longer (1) lifts properties every variant already inherits via a shared `allOf $ref` parent, and (2) emits an inferred common property as required when any variant declares it not-required. Prevents TypeScript SDK `_Base` interfaces from colliding with the real parent on either presence or optionality (TS2320).
…rnapi/fern-cli-generator (#16188) Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* chore(cli-generator): sync cli-sdk@9c1f38f * chore(cli-generator): add changelog for cli-sdk@9c1f38f sync --------- Co-authored-by: jsklan <100491078+jsklan@users.noreply.github.com> Co-authored-by: jsklan <jsklan.development@gmail.com>
…3 OpenAPI parsing (#16162) * fix: resolve nested $ref objects in allOf flattening during v3 OpenAPI parsing When a parent schema in an allOf composition itself uses allOf with $ref elements (e.g., userPost → userBase → userStrict), the v3 parser's flattenNestedAllOf was silently dropping those nested $ref objects. This caused parent properties and required arrays to be lost in docs rendering. The fix adds an optional resolveRef callback to mergeAllOfSchemas that flattenNestedAllOf uses to resolve nested $ref objects instead of filtering them out. Cycle detection via a visited set prevents infinite recursion. Co-Authored-By: will.kendall@buildwithfern.com <wpk235@gmail.com> * fix: skip unresolved ref aliases in nested allOf resolver, update stale url-reference snapshots Guard against ref chains (local alias → external URL ref) that resolve to another ReferenceObject instead of a schema. The resolver now returns undefined for these, preserving the existing filter-out behavior. Also updates the pre-existing stale url-reference test snapshots (the external spec changed upstream; identical output on main). Co-Authored-By: will.kendall@buildwithfern.com <wpk235@gmail.com> * test: add comprehensive testing for nested $ref resolution in allOf - Add permanent v3-importer-tests fixture (allof-nested-ref) with 3 test cases: three-level chain, sibling properties + nested ref, multiple refs in single allOf - Add 4 new unit test edge cases: required merging across ref boundaries, multiple refs in single allOf, sibling properties preservation, undefined resolver - Extend existing allof seed test fixture with Cases 7-8 (nested $ref chain, multiple nested refs in parent allOf) - Run seed tests through TS, Python, Java, Go generators - all pass - Total: 26 unit tests, 286 v3-importer-tests, 4 seed generators verified Co-Authored-By: will.kendall@buildwithfern.com <wpk235@gmail.com> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: will.kendall@buildwithfern.com <wpk235@gmail.com>
…d cli-sdk (#16195) The daily cli-sdk sync copies inline #[cfg(test)] modules that reference fixture specs via include_str!("../../cli/<dir>/...") which are not synced. This breaks cargo test in both the vendored SDK and every generated CLI. - Add generators/cli/scripts/strip-fixture-tests.py: a Rust-syntax-aware script that removes #[cfg(test)] blocks containing fixture refs while preserving non-fixture tests. Handles multi-line raw strings, block comments, char literals, and transitive dependency tracking. - Update sync-sdk.sh to call strip-fixture-tests.py as a post-rsync step so future syncs stay clean automatically. - Remove 346 lines of fixture-dependent test code from 5 files: openapi/parser.rs, openapi/overlay.rs, openapi/app.rs, graphql/parser.rs, graphql/binding.rs (entire module removed). Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Fix test snapshots for v3 parser
Update snapshots
* feat(cli): emit npm publishing workflows in generated CLIs When output mode is github with npm publishInfo, the CLI generator now emits .github/workflows/ci.yml containing: - check/compile/test jobs on every push - cross-platform binary matrix (x86_64/aarch64 linux, darwin, windows) - per-platform embedded-binary npm packages + thin launcher - npm publish gated on tag push, authed via secrets.NPM_TOKEN Also stamps the resolved version into Cargo.toml [package] version (safe for cargo build --locked since only [package] version changes). Resolves FER-10875 * style: format with biome * fix(cli): also patch Cargo.lock version to match Cargo.toml for --locked compat * fix(cli): use assertNeverNoThrow in resolveOutputConfig switch defaults * fix(cli): update pnpm-lock.yaml for core-utils dependency * fix(cli): guard empty token env var, add OIDC support, add standalone tests - resolveNpmPublishInfo now falls back to NPM_TOKEN when tokenEnvironmentVariable is empty (fixes broken workflow YAML in local generation mode) - Add useOidc flag to ResolvedNpmPublishInfo; emitPublishWorkflow renders OIDC permissions and omits NODE_AUTH_TOKEN when active - Add resolveOutputConfig.test.ts (7 tests): github/downloadFiles modes, empty token fallback, OIDC sentinel, shouldGenerate: false, non-npm publish type - Add emitPublishWorkflow.test.ts (8 tests): standard token, custom token, OIDC mode, empty-token guard, structural checks * style(cli): fix biome formatting * style(cli): fix biome lint errors in resolveOutputConfig test * fix(cli): harden emitted npm publish workflow - fail-fast: false on the publish matrix so a transient single-platform failure can't leave npm with some platform packages published and no launcher (the already-published versions reject re-publish). - Require the semver "-" separator for pre-release dist-tag detection (*-alpha* / *-beta*) so a release tag for a package whose version string happens to contain "alpha"/"beta" isn't mis-tagged on npm. - Derive the launcher's PLATFORMS map and optionalDependencies lines from TARGETS so adding a target updates the matrix, the platform packages, and the launcher in one place. --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: patrick thornton <70873350+patrickthornton@users.noreply.github.com> Co-authored-by: patrick thornton <patrickthornton@g.harvard.edu>
Co-authored-by: jsklan <100491078+jsklan@users.noreply.github.com>
* Implement `applyTranslatedApiTitlesToNavTree` * Preview path * Update docs def resolver * Add exports * Update publish path * Add changelog entry * Add tests for `applyTranslatedApiTitlesToNavTree` * Trigger CI --------- Co-authored-by: Fern Support <support@buildwithfern.com> Co-authored-by: Danny Sheridan <83524670+dannysheridan@users.noreply.github.com>
) PR #16187 (sync cli-sdk@9c1f38f) accidentally committed `_cli-sdk` as a submodule gitlink (mode 160000) with no `.gitmodules` backing it. The sync workflow checks out fern-api/cli-sdk into `_cli-sdk` at the repo root, and `peter-evans/create-pull-request` runs `git add -A` across the whole tree, capturing that nested clone as a phantom submodule. This breaks clean checkouts and `git submodule status` in downstream CI (Update Seed, etc.). - Remove the stray `_cli-sdk` gitlink from the tree. - Add `/_cli-sdk/` to .gitignore so no `git add -A` can capture it again. - Scope the sync workflow's create-pull-request step to `add-paths: generators/cli/sdk/` so it only stages the synced path.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )