MCP.so
登录
接口manual

OpenAPI Sync Until Valid已精选

Keep openapi.yaml valid and in sync with route handlers — lint the spec and fix drift each pass.

基本信息

分类

接口

目标

openapi.yaml lints clean and matches implemented routes

最大迭代次数

8

检查命令

npx @redocly/cli lint openapi.yaml

退出条件

OpenAPI lint exits 0

支持的智能体

Cursor

启动提示词

Start the "OpenAPI Sync Until Valid" loop.

Goal: openapi.yaml lints clean and matches implemented routes
Max iterations: 8
Between iterations run: npx @redocly/cli lint openapi.yaml
Exit when: OpenAPI lint exits 0

Step 1: Lint openapi.yaml. Fix spec errors and handler drift until lint passes.

Self-pace this loop. After each iteration, run the check command, read the output, and only continue if the exit condition is not met. Stop when the exit condition passes or max iterations is reached. Give a short status update each pass.

步骤

  1. 1

    Lint OpenAPI

    Validate openapi.yaml with spectral or swagger-cli. List every error with line numbers.

    npx @redocly/cli lint openapi.yaml
  2. 2

    Sync handlers

    Update route handlers or the spec so documented paths, schemas, and status codes match reality.

评论

更多 接口 相关内容