From b462418f0fca33d28604994035ecd2143a0d670a 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 3562aceb..e71fba6e 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 @@ -1030,7 +1030,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 { @@ -1040,8 +1040,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 b5b1da0b..09043944 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 @@ -766,7 +766,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 { @@ -776,8 +776,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 cb6d0746..2d1747fc 100644 --- a/specification/build/haproxy_spec.yaml +++ b/specification/build/haproxy_spec.yaml @@ -3951,7 +3951,7 @@ definitions: - lf-string return_content_format: enum: - - default-errorfile + - default-errorfiles - errorfile - errorfiles - file @@ -4534,7 +4534,7 @@ definitions: - lf-string return_content_format: enum: - - default-errorfile + - default-errorfiles - errorfile - errorfiles - file @@ -5079,7 +5079,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 8ff92e0f..59973f1a 100644 --- a/specification/models/configuration/http/request.yaml +++ b/specification/models/configuration/http/request.yaml @@ -531,7 +531,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 451c191f..d330bd1e 100644 --- a/specification/models/configuration/http/response.yaml +++ b/specification/models/configuration/http/response.yaml @@ -377,7 +377,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]