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

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

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.

* chore: ignore generator tsbuildinfo
This commit is contained in:
Jack Carter
2026-05-08 18:32:51 +02:00
committed by GitHub
parent b99bf2838e
commit 3ff298c641
36 changed files with 201 additions and 206 deletions

View File

@@ -65,7 +65,7 @@ function renderProperties(properties, required = [], depth = 0) {
%>>%>
<% if ((type === 'object' && value.properties) || (type === 'object[]' && value.items.properties)) { %>
<details className="custom-details" open>
<summary><%- value.description || 'More Information' %></summary>
<summary><%- (value.description || 'More Information').replace(/\\s+/g, ' ').trim() %></summary>
<Properties>
<% if (type === 'object[]') { %>
<% renderProperties(value.items.properties, value.items.required || [], depth + 1); %>
@@ -178,7 +178,7 @@ func main() {
if err != nil {
fmt.Println(err)
return
<% if(true){%>{<% }; -%>
}
<% if(operation.requestBody?.content && operation.requestBody?.content['application/json']){ %>
req.Header.Add("Content-Type", "application/json")<% }; -%>