OpenAPI Sync Until Valid
Coding
by loops! by elorm
Keep openapi.yaml valid and in sync with route handlers — lint the spec and fix drift each pass.
Prompt
Step 1 — Lint OpenAPI Validate openapi.yaml with spectral or swagger-cli. List every error with line numbers. Check: `npx @redocly/cli lint openapi.yaml` Step 2 — Sync handlers Update route handlers or the spec so documented paths, schemas, and status codes match reality. Step 3 — Repeat until done Repeat the steps above until: OpenAPI spec lints with zero errors Check with: `npx @redocly/cli lint openapi.yaml` Stop after 8 iterations and report what is blocking.
Use this prompt in AIniverse
Tap to copy, run it on ChatGPT / Claude / Gemini, save to your stack, or remix.
Open in AppMore Coding prompts
Independent Verifier Pass
When implementation claims done, a separate verifier pass runs build, lint, and tests with no access to the implement...
API Contract Until Match
Loop until API responses match the OpenAPI or JSON Schema contract — catch drift between docs and implementation.
De-Sloppify Pass
After implementation, run a cleanup pass: remove debug code, tighten naming, delete dead branches, and align with pro...
Merge Conflict Resolver
Rebase or merge target branch, resolve conflicts file by file, and loop until the branch is current and tests pass.