-
Notifications
You must be signed in to change notification settings - Fork 166
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(chore): introduce
x-fern-groups
and x-fern-display-name
to plumb…
… through display name (#3290) * (chore): introduce to plumb through display name * fix
- Loading branch information
Showing
16 changed files
with
135 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
packages/cli/openapi-ir-sdk/src/sdk/api/resources/finalIr/types/SdkGroupInfo.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/** | ||
* This file was auto-generated by Fern from our API Definition. | ||
*/ | ||
|
||
export interface SdkGroupInfo { | ||
summary: string | undefined; | ||
description: string | undefined; | ||
} |
1 change: 1 addition & 0 deletions
1
packages/cli/openapi-ir-sdk/src/sdk/api/resources/finalIr/types/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
packages/cli/openapi-ir-sdk/src/sdk/serialization/resources/finalIr/types/SdkGroupInfo.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/** | ||
* This file was auto-generated by Fern from our API Definition. | ||
*/ | ||
|
||
import * as serializers from "../../.."; | ||
import * as FernOpenapiIr from "../../../../api"; | ||
import * as core from "../../../../core"; | ||
|
||
export const SdkGroupInfo: core.serialization.ObjectSchema<serializers.SdkGroupInfo.Raw, FernOpenapiIr.SdkGroupInfo> = | ||
core.serialization.objectWithoutOptionalProperties({ | ||
summary: core.serialization.string().optional(), | ||
description: core.serialization.string().optional(), | ||
}); | ||
|
||
export declare namespace SdkGroupInfo { | ||
interface Raw { | ||
summary?: string | null; | ||
description?: string | null; | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
packages/cli/openapi-ir-sdk/src/sdk/serialization/resources/finalIr/types/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
packages/cli/openapi-parser/src/openapi/v3/extensions/getFernGroups.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { OpenAPIV3 } from "openapi-types"; | ||
import { z } from "zod"; | ||
import { getExtensionAndValidate } from "../../../getExtension"; | ||
import { OpenAPIV3ParserContext } from "../OpenAPIV3ParserContext"; | ||
import { FernOpenAPIExtension } from "./fernExtensions"; | ||
|
||
export const XFernGroupsSchema = z.record( | ||
z.string(), | ||
z.object({ | ||
summary: z.string().optional(), | ||
description: z.string().optional() | ||
}) | ||
); | ||
export type XFernGroupsSchema = z.infer<typeof XFernGroupsSchema>; | ||
|
||
export function getFernGroups({ | ||
document, | ||
context | ||
}: { | ||
document: OpenAPIV3.Document; | ||
context: OpenAPIV3ParserContext; | ||
}): XFernGroupsSchema | undefined { | ||
return getExtensionAndValidate<XFernGroupsSchema>( | ||
document, | ||
FernOpenAPIExtension.GROUPS, | ||
XFernGroupsSchema, | ||
context | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters