-
Notifications
You must be signed in to change notification settings - Fork 7
Upgrade Fern CLI to 5.21.1 and add localized OpenAPI specs #5447
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
Open
fern-api
wants to merge
1
commit into
main
Choose a base branch
from
fern/upgrade-cli-localized-specs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,3 @@ | ||
| api: | ||
| specs: | ||
| - openapi: openapi.yml |
This file contains hidden or 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,125 @@ | ||
| openapi: 3.1.0 | ||
| info: | ||
| title: Petstore API | ||
| version: 1.0.0 | ||
| description: | | ||
| A small example API used to demonstrate localized OpenAPI documentation in | ||
| Fern. The schema and operation shape match the Chinese-translated copy at | ||
| `fern/translations/zh/apis/petstore/openapi.yml`; only `summary` and | ||
| `description` strings differ between the two. | ||
| servers: | ||
| - url: https://petstore.example.com/api | ||
| description: Production server | ||
| tags: | ||
| - name: pets | ||
| description: Operations for managing pets in the store. | ||
| paths: | ||
| /pets: | ||
| get: | ||
| operationId: listPets | ||
| tags: | ||
| - pets | ||
| summary: List pets | ||
| description: Returns a paginated list of pets in the store. | ||
| parameters: | ||
| - name: limit | ||
| in: query | ||
| description: Maximum number of pets to return in a single page. | ||
| required: false | ||
| schema: | ||
| type: integer | ||
| format: int32 | ||
| minimum: 1 | ||
| maximum: 100 | ||
| default: 20 | ||
| responses: | ||
| "200": | ||
| description: A page of pets. | ||
| content: | ||
| application/json: | ||
| schema: | ||
| type: array | ||
| items: | ||
| $ref: "#/components/schemas/Pet" | ||
| post: | ||
| operationId: createPet | ||
| tags: | ||
| - pets | ||
| summary: Create a pet | ||
| description: Adds a new pet to the store. | ||
| requestBody: | ||
| required: true | ||
| content: | ||
| application/json: | ||
| schema: | ||
| $ref: "#/components/schemas/NewPet" | ||
| responses: | ||
| "201": | ||
| description: The pet was created successfully. | ||
| content: | ||
| application/json: | ||
| schema: | ||
| $ref: "#/components/schemas/Pet" | ||
| /pets/{petId}: | ||
| get: | ||
| operationId: getPet | ||
| tags: | ||
| - pets | ||
| summary: Get a pet by ID | ||
| description: Returns a single pet identified by its unique ID. | ||
| parameters: | ||
| - name: petId | ||
| in: path | ||
| description: The unique identifier of the pet. | ||
| required: true | ||
| schema: | ||
| type: string | ||
| responses: | ||
| "200": | ||
| description: The requested pet. | ||
| content: | ||
| application/json: | ||
| schema: | ||
| $ref: "#/components/schemas/Pet" | ||
| "404": | ||
| description: No pet was found with the given ID. | ||
| components: | ||
| schemas: | ||
| Pet: | ||
| type: object | ||
| required: | ||
| - id | ||
| - name | ||
| - species | ||
| properties: | ||
| id: | ||
| type: string | ||
| description: Unique identifier for the pet. | ||
| name: | ||
| type: string | ||
| description: The pet's display name. | ||
| species: | ||
| type: string | ||
| description: The pet's species, such as "dog" or "cat". | ||
| tags: | ||
| type: array | ||
| description: Optional tags used to categorize the pet. | ||
| items: | ||
| type: string | ||
| NewPet: | ||
| type: object | ||
| required: | ||
| - name | ||
| - species | ||
| properties: | ||
| name: | ||
| type: string | ||
| description: The pet's display name. | ||
| species: | ||
| type: string | ||
| description: The pet's species, such as "dog" or "cat". | ||
| tags: | ||
| type: array | ||
| description: Optional tags used to categorize the pet. | ||
| items: | ||
| type: string |
This file contains hidden or 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 hidden or 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 |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| { | ||
| "organization": "fern", | ||
| "version": "5.7.5" | ||
| "version": "5.21.1" | ||
| } |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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,124 @@ | ||
| openapi: 3.1.0 | ||
| info: | ||
| title: 宠物商店 API | ||
| version: 1.0.0 | ||
| description: | | ||
| 用于演示 Fern 本地化 OpenAPI 文档的小型示例 API。此规范的结构、路径和模式 | ||
| 与基础版本 `fern/apis/petstore/openapi.yml` 完全一致;仅 `summary` 和 | ||
| `description` 字符串被翻译为简体中文。 | ||
| servers: | ||
| - url: https://petstore.example.com/api | ||
| description: 生产环境服务器 | ||
| tags: | ||
| - name: pets | ||
| description: 用于管理商店中宠物的操作。 | ||
| paths: | ||
| /pets: | ||
| get: | ||
| operationId: listPets | ||
| tags: | ||
| - pets | ||
| summary: 列出宠物 | ||
| description: 返回商店中宠物的分页列表。 | ||
| parameters: | ||
| - name: limit | ||
| in: query | ||
| description: 单页返回的最大宠物数量。 | ||
| required: false | ||
| schema: | ||
| type: integer | ||
| format: int32 | ||
| minimum: 1 | ||
| maximum: 100 | ||
| default: 20 | ||
| responses: | ||
| "200": | ||
| description: 一页宠物数据。 | ||
| content: | ||
| application/json: | ||
| schema: | ||
| type: array | ||
| items: | ||
| $ref: "#/components/schemas/Pet" | ||
| post: | ||
| operationId: createPet | ||
| tags: | ||
| - pets | ||
| summary: 创建宠物 | ||
| description: 向商店中添加一只新宠物。 | ||
| requestBody: | ||
| required: true | ||
| content: | ||
| application/json: | ||
| schema: | ||
| $ref: "#/components/schemas/NewPet" | ||
| responses: | ||
| "201": | ||
| description: 宠物创建成功。 | ||
| content: | ||
| application/json: | ||
| schema: | ||
| $ref: "#/components/schemas/Pet" | ||
| /pets/{petId}: | ||
| get: | ||
| operationId: getPet | ||
| tags: | ||
| - pets | ||
| summary: 按 ID 获取宠物 | ||
| description: 返回由唯一 ID 标识的单只宠物。 | ||
| parameters: | ||
| - name: petId | ||
| in: path | ||
| description: 宠物的唯一标识符。 | ||
| required: true | ||
| schema: | ||
| type: string | ||
| responses: | ||
| "200": | ||
| description: 请求的宠物。 | ||
| content: | ||
| application/json: | ||
| schema: | ||
| $ref: "#/components/schemas/Pet" | ||
| "404": | ||
| description: 未找到具有该 ID 的宠物。 | ||
| components: | ||
| schemas: | ||
| Pet: | ||
| type: object | ||
| required: | ||
| - id | ||
| - name | ||
| - species | ||
| properties: | ||
| id: | ||
| type: string | ||
| description: 宠物的唯一标识符。 | ||
| name: | ||
| type: string | ||
| description: 宠物的显示名称。 | ||
| species: | ||
| type: string | ||
| description: 宠物的物种,例如 "dog" 或 "cat"。 | ||
| tags: | ||
| type: array | ||
| description: 用于对宠物进行分类的可选标签。 | ||
| items: | ||
| type: string | ||
| NewPet: | ||
| type: object | ||
| required: | ||
| - name | ||
| - species | ||
| properties: | ||
| name: | ||
| type: string | ||
| description: 宠物的显示名称。 | ||
| species: | ||
| type: string | ||
| description: 宠物的物种,例如 "dog" 或 "cat"。 | ||
| tags: | ||
| type: array | ||
| description: 用于对宠物进行分类的可选标签。 | ||
| items: | ||
| type: string |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[FernStyles.Current] Avoid time-relative terms like 'latest' that become outdated