Skip to content

Conversation

@devin-ai-integration
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot commented Dec 23, 2025

Description

Refs #5841

Fixes a bug where example URLs were not respecting endpoint-level base-path overrides. When an endpoint defines its own base-path to use fewer path parameters than the global API definition, the example URL was still being constructed using the global/service base-path, causing extra path parameters to appear in the generated example URL.

Link to Devin run: https://app.devin.ai/sessions/0c3122106bab4a42a08fdb079d7865ea
Requested by: Catherine Deskur ([email protected])

Changes Made

  • Updated buildUrl function in convertExampleEndpointCall.ts to check for endpoint-level base-path before falling back to service/root base-path
  • The new logic mirrors the existing pattern in convertHttpService.ts for consistency
  • Added test fixture endpoint-base-path-override demonstrating the scenario from the issue
  • Added CLI versions.yml entry (3.31.2)
  • Generated snapshots for Swift SDK and ir-to-jsonschema tests
  • Added fixture to ruby-sdk allowedFailures (ruby-sdk fails on most fixtures)

Human Review Checklist

  • Verify the URL construction logic matches convertHttpService.ts (lines 118-123)
  • Confirm Swift SDK snapshot shows correct path interpolation: getCompany uses 3 params, getCompanies uses 2 params
  • Check versions.yml entry is correct (3.31.2 with fix type)

Testing

  • Compiled @fern-api/ir-generator package successfully
  • Lint checks passed (pnpm run check)
  • Swift SDK snapshot tests updated and passing
  • ir-to-jsonschema snapshot tests updated and passing
  • Required CI checks passing (test check)

CI Notes

The go-fiber check is failing due to a pre-existing infrastructure issue (@fern-api/core-utils not being a module) unrelated to this PR. This check is not marked as required.

…neration

When an endpoint defines its own base-path to override global path parameters,
the example URL generation was still using the service/root base-path. This
caused the example URL to include path parameters that were not part of the
endpoint's actual path.

This fix aligns the buildUrl function with the logic in convertHttpService.ts
to properly handle endpoint-level base-path overrides.

Fixes #5841

Co-Authored-By: Catherine Deskur <[email protected]>
@devin-ai-integration
Copy link
Contributor Author

🤖 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

@chdeskur chdeskur changed the title fix(ir-generator): respect endpoint-level base-path in example URL generation fix(ir): respect endpoint-level base-path in example URL generation Dec 23, 2025
@chdeskur chdeskur changed the title fix(ir): respect endpoint-level base-path in example URL generation fix(cli): respect endpoint-level base-path in example URL generation Dec 23, 2025
@github-actions
Copy link
Contributor

This PR is stale because it has been open 25 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale This PR hasn't has any commits or comments in 25 days or more. label Jan 18, 2026
@github-actions
Copy link
Contributor

This PR was closed because it has been inactive for 5 days after being marked stale.

@github-actions github-actions bot closed this Jan 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Stale This PR hasn't has any commits or comments in 25 days or more.

Development

Successfully merging this pull request may close these issues.

1 participant