From 6c4cec2c5ddd63ea00fd46621f1339379c63e112 Mon Sep 17 00:00:00 2001 From: Jamie Tanna Date: Tue, 24 Feb 2026 14:16:19 +0000 Subject: [PATCH] fix(server-urls): restore generation of constants This fixes a regression from 59fb0e86773ac572016038c9cd21569de8d6a1b2. --- pkg/codegen/templates/server-urls.tmpl | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/codegen/templates/server-urls.tmpl b/pkg/codegen/templates/server-urls.tmpl index 1c60e796b1..3f1fdfe734 100644 --- a/pkg/codegen/templates/server-urls.tmpl +++ b/pkg/codegen/templates/server-urls.tmpl @@ -2,6 +2,7 @@ {{ if eq 0 (len .OAPISchema.Variables) }} {{/* URLs without variables are straightforward, so we'll create them a constant */}} // {{ .GoName }} defines the Server URL for {{ if len .OAPISchema.Description }}{{ .OAPISchema.Description }}{{ else }}{{ .OAPISchema.URL }}{{ end }} +const {{ .GoName}} = "{{ .OAPISchema.URL }}" {{ else }} {{/* URLs with variables are not straightforward, as we may need multiple types, and so will model them as a function */}}