Skip to content

Repository files navigation

Myrouter docs

Use the starter kit to get your docs deployed and ready to customize.

Click the green Use this template button at the top of this repo to copy the Mintlify starter kit. The starter kit contains examples with

  • Guide pages
  • Navigation
  • Customizations
  • API reference pages
  • Use of popular components

Follow the full quickstart guide

Development

Install the Mintlify CLI to preview your documentation changes locally. To install, use the following command:

npm i -g mint

Run the following command at the root of your documentation, where your docs.json is located:

mint dev

View your local preview at http://localhost:3000.

模型文档生成工具

本项目包含一个自动化工具,用于从 OpenAPI 3.0.3 规范生成模型 API 文档。

使用方法

  1. scripts/generate-model-doc.mjsMOCK_MODEL_DATABASE 中添加你的 OpenAPI 规范
  2. 运行生成脚本:
node scripts/generate-model-doc.mjs
  1. 按提示输入模型的 operationId(例如:asyncWanText2Video
  2. 确认生成的信息
  3. 工具将自动:
    • 生成 MDX 文档文件到 docs/models/ 目录
    • 更新 docs.json 将文档添加到相应分组

OpenAPI 规范格式

工具支持标准的 OpenAPI 3.0.3 格式,包括:

  • 嵌套对象和数组
  • 枚举值
  • 数值范围限制
  • 字符串长度限制
  • 数组长度限制
  • 必填和可选字段
  • Nullable 字段

示例

参考 MOCK_MODEL_DATABASE 中的 asyncWanText2Video 示例。

Publishing changes

Install our GitHub app from your dashboard to propagate changes from your repo to your deployment. Changes are deployed to production automatically after pushing to the default branch.

Need help?

Troubleshooting

  • If your dev environment isn't running: Run mint update to ensure you have the most recent version of the CLI.
  • If a page loads as a 404: Make sure you are running in a folder with a valid docs.json.

Resources

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

Generated from mintlify/starter