@@ -80,13 +80,13 @@ func (r *IngressService) Get(ctx context.Context, id string, opts ...option.Requ
8080
8181type Ingress struct {
8282 // Auto-generated unique identifier
83- ID string `json:"id, required"`
83+ ID string `json:"id" api:" required"`
8484 // Creation timestamp (RFC3339)
85- CreatedAt time.Time `json:"created_at, required" format:"date-time"`
85+ CreatedAt time.Time `json:"created_at" api:" required" format:"date-time"`
8686 // Human-readable name
87- Name string `json:"name, required"`
87+ Name string `json:"name" api:" required"`
8888 // Routing rules for this ingress
89- Rules []IngressRule `json:"rules, required"`
89+ Rules []IngressRule `json:"rules" api:" required"`
9090 // JSON contains metadata for fields, check presence with [respjson.Field.Valid].
9191 JSON struct {
9292 ID respjson.Field
@@ -113,7 +113,7 @@ type IngressMatch struct {
113113 // Pattern hostnames use named captures in curly braces (e.g., {instance}, {app})
114114 // that extract parts of the hostname for routing. The extracted values can be
115115 // referenced in the target.instance field.
116- Hostname string `json:"hostname, required"`
116+ Hostname string `json:"hostname" api:" required"`
117117 // Host port to listen on for this rule (default 80)
118118 Port int64 `json:"port"`
119119 // JSON contains metadata for fields, check presence with [respjson.Field.Valid].
@@ -150,7 +150,7 @@ type IngressMatchParam struct {
150150 // Pattern hostnames use named captures in curly braces (e.g., {instance}, {app})
151151 // that extract parts of the hostname for routing. The extracted values can be
152152 // referenced in the target.instance field.
153- Hostname string `json:"hostname, required"`
153+ Hostname string `json:"hostname" api:" required"`
154154 // Host port to listen on for this rule (default 80)
155155 Port param.Opt [int64 ] `json:"port,omitzero"`
156156 paramObj
@@ -165,8 +165,8 @@ func (r *IngressMatchParam) UnmarshalJSON(data []byte) error {
165165}
166166
167167type IngressRule struct {
168- Match IngressMatch `json:"match, required"`
169- Target IngressTarget `json:"target, required"`
168+ Match IngressMatch `json:"match" api:" required"`
169+ Target IngressTarget `json:"target" api:" required"`
170170 // Auto-create HTTP to HTTPS redirect for this hostname (only applies when tls is
171171 // enabled)
172172 RedirectHTTP bool `json:"redirect_http"`
@@ -200,8 +200,8 @@ func (r IngressRule) ToParam() IngressRuleParam {
200200
201201// The properties Match, Target are required.
202202type IngressRuleParam struct {
203- Match IngressMatchParam `json:"match,omitzero, required"`
204- Target IngressTargetParam `json:"target,omitzero, required"`
203+ Match IngressMatchParam `json:"match,omitzero" api:" required"`
204+ Target IngressTargetParam `json:"target,omitzero" api:" required"`
205205 // Auto-create HTTP to HTTPS redirect for this hostname (only applies when tls is
206206 // enabled)
207207 RedirectHTTP param.Opt [bool ] `json:"redirect_http,omitzero"`
@@ -227,9 +227,9 @@ type IngressTarget struct {
227227 //
228228 // When using pattern hostnames, the instance is resolved dynamically at request
229229 // time.
230- Instance string `json:"instance, required"`
230+ Instance string `json:"instance" api:" required"`
231231 // Target port on the instance
232- Port int64 `json:"port, required"`
232+ Port int64 `json:"port" api:" required"`
233233 // JSON contains metadata for fields, check presence with [respjson.Field.Valid].
234234 JSON struct {
235235 Instance respjson.Field
@@ -264,9 +264,9 @@ type IngressTargetParam struct {
264264 //
265265 // When using pattern hostnames, the instance is resolved dynamically at request
266266 // time.
267- Instance string `json:"instance, required"`
267+ Instance string `json:"instance" api:" required"`
268268 // Target port on the instance
269- Port int64 `json:"port, required"`
269+ Port int64 `json:"port" api:" required"`
270270 paramObj
271271}
272272
@@ -281,9 +281,9 @@ func (r *IngressTargetParam) UnmarshalJSON(data []byte) error {
281281type IngressNewParams struct {
282282 // Human-readable name (lowercase letters, digits, and dashes only; cannot start or
283283 // end with a dash)
284- Name string `json:"name, required"`
284+ Name string `json:"name" api:" required"`
285285 // Routing rules for this ingress
286- Rules []IngressRuleParam `json:"rules,omitzero, required"`
286+ Rules []IngressRuleParam `json:"rules,omitzero" api:" required"`
287287 paramObj
288288}
289289
0 commit comments