Enriches a bare generated Reseller API OpenAPI spec with documentation metadata that the generation script doesn't produce: info block, servers, tag x-displayNames, tag descriptions, and per-endpoint summary/description fields.
- User provides a newly generated Reseller API OpenAPI spec (bare paths + schemas + tags + x-tagGroups)
- User asks to update/refresh the reseller spec from a generated source
- The generated spec is missing endpoint summaries, rich tag descriptions, or the info block
digraph enrich {
"Read generated spec" -> "Read current spec as reference";
"Read current spec as reference" -> "Merge enrichment";
"Merge enrichment" -> "Write to apis/reseller/openapi.yaml";
"Write to apis/reseller/openapi.yaml" -> "Validate with redocly lint";
"Validate with redocly lint" -> "Report diff summary";
}- Generated spec: provided by user (attachment or pasted)
- Current enriched spec:
apis/reseller/openapi.yamlin the repo (source of truth for documentation content)
Apply these layers from the current spec onto the generated spec:
openapi: Set to3.1.0info.title:Reseller APIinfo.version:"1.0.0"info.contact: name + email from current specinfo.description: Full multi-section description from current spec (Feature Overview, Managed Solution, Payments, Contacts, Important Concepts, Operations, Domain Flags, Preview Mode, Get Access)servers: Production + Sandbox URLs from current spec
For each tag in the generated spec:
- Add
x-displayNamefrom current spec - Replace short description with richer description from current spec
For each path+method in the generated spec:
- Match by
operationIdto the current spec - Copy
summaryanddescriptionfrom current spec - If a NEW endpoint exists (no match in current spec), write a concise
summary(imperative, <10 words) anddescription(1-2 sentences explaining what it does and key parameters)
- Keep ALL paths, schemas, security, x-tagGroups, and tag assignments from the generated spec (these are authoritative from the generation script)
- Only ADD documentation metadata; never remove or reorder endpoints
Write the enriched spec to apis/reseller/openapi.yaml.
npx @redocly/cli lint apis/reseller/openapi.yamlFix any lint errors before finishing.
Summarize what changed:
- New endpoints added (if any)
- Removed endpoints (if any)
- Endpoints with newly written summaries (no prior match)
- Any structural changes to tags or x-tagGroups
| File | Role |
|---|---|
apis/reseller/openapi.yaml | Enriched spec (output + reference) |
redocly.yaml | Redocly config (has reseller-v1@main entry) |
apis/sidebars.yaml | API sidebar nav |
apis/overview.md | API overview page |
- Reordering endpoints: Keep the path order from the generated spec
- Overwriting tag assignments: The generated spec's tags are authoritative; only add
x-displayNameand richer descriptions - Missing new endpoints: Always diff operationIds between generated and current to catch additions/removals
- Forgetting servers block: The generated spec typically has
servers: []; always populate from current