-
Notifications
You must be signed in to change notification settings - Fork 275
fix(cli): respect endpoint-level base-path in example URL generation #11389
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(cli): respect endpoint-level base-path in example URL generation #11389
Conversation
…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 EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Co-Authored-By: Catherine Deskur <[email protected]>
…fixture Co-Authored-By: Catherine Deskur <[email protected]>
Co-Authored-By: Catherine Deskur <[email protected]>
…rved identifier conflict Co-Authored-By: Catherine Deskur <[email protected]>
…e-url Co-Authored-By: Catherine Deskur <[email protected]>
Co-Authored-By: Catherine Deskur <[email protected]>
Co-Authored-By: Catherine Deskur <[email protected]>
|
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. |
|
This PR was closed because it has been inactive for 5 days after being marked stale. |
Description
Refs #5841
Fixes a bug where example URLs were not respecting endpoint-level
base-pathoverrides. When an endpoint defines its ownbase-pathto 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
buildUrlfunction inconvertExampleEndpointCall.tsto check for endpoint-levelbase-pathbefore falling back to service/root base-pathconvertHttpService.tsfor consistencyendpoint-base-path-overridedemonstrating the scenario from the issueallowedFailures(ruby-sdk fails on most fixtures)Human Review Checklist
convertHttpService.ts(lines 118-123)getCompanyuses 3 params,getCompaniesuses 2 paramsTesting
@fern-api/ir-generatorpackage successfullypnpm run check)testcheck)CI Notes
The
go-fibercheck is failing due to a pre-existing infrastructure issue (@fern-api/core-utilsnot being a module) unrelated to this PR. This check is not marked as required.