api/v2: simplify endpoint comments

This commit is contained in:
Kristoffer Dalby
2026-06-24 08:16:09 +00:00
parent dd9f0a3f4f
commit 83d3828ba1
2 changed files with 4 additions and 5 deletions
+3 -4
View File
@@ -44,9 +44,8 @@ type setACLInput struct {
Tailnet string `path:"tailnet"`
IfMatch string `header:"If-Match"`
Accept string `header:"Accept"`
// RawBody captures the HuJSON or JSON policy body verbatim; huma feeds the
// raw request bytes here regardless of Content-Type. The declared type only
// shapes the OpenAPI schema.
// RawBody captures the raw HuJSON or JSON policy bytes; huma feeds them here
// regardless of Content-Type. The declared type only shapes the OpenAPI schema.
RawBody []byte `contentType:"application/json"`
}
@@ -183,7 +182,7 @@ func currentPolicy(b Backend) ([]byte, error) {
return nil, huma.Error500InternalServerError("unsupported policy mode", nil)
}
// streamPolicy writes the policy bytes verbatim with the chosen content type and
// streamPolicy writes the policy bytes as-is with the chosen content type and
// a content-addressed ETag, bypassing huma's JSON marshaler so HuJSON survives.
func streamPolicy(data []byte, contentType string) *huma.StreamResponse {
return &huma.StreamResponse{Body: func(ctx huma.Context) {
+1 -1
View File
@@ -16,7 +16,7 @@ func init() {
// TailnetSettings is the Tailscale tailnet-settings response. Headscale's config
// is file-based and mostly not runtime-mutable, so only a few fields carry a
// real value; the rest report the honest "off"/default.
// real value; the rest report the default "off".
type TailnetSettings struct {
ACLsExternallyManagedOn bool `json:"aclsExternallyManagedOn"`
ACLsExternalLink string `json:"aclsExternalLink"`