mirror of
https://github.com/mintlify/docs.git
synced 2026-09-14 13:35:46 +08:00
73edda4d1f
Co-authored-by: locadex-agent[bot] <217277504+locadex-agent[bot]@users.noreply.github.com>
35 lines
1.3 KiB
Plaintext
35 lines
1.3 KiB
Plaintext
---
|
|
title: "Stainless"
|
|
description: "在 API 操作台中展示由 Stainless 自动生成的类型安全 SDK 代码示例。"
|
|
keywords: ["Stainless SDK", "SDK 生成", "API 客户端库", "类型安全的 SDK"]
|
|
---
|
|
|
|
<div id="prerequisites">
|
|
## 先决条件
|
|
</div>
|
|
|
|
* 拥有一个 [Stainless](https://app.stainless.com) 账号。
|
|
|
|
<div id="set-up-the-integration">
|
|
## 设置集成
|
|
</div>
|
|
|
|
<Steps>
|
|
<Step title="在 Stainless 中设置 OpenAPI 配置。">
|
|
在你的 `stainless.yml` 配置文件中,添加 `openapi.code_samples: 'mintlify'`。更多信息请参阅 [Stainless 文档](https://app.stainless.com/docs/guides/integrate-docs)。
|
|
</Step>
|
|
|
|
<Step title="发布你的 OpenAPI 规范 URL。">
|
|
在你的 Stainless 项目中:
|
|
|
|
1. 选择 **Release** 标签页。
|
|
2. 选择 **Setup OpenAPI publishing**。
|
|
3. 复制指向你公开可访问的 OpenAPI 规范的 URL。
|
|
|
|
<img src="/images/stainless-public-OpenAPI-spec.png" alt="Stainless 发布页面,其中用绿色框突出显示了 OpenAPI 规范的 URL。" />
|
|
</Step>
|
|
|
|
<Step title={<>将你的 OpenAPI 规范 URL 添加到 <code>docs.json</code>。</>}>
|
|
在你的 `docs.json` 文件中,将来自 Stainless 的 URL 添加到 `openapi` 字段。更多信息请参阅 [OpenAPI 设置](/zh/api-playground/openapi-setup)。
|
|
</Step>
|
|
</Steps> |