From dc738f9af40a292e4717b07668dd3a32775348e4 Mon Sep 17 00:00:00 2001 From: Marko Juraga Date: Thu, 30 Nov 2023 13:21:58 +0100 Subject: [PATCH] BUG/MINOR: http-request: fix enum for default-errorfile in return action --- models/http_request_rule.go | 8 ++++---- models/http_response_rule.go | 8 ++++---- specification/build/haproxy_spec.yaml | 4 ++-- specification/models/configuration/http/request.yaml | 2 +- specification/models/configuration/http/response.yaml | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/models/http_request_rule.go b/models/http_request_rule.go index 25fe3085..a82d8ac1 100644 --- a/models/http_request_rule.go +++ b/models/http_request_rule.go @@ -190,7 +190,7 @@ type HTTPRequestRule struct { ReturnContent string `json:"return_content,omitempty"` // return content format - // Enum: [default-errorfile errorfile errorfiles file lf-file string lf-string] + // Enum: [default-errorfiles errorfile errorfiles file lf-file string lf-string] ReturnContentFormat string `json:"return_content_format,omitempty"` // return content type @@ -1018,7 +1018,7 @@ var httpRequestRuleTypeReturnContentFormatPropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["default-errorfile","errorfile","errorfiles","file","lf-file","string","lf-string"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["default-errorfiles","errorfile","errorfiles","file","lf-file","string","lf-string"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -1028,8 +1028,8 @@ func init() { const ( - // HTTPRequestRuleReturnContentFormatDefaultDashErrorfile captures enum value "default-errorfile" - HTTPRequestRuleReturnContentFormatDefaultDashErrorfile string = "default-errorfile" + // HTTPRequestRuleReturnContentFormatDefaultDashErrorfiles captures enum value "default-errorfiles" + HTTPRequestRuleReturnContentFormatDefaultDashErrorfiles string = "default-errorfiles" // HTTPRequestRuleReturnContentFormatErrorfile captures enum value "errorfile" HTTPRequestRuleReturnContentFormatErrorfile string = "errorfile" diff --git a/models/http_response_rule.go b/models/http_response_rule.go index 836309c4..581f88b7 100644 --- a/models/http_response_rule.go +++ b/models/http_response_rule.go @@ -140,7 +140,7 @@ type HTTPResponseRule struct { ReturnContent string `json:"return_content,omitempty"` // return content format - // Enum: [default-errorfile errorfile errorfiles file lf-file string lf-string] + // Enum: [default-errorfiles errorfile errorfiles file lf-file string lf-string] ReturnContentFormat string `json:"return_content_format,omitempty"` // return content type @@ -754,7 +754,7 @@ var httpResponseRuleTypeReturnContentFormatPropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["default-errorfile","errorfile","errorfiles","file","lf-file","string","lf-string"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["default-errorfiles","errorfile","errorfiles","file","lf-file","string","lf-string"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -764,8 +764,8 @@ func init() { const ( - // HTTPResponseRuleReturnContentFormatDefaultDashErrorfile captures enum value "default-errorfile" - HTTPResponseRuleReturnContentFormatDefaultDashErrorfile string = "default-errorfile" + // HTTPResponseRuleReturnContentFormatDefaultDashErrorfiles captures enum value "default-errorfiles" + HTTPResponseRuleReturnContentFormatDefaultDashErrorfiles string = "default-errorfiles" // HTTPResponseRuleReturnContentFormatErrorfile captures enum value "errorfile" HTTPResponseRuleReturnContentFormatErrorfile string = "errorfile" diff --git a/specification/build/haproxy_spec.yaml b/specification/build/haproxy_spec.yaml index 479c17a8..b8570567 100644 --- a/specification/build/haproxy_spec.yaml +++ b/specification/build/haproxy_spec.yaml @@ -3255,7 +3255,7 @@ definitions: - lf-string return_content_format: enum: - - default-errorfile + - default-errorfiles - errorfile - errorfiles - file @@ -3801,7 +3801,7 @@ definitions: - lf-string return_content_format: enum: - - default-errorfile + - default-errorfiles - errorfile - errorfiles - file diff --git a/specification/models/configuration/http/request.yaml b/specification/models/configuration/http/request.yaml index ec299cef..d1c75219 100644 --- a/specification/models/configuration/http/request.yaml +++ b/specification/models/configuration/http/request.yaml @@ -521,7 +521,7 @@ http_request_rule: x-nullable: true return_content_format: type: string - enum: [default-errorfile, errorfile, errorfiles, file, lf-file, string, lf-string] + enum: [default-errorfiles, errorfile, errorfiles, file, lf-file, string, lf-string] x-dependency: type: value: [deny, tarpit, return] diff --git a/specification/models/configuration/http/response.yaml b/specification/models/configuration/http/response.yaml index 6596479c..52c05c5d 100644 --- a/specification/models/configuration/http/response.yaml +++ b/specification/models/configuration/http/response.yaml @@ -367,7 +367,7 @@ http_response_rule: x-nullable: true return_content_format: type: string - enum: [default-errorfile, errorfile, errorfiles, file, lf-file, string, lf-string] + enum: [default-errorfiles, errorfile, errorfiles, file, lf-file, string, lf-string] x-dependency: type: value: [deny, return]