From 83d3828ba12c43ac61dd7b8c745e0032e4c8d107 Mon Sep 17 00:00:00 2001 From: Kristoffer Dalby Date: Wed, 24 Jun 2026 08:16:09 +0000 Subject: [PATCH] api/v2: simplify endpoint comments --- hscontrol/api/v2/acl.go | 7 +++---- hscontrol/api/v2/settings.go | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/hscontrol/api/v2/acl.go b/hscontrol/api/v2/acl.go index 8129e767..51bd25ce 100644 --- a/hscontrol/api/v2/acl.go +++ b/hscontrol/api/v2/acl.go @@ -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) { diff --git a/hscontrol/api/v2/settings.go b/hscontrol/api/v2/settings.go index cdd2bea0..58628370 100644 --- a/hscontrol/api/v2/settings.go +++ b/hscontrol/api/v2/settings.go @@ -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"`