Skip to content

Commit

Permalink
(feat): set subpackage display names (#585)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsinghvi authored Mar 28, 2024
1 parent 59cfb48 commit 9acd72b
Show file tree
Hide file tree
Showing 8 changed files with 108 additions and 1 deletion.
1 change: 1 addition & 0 deletions fern/apis/fdr/definition/api/v1/db/__package__.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,4 @@ types:
subpackageId: readRoot.SubpackageId
name: string
urlSlug: string
displayName: optional<string>
1 change: 1 addition & 0 deletions fern/apis/fdr/definition/api/v1/read/__package__.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ types:
subpackageId: SubpackageId
name: string
urlSlug: string
displayName: optional<string>

SubpackageId: string

Expand Down
1 change: 1 addition & 0 deletions fern/apis/fdr/definition/api/v1/register/__package__.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ types:
properties:
subpackageId: SubpackageId
name: string
displayName: optional<string>

SubpackageId: string

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"scripts": {
"preinstall": "npx only-allow pnpm",
"test": "CI=true turbo test",
"test:update": "CI=true turbo test -- -u",
"test:playwright": "pnpm exec playwright test --debug",
"clean": "turbo clean",
"codegen": "turbo codegen",
Expand Down
2 changes: 1 addition & 1 deletion packages/commons/fdr-utils/src/flattenApiDefinition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ function flattenPackage(
return {
type: "subpackage",
subpackageId: subpackage.subpackageId,
name: titleCase(subpackage.name),
name: subpackage.displayName ?? titleCase(subpackage.name),
description: subpackage.description,
...flattenPackage(subpackage, subpackagesMap, subpackageSlugs, subpackageOrder),
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ function transformSubpackage({
pointsTo: writeShape.pointsTo,
urlSlug: kebabCase(writeShape.name),
description: writeShape.description,
displayName: writeShape.displayName,
// htmlDescription,
// descriptionContainsMarkdown: true,
webhooks: webhooks ?? [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ function transformSubpackage({
// htmlDescription: dbShape.htmlDescription,
webhooks: dbShape.webhooks ?? [],
websockets: dbShape.websockets ?? [],
displayName: dbShape.displayName,
// descriptionContainsMarkdown: dbShape.descriptionContainsMarkdown,
};
}
Expand Down
Loading

0 comments on commit 9acd72b

Please sign in to comment.