From 97c0fd99792e3e68c969c9c9b756b6e0018a405c 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_error_rule.go | 8 ++++---- models/http_request_rule.go | 8 ++++---- models/http_response_rule.go | 8 ++++---- specification/build/haproxy_spec.yaml | 6 +++--- specification/models/configuration/http/error.yaml | 2 +- specification/models/configuration/http/request.yaml | 2 +- specification/models/configuration/http/response.yaml | 2 +- 7 files changed, 18 insertions(+), 18 deletions(-) diff --git a/models/http_error_rule.go b/models/http_error_rule.go index bf33c2ec..6e1679c5 100644 --- a/models/http_error_rule.go +++ b/models/http_error_rule.go @@ -50,7 +50,7 @@ type HTTPErrorRule 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 @@ -136,7 +136,7 @@ var httpErrorRuleTypeReturnContentFormatPropEnum []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 { @@ -146,8 +146,8 @@ func init() { const ( - // HTTPErrorRuleReturnContentFormatDefaultDashErrorfile captures enum value "default-errorfile" - HTTPErrorRuleReturnContentFormatDefaultDashErrorfile string = "default-errorfile" + // HTTPErrorRuleReturnContentFormatDefaultDashErrorfiles captures enum value "default-errorfiles" + HTTPErrorRuleReturnContentFormatDefaultDashErrorfiles string = "default-errorfiles" // HTTPErrorRuleReturnContentFormatErrorfile captures enum value "errorfile" HTTPErrorRuleReturnContentFormatErrorfile string = "errorfile" diff --git a/models/http_request_rule.go b/models/http_request_rule.go index 2c9b07b1..52883425 100644 --- a/models/http_request_rule.go +++ b/models/http_request_rule.go @@ -199,7 +199,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 @@ -1049,7 +1049,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 { @@ -1059,8 +1059,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 947f0073..80a16a7a 100644 --- a/models/http_response_rule.go +++ b/models/http_response_rule.go @@ -149,7 +149,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 @@ -785,7 +785,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 { @@ -795,8 +795,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 1ffc62eb..eb9216a1 100644 --- a/specification/build/haproxy_spec.yaml +++ b/specification/build/haproxy_spec.yaml @@ -3954,7 +3954,7 @@ definitions: - lf-string return_content_format: enum: - - default-errorfile + - default-errorfiles - errorfile - errorfiles - file @@ -4566,7 +4566,7 @@ definitions: - lf-string return_content_format: enum: - - default-errorfile + - default-errorfiles - errorfile - errorfiles - file @@ -5140,7 +5140,7 @@ definitions: - lf-string return_content_format: enum: - - default-errorfile + - default-errorfiles - errorfile - errorfiles - file diff --git a/specification/models/configuration/http/error.yaml b/specification/models/configuration/http/error.yaml index 6630cf6c..9efd82d9 100644 --- a/specification/models/configuration/http/error.yaml +++ b/specification/models/configuration/http/error.yaml @@ -33,7 +33,7 @@ http_error_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: status diff --git a/specification/models/configuration/http/request.yaml b/specification/models/configuration/http/request.yaml index 2e9e3c2d..d5affd9e 100644 --- a/specification/models/configuration/http/request.yaml +++ b/specification/models/configuration/http/request.yaml @@ -560,7 +560,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 0324d6ce..eb009f05 100644 --- a/specification/models/configuration/http/response.yaml +++ b/specification/models/configuration/http/response.yaml @@ -406,7 +406,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]