mirror of
https://github.com/netbirdio/docs.git
synced 2026-08-28 02:31:28 +02:00
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:
@@ -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")<% }; -%>
|
||||
|
||||
Reference in New Issue
Block a user