diff --git a/fern/apis/petstore/generators.yml b/fern/apis/petstore/generators.yml new file mode 100644 index 000000000..bc9a333a3 --- /dev/null +++ b/fern/apis/petstore/generators.yml @@ -0,0 +1,3 @@ +api: + specs: + - openapi: openapi.yml diff --git a/fern/apis/petstore/openapi.yml b/fern/apis/petstore/openapi.yml new file mode 100644 index 000000000..8e1495464 --- /dev/null +++ b/fern/apis/petstore/openapi.yml @@ -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 diff --git a/fern/docs.yml b/fern/docs.yml index 8f1c5360e..15ce39bd9 100644 --- a/fern/docs.yml +++ b/fern/docs.yml @@ -541,6 +541,8 @@ redirects: # Docs self-hosted / alternatives - source: /learn/docs/enterprise/self-hosted destination: /learn/docs/self-hosted/overview + - source: /learn/docs/self-hosted/releases + destination: /learn/docs/self-hosted/changelog - source: /learn/docs/alternatives/mintlify destination: /learn/docs/getting-started/overview diff --git a/fern/fern.config.json b/fern/fern.config.json index 788fb6032..e2c2ac46f 100644 --- a/fern/fern.config.json +++ b/fern/fern.config.json @@ -1,4 +1,4 @@ { "organization": "fern", - "version": "5.7.5" + "version": "5.21.1" } diff --git a/fern/products/docs/docs.yml b/fern/products/docs/docs.yml index 77e194548..58b70b61d 100644 --- a/fern/products/docs/docs.yml +++ b/fern/products/docs/docs.yml @@ -403,6 +403,7 @@ navigation: path: ./pages/self-hosted/health-check-endpoints.mdx - changelog: ./pages/self-hosted/changelog title: Releases + slug: changelog - section: Analytics & integrations slug: integrations collapsed: true diff --git a/fern/products/docs/pages/self-hosted/self-hosted-set-up.mdx b/fern/products/docs/pages/self-hosted/self-hosted-set-up.mdx index 8471f0996..16915b6a1 100644 --- a/fern/products/docs/pages/self-hosted/self-hosted-set-up.mdx +++ b/fern/products/docs/pages/self-hosted/self-hosted-set-up.mdx @@ -80,7 +80,7 @@ RUN fern-generate -See [recent releases](/learn/docs/self-hosted/releases) to pin to a specific version instead of `:latest`. +See [recent releases](/learn/docs/self-hosted/changelog) to pin to a specific version instead of `:latest`. diff --git a/fern/products/docs/pages/self-hosted/self-hosted.mdx b/fern/products/docs/pages/self-hosted/self-hosted.mdx index 6f7518955..4da66cf18 100644 --- a/fern/products/docs/pages/self-hosted/self-hosted.mdx +++ b/fern/products/docs/pages/self-hosted/self-hosted.mdx @@ -78,7 +78,7 @@ Fern provides your documentation site as a ready-to-run Docker container that yo 1. **Upload your fern folder** - Add your documentation source files to the container 1. **Run the container** - Start your local server using standard Docker commands 1. **Deploy** - Set up your server environment and publish the documentation -1. **Receive updated Docker images** - Fern [releases new versions of the Docker image](/learn/docs/self-hosted/releases) that your team can evaluate and deploy when ready. +1. **Receive updated Docker images** - Fern [releases new versions of the Docker image](/learn/docs/self-hosted/changelog) that your team can evaluate and deploy when ready. ### Architecture diagram diff --git a/fern/translations/zh/apis/petstore/openapi.yml b/fern/translations/zh/apis/petstore/openapi.yml new file mode 100644 index 000000000..67b4c87e2 --- /dev/null +++ b/fern/translations/zh/apis/petstore/openapi.yml @@ -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