Skip to content

fix(api-template): repair Go brace and collapse summary whitespace#735

Merged
TechHutTV merged 2 commits intomainfrom
docs/api-template-fix-go-brace-summary
May 8, 2026
Merged

fix(api-template): repair Go brace and collapse summary whitespace#735
TechHutTV merged 2 commits intomainfrom
docs/api-template-fix-go-brace-summary

Conversation

@SunsetDrifter
Copy link
Copy Markdown
Contributor

Summary

  • Restore the missing } after the early-return error check in the Go example block of generator/templates/ApiTemplate.ts. The template was emitting { instead of }, leaving every generated Go snippet under src/pages/ipa/resources/ syntactically invalid.
  • Collapse whitespace in <summary> content from the OpenAPI description so multi-line descriptions don't push the closing tag into an MDX paragraph and crash the parser (the failure mode that 500'd /api/resources/posture-checks).
  • Regenerate the affected resource MDX files in place so the docs build cleanly without waiting for a fresh npm run gen pull from upstream main.

Notes

  • Source-of-truth fix lives in the template; the regenerated files are mechanical updates from that change.
  • The bad brace was introduced in 4c51e12 when the literal } got wrapped in <% if(true){%>{<% }; -%> and the output character was changed by mistake.

The ApiTemplate accidentally emitted `{` instead of `}` for the closing
brace after the early-return error check in the Go example, leaving every
generated Go snippet syntactically invalid. The summary description was
also rendered raw, so multi-line OpenAPI descriptions broke the MDX
parser when the closing tag landed inside a JSX paragraph.

Fix the template at the source and regenerate the affected resource
pages so the API docs build cleanly again.
@TechHutTV TechHutTV merged commit 3ff298c into main May 8, 2026
1 check passed
@TechHutTV TechHutTV deleted the docs/api-template-fix-go-brace-summary branch May 8, 2026 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants