Skip to content
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

feat(openapi): x-fern-base-path #1862

Merged
merged 13 commits into from
Dec 6, 2024
Merged

feat(openapi): x-fern-base-path #1862

merged 13 commits into from
Dec 6, 2024

Conversation

chdeskur
Copy link
Contributor

@chdeskur chdeskur commented Dec 4, 2024

This PR adds the node, corresponding logic, and tests to parse x-fern-base-path

@chdeskur chdeskur requested a review from dsinghvi as a code owner December 4, 2024 23:49
@chdeskur chdeskur had a problem deploying to Preview - app-dev.buildwithfern.com December 4, 2024 23:49 — with GitHub Actions Error
@chdeskur chdeskur had a problem deploying to Preview - app.buildwithfern.com December 4, 2024 23:49 — with GitHub Actions Error
@chdeskur chdeskur had a problem deploying to Preview - app-dev.buildwithfern.com December 4, 2024 23:51 — with GitHub Actions Error
@chdeskur chdeskur had a problem deploying to Preview - app.buildwithfern.com December 4, 2024 23:51 — with GitHub Actions Error
@chdeskur chdeskur had a problem deploying to Preview - app.buildwithfern.com December 4, 2024 23:51 — with GitHub Actions Error
@chdeskur chdeskur had a problem deploying to Preview - app-dev.buildwithfern.com December 4, 2024 23:51 — with GitHub Actions Error
@chdeskur chdeskur had a problem deploying to Preview - dashboard-dev.buildwithfern.com December 4, 2024 23:53 — with GitHub Actions Error
Copy link

github-actions bot commented Dec 4, 2024

📦 Next.js Bundle Analysis for fern-platform-monorepo

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

@chdeskur chdeskur had a problem deploying to Preview - app-dev.buildwithfern.com December 4, 2024 23:53 — with GitHub Actions Error
@chdeskur chdeskur had a problem deploying to Preview - app.buildwithfern.com December 4, 2024 23:53 — with GitHub Actions Error
}

parse(): void {
this.basePath = extendType<{ "x-fern-base-path"?: string }>(this.input)["x-fern-base-path"];
Copy link
Member

Choose a reason for hiding this comment

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

we should put x-fern-base-path into a const at the top of the file, so that we can keep things in lockstep, my fault for not including this earlier, but there are examples in the last opened PR

@chdeskur chdeskur had a problem deploying to Preview - dashboard-dev.buildwithfern.com December 4, 2024 23:54 — with GitHub Actions Error
@@ -122,8 +124,11 @@ export class OperationObjectConverterNode extends BaseOpenApiV3_1ConverterNode<
}

const path = this.path.startsWith("/") ? this.path.slice(1) : this.path;
const basePath = this.basePath?.convert();
const pathParts = basePath ? [basePath].concat(path.split("/")) : path.split("/");
Copy link
Member

Choose a reason for hiding this comment

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

nit: [basePath, ...path.split("/"))] is a slightly nicer syntax

Copy link
Member

@RohinBhargava RohinBhargava left a comment

Choose a reason for hiding this comment

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

Looks fantastic! Left some minor comments.

Copy link

github-actions bot commented Dec 5, 2024

PR Preview

Copy link

github-actions bot commented Dec 5, 2024

Playwright test results

passed  95 passed
flaky  3 flaky
skipped  3 skipped

Details

stats  101 tests across 10 suites
duration  1 minute, 44 seconds
commit  bf60b53

Flaky tests

chromium › forward-proxy/nextjs.spec.ts › capture the flag
chromium › forward-proxy/nextjs.spec.ts › 404
chromium › websockets/websocket.spec.ts › websocket test

Skipped tests

chromium › posthog.spec.ts › Posthog loads successfully
chromium › proxy.spec.ts › multipart-form upload
chromium › proxy.spec.ts › json request

@chdeskur chdeskur had a problem deploying to Preview - app-dev.buildwithfern.com December 5, 2024 00:15 — with GitHub Actions Error
@chdeskur chdeskur had a problem deploying to Preview - app.buildwithfern.com December 5, 2024 00:15 — with GitHub Actions Error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants