fern-api / fern

Input OpenAPI. Output SDKs and Docs.
https://buildwithfern.com
MIT License
2.45k stars 118 forks source link

feat: add basepath to preview generation #3877

Closed abvthecity closed 1 week ago

abvthecity commented 2 weeks ago

Before this PR: preview URLs are generated without a basepath, which is a confusing UX since the published URL may contain a basepath.

After this PR: basepath is parsed from the domain using whatwg new URL(), and is sent to the startPreviewRegister endpoint.

https://github.com/fern-api/fern/pull/3877/files#diff-bbd2523315f5bfbcaf36180e2deb76a287d545d3948699c2bca76a61860a8287R59