Skip to content

Commit

Permalink
fix(docs): preview server handles both openrpc and openapi (#5629)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsinghvi authored Jan 16, 2025
1 parent 813276c commit 2731aac
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
8 changes: 8 additions & 0 deletions packages/cli/cli/versions.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
- changelogEntry:
- summary: |
The preview server is updated such that local previews of both OpenRPC and OpenAPI (legacy parser)
are now possible.
type: fix
irVersion: 55
version: 0.50.4

- changelogEntry:
- summary: |
The docs.yml now supports a separate configurtation for `feature-flags` which allows Fern to render
Expand Down
2 changes: 0 additions & 2 deletions packages/cli/docs-preview/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,10 @@
"depcheck": "depcheck"
},
"dependencies": {
"@fern-api/core-utils": "workspace:*",
"@fern-api/docs-resolver": "workspace:*",
"@fern-api/fdr-sdk": "0.128.0-8c361ea2b",
"@fern-api/fs-utils": "workspace:*",
"@fern-api/ir-sdk": "workspace:*",
"@fern-api/lazy-fern-workspace": "workspace:*",
"@fern-api/logger": "workspace:*",
"@fern-api/project-loader": "workspace:*",
"@fern-api/register": "workspace:*",
Expand Down
6 changes: 2 additions & 4 deletions packages/cli/docs-preview/src/previewDocs.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { v4 as uuidv4 } from "uuid";

import { isNonNullish } from "@fern-api/core-utils";
import { DocsDefinitionResolver, filterOssWorkspaces } from "@fern-api/docs-resolver";
import {
APIV1Read,
Expand All @@ -16,7 +15,6 @@ import {
} from "@fern-api/fdr-sdk";
import { convertToFernHostAbsoluteFilePath } from "@fern-api/fs-utils";
import { IntermediateRepresentation } from "@fern-api/ir-sdk";
import { OSSWorkspace } from "@fern-api/lazy-fern-workspace";
import { Project } from "@fern-api/project-loader";
import { convertIrToFdrApi } from "@fern-api/register";
import { TaskContext } from "@fern-api/task-context";
Expand Down Expand Up @@ -96,8 +94,8 @@ export async function getPreviewDocsDefinition({
});

return {
apis: parsedDocsConfig.experimental?.openapiParserV2 ? {} : apiCollector.getAPIsForDefinition(),
apisV2: parsedDocsConfig.experimental?.openapiParserV2 ? apiCollectorV2.getAPIsForDefinition() : {},
apis: apiCollector.getAPIsForDefinition(),
apisV2: apiCollectorV2.getAPIsForDefinition(),
config: readDocsConfig,
files: {},
filesV2,
Expand Down
6 changes: 0 additions & 6 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2731aac

Please sign in to comment.