Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions fern/apis/petstore/generators.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
api:
specs:
- openapi: openapi.yml
125 changes: 125 additions & 0 deletions fern/apis/petstore/openapi.yml
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
2 changes: 2 additions & 0 deletions fern/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion fern/fern.config.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"organization": "fern",
"version": "5.7.5"
"version": "5.21.1"
}
1 change: 1 addition & 0 deletions fern/products/docs/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ RUN fern-generate
</Info>

<Tip>
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`.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [vale] reported by reviewdog 🐶
[FernStyles.Current] Avoid time-relative terms like 'latest' that become outdated

</Tip>

</Step>
Expand Down
2 changes: 1 addition & 1 deletion fern/products/docs/pages/self-hosted/self-hosted.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
124 changes: 124 additions & 0 deletions fern/translations/zh/apis/petstore/openapi.yml
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
Loading