From 86b04ddd26b24ed8042018efc61b55399915dfed Mon Sep 17 00:00:00 2001 From: Goran Galinec Date: Thu, 10 Oct 2019 15:36:41 +0200 Subject: [PATCH 1/6] BUG/MINOR: fix minimum port value --- build/haproxy_spec.yaml | 6 +++--- models/haproxy.yaml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/build/haproxy_spec.yaml b/build/haproxy_spec.yaml index ed043cb..8058903 100644 --- a/build/haproxy_spec.yaml +++ b/build/haproxy_spec.yaml @@ -710,7 +710,7 @@ definitions: x-nullable: false port: maximum: 65535 - minimum: 0 + minimum: 1 type: integer x-nullable: true process: @@ -820,7 +820,7 @@ definitions: type: string port: maximum: 65535 - minimum: 0 + minimum: 1 type: integer x-nullable: true send-proxy: @@ -2612,7 +2612,7 @@ definitions: x-nullable: true port: maximum: 65535 - minimum: 0 + minimum: 1 type: integer x-nullable: true rise: diff --git a/models/haproxy.yaml b/models/haproxy.yaml index b8cd1be..4dd7111 100644 --- a/models/haproxy.yaml +++ b/models/haproxy.yaml @@ -476,7 +476,7 @@ bind: port: type: integer x-nullable: true - minimum: 0 + minimum: 1 maximum: 65535 process: type: string @@ -538,7 +538,7 @@ server: port: type: integer x-nullable: true - minimum: 0 + minimum: 1 maximum: 65535 maxconn: type: integer @@ -1361,7 +1361,7 @@ default_server: x-nullable: true port: type: integer - minimum: 0 + minimum: 1 maximum: 65535 x-nullable: true forwardfor: From 7e6195c2bc647959b8dc5d2fca6b3af5661ba344 Mon Sep 17 00:00:00 2001 From: Mathias Chevalier Date: Thu, 24 Oct 2019 18:16:25 +0200 Subject: [PATCH 2/6] DOC/MINOR: fix forwardfor example in response samples for add backend Signed-off-by: Mathias Chevalier --- build/haproxy_spec.yaml | 2 +- models/haproxy.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build/haproxy_spec.yaml b/build/haproxy_spec.yaml index 8058903..5810a04 100644 --- a/build/haproxy_spec.yaml +++ b/build/haproxy_spec.yaml @@ -508,7 +508,7 @@ definitions: balance: algorithm: roundrobin forwardfor: - enabled: true + enabled: enabled httpchk: method: OPTIONS uri: /check diff --git a/models/haproxy.yaml b/models/haproxy.yaml index 4dd7111..9891d73 100644 --- a/models/haproxy.yaml +++ b/models/haproxy.yaml @@ -450,7 +450,7 @@ backend: balance: algorithm: roundrobin forwardfor: - enabled: true + enabled: enabled httpchk: uri: "/check" method: OPTIONS From 2c8fda480903b0eb736271ce35ab21186238ef0f Mon Sep 17 00:00:00 2001 From: Marko Juraga Date: Mon, 4 Nov 2019 11:48:47 +0100 Subject: [PATCH 3/6] BUG/MINOR: Fix tracked field in stats It used to be type integer, making it unparsable, now it is string --- build/haproxy_spec.yaml | 3 +-- models/stats.yaml | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/build/haproxy_spec.yaml b/build/haproxy_spec.yaml index 5810a04..1c15b9b 100644 --- a/build/haproxy_spec.yaml +++ b/build/haproxy_spec.yaml @@ -2328,10 +2328,9 @@ definitions: type: server x-nullable: true tracked: - type: integer + type: string x-dependency: type: server - x-nullable: true ttime: type: integer x-dependency: diff --git a/models/stats.yaml b/models/stats.yaml index 3e53b6f..cc0e4f7 100644 --- a/models/stats.yaml +++ b/models/stats.yaml @@ -162,8 +162,7 @@ native: x-dependency: type: [server, backend] tracked: - type: integer - x-nullable: true + type: string x-dependency: type: server rate: From 8af96a63d678972c5dc54cbb28e45a110cd290c6 Mon Sep 17 00:00:00 2001 From: Hrvoje Marjanovic Date: Mon, 18 Nov 2019 10:46:38 +0100 Subject: [PATCH 4/6] DOC: Clarify build of MacOS users. --- README.md | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 96ccb77..4d54802 100644 --- a/README.md +++ b/README.md @@ -4,12 +4,22 @@ This is the [OpenAPI 2.0 (fka Swagger)](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md) specification for the [HAProxy Data Plane API project](https://github.com/haproxytech/dataplaneapi) -## Contributing +## Contributing -When contributing change files located it paths/ and models/ directories and the haproxy-spec.yaml, and then build the resulting one-file spec using the build binary in build directory: +When contributing, change files located in paths/ and models/ directories and the haproxy-spec.yaml, and then build the resulting one-file spec `build/haproxy_spec.yaml`. -``` +On linux, use the `build` binary: + +```bash +cd build ./build -file ../haproxy-spec.yaml > haproxy_spec.yaml ``` +On MacOS, you will need golang installed: + +```bash +cd build +go run build.go -file ../haproxy-spec.yaml > haproxy_spec.yaml +``` + For commit messages and general style please follow the haproxy project's [CONTRIBUTING guide](https://github.com/haproxy/haproxy/blob/master/CONTRIBUTING) and use that where applicable. From d928275cd90357da9c913a960875309d9c7f941e Mon Sep 17 00:00:00 2001 From: Hrvoje Marjanovic Date: Mon, 11 Nov 2019 13:10:58 +0100 Subject: [PATCH 5/6] CLEANUP: Editorconfig setup. --- .editorconfig | 7 + models/general.yaml | 4 +- models/haproxy.yaml | 334 ++++++++++++++++++++++---------------------- models/simple.yaml | 20 +-- paths/haproxy.yaml | 2 +- paths/simple.yaml | 2 +- 6 files changed, 188 insertions(+), 181 deletions(-) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..54a0cd3 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,7 @@ +# don't look above this dir +root = true + +[**.{yaml,yml}] +indent_style = space +indent_style = 2 +trim_trailing_whitespace = true diff --git a/models/general.yaml b/models/general.yaml index 8e22aaa..1e86c5e 100644 --- a/models/general.yaml +++ b/models/general.yaml @@ -120,7 +120,7 @@ transaction: id: type: string pattern: '^[^\s]+$' - status: + status: type: string enum: [failed, in_progress, success] _version: @@ -139,7 +139,7 @@ reload: pattern: '^\d{4}-\d{2}-\d{2}-\d+$' reload_timestamp: type: integer - status: + status: type: string enum: [failed, in_progress, succeeded] response: diff --git a/models/haproxy.yaml b/models/haproxy.yaml index 9891d73..b658bf7 100644 --- a/models/haproxy.yaml +++ b/models/haproxy.yaml @@ -54,7 +54,7 @@ global: type: array x-display-name: Runtime APIs x-go-name: RuntimeAPIs - items: + items: type: object x-go-name: RuntimeAPI required: @@ -84,7 +84,7 @@ defaults: description: HAProxy defaults configuration type: object properties: - mode: + mode: type: string enum: [tcp, http] balance: @@ -133,7 +133,7 @@ defaults: log_separate_errors: type: string enum: [enabled, disabled] - clitcpka: + clitcpka: type: string enum: [enabled, disabled] x-display-name: Client TCP Keep Alive @@ -188,7 +188,7 @@ defaults: default_backend: type: string pattern: '^[A-Za-z0-9-_.:]+$' - x-dynamic-enum: + x-dynamic-enum: operation: getBackends property: name default_server: @@ -216,20 +216,20 @@ frontend: httplog: type: boolean x-display-name: HTTP Log - x-dependency: - mode: + x-dependency: + mode: value: http clflog: type: boolean x-display-name: CLF Log - x-dependency: - mode: + x-dependency: + mode: value: http tcplog: type: boolean x-display-name: TCP Log - x-dependency: - mode: + x-dependency: + mode: value: tcp log_format: type: string @@ -249,8 +249,8 @@ frontend: http_connection_mode: type: string enum: [httpclose, http-server-close, http-keep-alive] - x-dependency: - mode: + x-dependency: + mode: value: http client_timeout: type: integer @@ -258,14 +258,14 @@ frontend: http_request_timeout: type: integer x-nullable: true - x-dependency: - mode: + x-dependency: + mode: value: http http_keep_alive_timeout: type: integer x-nullable: true - x-dependency: - mode: + x-dependency: + mode: value: http maxconn: type: integer @@ -279,26 +279,26 @@ frontend: default_backend: type: string pattern: '^[A-Za-z0-9-_.:]+$' - x-dynamic-enum: + x-dynamic-enum: operation: getBackends property: name contstats: type: string enum: [enabled] x-display-name: Continous Statistics - clitcpka: + clitcpka: type: string enum: [enabled, disabled] x-display-name: Client TCP Keep Alive - x-dependency: - mode: + x-dependency: + mode: value: tcp http-use-htx: type: string enum: [enabled, disabled] x-display-name: HTTP Use HTX - x-dependency: - mode: + x-dependency: + mode: value: http additionalProperties: false example: @@ -341,14 +341,14 @@ backend: http_connection_mode: type: string enum: [httpclose, http-server-close, http-keep-alive] - x-dependency: - mode: + x-dependency: + mode: value: http http_pretend_keepalive: type: string enum: [enabled, disabled] - x-dependency: - mode: + x-dependency: + mode: value: http forwardfor: $ref: "#/definitions/forwardfor" @@ -357,9 +357,9 @@ backend: value: http cookie: type: string - x-dependency: - mode: - value: http + x-dependency: + mode: + value: http default_server: $ref: "#/definitions/default_server" check_timeout: @@ -390,8 +390,8 @@ backend: http_request_timeout: type: integer x-nullable: true - x-dependency: - mode: + x-dependency: + mode: value: http http_keep_alive_timeout: type: integer @@ -440,18 +440,18 @@ backend: http-use-htx: type: string enum: [enabled, disabled] - x-dependency: - mode: + x-dependency: + mode: value: http additionalProperties: false example: name: test_backend mode: http - balance: + balance: algorithm: roundrobin - forwardfor: + forwardfor: enabled: enabled - httpchk: + httpchk: uri: "/check" method: OPTIONS version: HTTP/1.1 @@ -488,15 +488,15 @@ bind: ssl_certificate: type: string pattern: '^[^\s]+$' - x-dependency: - ssl: + x-dependency: + ssl: value: true ssl_cafile: type: string x-display-name: SSL CA File pattern: '^[^\s]+$' - x-dependency: - ssl: + x-dependency: + ssl: value: true alpn: type: string @@ -583,21 +583,21 @@ server: ssl_certificate: type: string pattern: '^[^\s]+$' - x-dependency: - ssl: + x-dependency: + ssl: value: enabled ssl_cafile: type: string x-display-name: SSL CA File pattern: '^[^\s]+$' - x-dependency: - ssl: + x-dependency: + ssl: value: enabled tls_tickets: type: string enum: [enabled, disabled] - x-dependency: - ssl: + x-dependency: + ssl: value: enabled verify: type: string @@ -632,51 +632,51 @@ http_request_rule: type: string x-display-name: Authentication Realm pattern: '^[^\s]+$' - x-dependency: - type: + x-dependency: + type: value: auth redir_type: type: string x-display-name: Redirect Type enum: [location, prefix, scheme] - x-dependency: - type: + x-dependency: + type: value: redirect required: true redir_value: type: string x-display-name: Redirect Value pattern: '^[^\s]+$' - x-dependency: - type: + x-dependency: + type: value: redirect required: true redir_code: type: integer x-display-name: Redirect Code enum: [301, 302, 303] - x-dependency: - type: + x-dependency: + type: value: redirect redir_option: type: string x-display-name: Redirect Option - x-dependency: - type: + x-dependency: + type: value: redirect required: true deny_status: type: integer x-nullable: false - x-dependency: - type: + x-dependency: + type: value: [deny, tarpit] hdr_name: type: string x-display-name: Header Name pattern: '^[^\s]+$' x-dependency: - type: + type: value: [add-header, replace-header, del-header, set-header, replace-value] required: true hdr_match: @@ -684,7 +684,7 @@ http_request_rule: x-display-name: Header Match pattern: '^[^\s]+$' x-dependency: - type: + type: value: [replace-header, replace-value] required: true hdr_format: @@ -692,14 +692,14 @@ http_request_rule: x-display-name: Header Format pattern: '^[^\s]+$' x-dependency: - type: + type: value: [replace-header, replace-value, set-header, add-header] required: true log_level: type: string enum: [emerg, alert, crit, err, warning, notice, info, debug, silent] - x-dependency: - type: + x-dependency: + type: value: set-log-level required: true path_fmt: @@ -711,22 +711,22 @@ http_request_rule: var_name: type: string pattern: '^[^\s]+$' - x-dependency: - type: + x-dependency: + type: value: set-var required: true var_scope: type: string pattern: '^[^\s]+$' - x-dependency: - type: + x-dependency: + type: value: set-var required: true var_expr: type: string x-display-name: Var Expression - x-dependency: - type: + x-dependency: + type: value: set-var required: true query-fmt: @@ -745,16 +745,16 @@ http_request_rule: type: string x-display-name: SPOE Engine pattern: '^[^\s]+$' - x-dependency: - type: + x-dependency: + type: value: send-spoe-group required: true spoe_group: type: string x-display-name: SPOE Group pattern: '^[^\s]+$' - x-dependency: - type: + x-dependency: + type: value: send-spoe-group required: true acl_file: @@ -762,7 +762,7 @@ http_request_rule: x-display-name: ACL File pattern: '^[^\s]+$' x-dependency: - type: + type: value: [add-acl, del-acl] required: true acl_keyfmt: @@ -770,7 +770,7 @@ http_request_rule: x-display-name: ACL Key Format pattern: '^[^\s]+$' x-dependency: - type: + type: value: [add-acl, del-acl] required: true cond: @@ -784,8 +784,8 @@ http_request_rule: operation: getACLs property: acl_name freeFormat: true - x-dependency: - cond: + x-dependency: + cond: required: true additionalProperties: false example: @@ -814,30 +814,30 @@ http_response_rule: type: string x-display-name: Redirect Type enum: [location, prefix, scheme] - x-dependency: - type: + x-dependency: + type: value: redirect required: true redir_value: type: string x-display-name: Redirect Value pattern: '^[^\s]+$' - x-dependency: - type: + x-dependency: + type: value: redirect required: true redir_code: type: integer x-display-name: Redirect Code enum: [301, 302, 303] - x-dependency: - type: + x-dependency: + type: value: redirect redir_option: type: string x-display-name: Redirect Option - x-dependency: - type: + x-dependency: + type: value: redirect required: true hdr_name: @@ -845,7 +845,7 @@ http_response_rule: x-display-name: Header Name pattern: '^[^\s]+$' x-dependency: - type: + type: value: [add-header, replace-header, del-header, set-header, replace-value] required: true hdr_match: @@ -853,7 +853,7 @@ http_response_rule: x-display-name: Header Match pattern: '^[^\s]+$' x-dependency: - type: + type: value: [replace-header, replace-value] required: true hdr_format: @@ -861,35 +861,35 @@ http_response_rule: x-display-name: Header Format pattern: '^[^\s]+$' x-dependency: - type: + type: value: [replace-header, replace-value, set-header, add-header] required: true log_level: type: string enum: [emerg, alert, crit, err, warning, notice, info, debug, silent] - x-dependency: - type: + x-dependency: + type: value: set-log-level required: true var_name: type: string pattern: '^[^\s]+$' - x-dependency: - type: + x-dependency: + type: value: set-var required: true var_scope: type: string pattern: '^[^\s]+$' - x-dependency: - type: + x-dependency: + type: value: set-var required: true var_expr: type: string x-display-name: Var Expression - x-dependency: - type: + x-dependency: + type: value: set-var required: true status: @@ -897,42 +897,42 @@ http_response_rule: minimum: 100 maximum: 999 x-nullable: false - x-dependency: - type: + x-dependency: + type: value: set-status required: true status_reason: type: string - x-dependency: - type: + x-dependency: + type: value: set-status spoe_engine: type: string pattern: '^[^\s]+$' - x-dependency: - type: + x-dependency: + type: value: send-spoe-group required: true spoe_group: type: string pattern: '^[^\s]+$' - x-dependency: - type: + x-dependency: + type: value: send-spoe-group required: true acl_file: type: string pattern: '^[^\s]+$' - x-dependency: - type: + x-dependency: + type: value: [add-acl, del-acl] required: true acl_keyfmt: type: string x-display-name: ACK Key Format pattern: '^[^\s]+$' - x-dependency: - type: + x-dependency: + type: value: [add-acl, del-acl] required: true cond: @@ -946,8 +946,8 @@ http_response_rule: operation: getACLs property: acl_name freeFormat: true - x-dependency: - cond: + x-dependency: + cond: required: true additionalProperties: false example: @@ -972,27 +972,27 @@ tcp_request_rule: type: string enum: [connection, content, inspect-delay, session] x-nullable: false - action: + action: type: string enum: [accept, reject] x-nullable: false - x-dependency: - type: + x-dependency: + type: value: [connection, content, session] required: true timeout: type: integer x-nullable: true - x-dependency: - type: + x-dependency: + type: value: inspect-delay required: true cond: type: string x-display-name: Condition enum: [if, unless] - x-dependency: - type: + x-dependency: + type: value: [connection, content, session] cond_test: type: string @@ -1001,8 +1001,8 @@ tcp_request_rule: operation: getACLs property: acl_name freeFormat: true - x-dependency: - cond: + x-dependency: + cond: required: true type: value: [connection, content, session] @@ -1028,27 +1028,27 @@ tcp_response_rule: type: string enum: [content, inspect-delay] x-nullable: false - action: + action: type: string enum: [accept, reject] x-nullable: false - x-dependency: - type: + x-dependency: + type: value: content required: true timeout: type: integer x-nullable: true - x-dependency: - type: + x-dependency: + type: value: inspect-delay required: true cond: type: string x-display-name: Condition enum: [if, unless] - x-dependency: - type: + x-dependency: + type: value: content cond_test: type: string @@ -1057,10 +1057,10 @@ tcp_response_rule: operation: getACLs property: acl_name freeFormat: true - x-dependency: + x-dependency: cond: required: true - type: + type: value: content additionalProperties: false example: @@ -1098,7 +1098,7 @@ backend_switching_rule: operation: getACLs property: acl_name freeFormat: true - x-dependency: + x-dependency: cond: required: true additionalProperties: false @@ -1136,7 +1136,7 @@ server_switching_rule: operation: getACLs property: acl_name freeFormat: true - x-dependency: + x-dependency: cond: required: true additionalProperties: false @@ -1163,44 +1163,44 @@ filter: trace_name: type: string pattern: '^[^\s]+$' - x-dependency: - type: + x-dependency: + type: value: trace trace_rnd_parsing: type: boolean x-display-name: Trace Random Parsing - x-dependency: - type: + x-dependency: + type: value: trace trace_rnd_forwarding: type: boolean x-display-name: Trace Random Forwarding - x-dependency: - type: + x-dependency: + type: value: trace trace_hexdump: type: boolean - x-dependency: - type: + x-dependency: + type: value: trace spoe_engine: type: string pattern: '^[^\s]+$' - x-dependency: - type: + x-dependency: + type: value: spoe spoe_config: type: string pattern: '^[^\s]+$' - x-dependency: - type: + x-dependency: + type: value: spoe required: true cache_name: type: string pattern: '^[^\s]+$' - x-dependency: - type: + x-dependency: + type: value: cache required: true additionalProperties: false @@ -1243,7 +1243,7 @@ stick_rule: operation: getACLs property: acl_name freeFormat: true - x-dependency: + x-dependency: cond: required: true additionalProperties: false @@ -1251,7 +1251,7 @@ stick_rule: id: 0 type: storeonly pattern: src -log_target: +log_target: title: Log Target description: Per-instance logging of events and traffic. type: object @@ -1268,60 +1268,60 @@ log_target: address: type: string pattern: '^[^\s]+$' - x-dependency: - global: + x-dependency: + global: value: false required: true - nolog: + nolog: value: false required: true length: type: integer - x-dependency: - global: + x-dependency: + global: value: false - nolog: + nolog: value: false format: type: string enum: [rfc3164, rfc5424, short, raw] - x-dependency: - global: + x-dependency: + global: value: false - nolog: + nolog: value: false facility: type: string enum: [kern, user, mail, daemon, auth, syslog, lpr, news, uucp, cron, auth2, ftp, ntp, audit, alert, cron2, local0,local1, local2, local3, local4, local5, local6, local7] - x-dependency: - global: + x-dependency: + global: value: false required: true - nolog: + nolog: value: false required: true level: type: string enum: [emerg, alert, crit, err, warning, notice, info, debug] - x-dependency: - global: + x-dependency: + global: value: false - nolog: + nolog: value: false minlevel: type: string enum: [emerg, alert, crit, err, warning, notice, info, debug] - x-dependency: - global: + x-dependency: + global: value: false - nolog: + nolog: value: false level: required: false additionalProperties: false acl: title: ACL Lines - description: | + description: | The use of Access Control Lists (ACL) provides a flexible solution to perform content switching and generally to take decisions based on content extracted from the request, the response or any environmental status. @@ -1335,7 +1335,7 @@ acl: id: type: integer x-nullable: true - acl_name: + acl_name: type: string pattern: '^[^\s]+$' x-nullable: false @@ -1423,7 +1423,7 @@ errorfile: type: object x-display-name: Error File properties: - code: + code: type: integer enum: [200, 400, 403, 405, 408, 425, 429, 500, 502, 503, 504] file: diff --git a/models/simple.yaml b/models/simple.yaml index 1e6f310..cb26463 100644 --- a/models/simple.yaml +++ b/models/simple.yaml @@ -3,13 +3,13 @@ site: description: | Site configuration. Sites are considered as one service and all farms connected to that service. Farms are connected to service using use-backend and default_backend directives. Sites let you - configure simple HAProxy configurations, for more advanced options use /haproxy/configuration + configure simple HAProxy configurations, for more advanced options use /haproxy/configuration endpoints. type: object required: - name properties: - name: + name: type: string pattern: '^[A-Za-z0-9-_.:]+$' x-nullable: false @@ -24,7 +24,7 @@ site: x-display-name: HTTP Connection Mode enum: [http-tunnel, httpclose, forced-close, http-server-close, http-keep-alive] x-dependency: - mode: + mode: value: http maxconn: type: integer @@ -47,7 +47,7 @@ site: type: string pattern: '^[A-Za-z0-9-_.:]+$' x-nullable: false - use_as: + use_as: type: string enum: [default, conditional] x-nullable: false @@ -56,14 +56,14 @@ site: x-display-name: Condition enum: [if, unless] x-dependency: - use_as: + use_as: value: conditional required: true cond_test: type: string x-display-name: Condition Test x-dependency: - use_as: + use_as: value: conditional required: true balance: @@ -73,9 +73,9 @@ site: enum: [http, tcp] forwardfor: $ref: "#/definitions/forwardfor" - servers: + servers: type: array - items: + items: $ref: "#/definitions/server" additionalProperties: false example: @@ -94,10 +94,10 @@ site: farms: - name: www_backend use_as: default - balance: + balance: algorithm: roundrobin mode: http - servers: + servers: - name: www_server address: 127.0.1.1 port: 4567 diff --git a/paths/haproxy.yaml b/paths/haproxy.yaml index 3744d86..8a2b194 100644 --- a/paths/haproxy.yaml +++ b/paths/haproxy.yaml @@ -2516,7 +2516,7 @@ stick_rules: $ref: '#/responses/DefaultError' stick_rules_one: get: - summary: Return one Stick Rule + summary: Return one Stick Rule description: Returns one Stick Rule configuration by it's ID in the specified backend. operationId: getStickRule tags: diff --git a/paths/simple.yaml b/paths/simple.yaml index ef96eca..98cd850 100644 --- a/paths/simple.yaml +++ b/paths/simple.yaml @@ -73,7 +73,7 @@ sites_one: description: Site frontend name required: true type: string - - $ref: "#/parameters/transaction_id" + - $ref: "#/parameters/transaction_id" responses: '200': description: Successful operation From 170a0b4d8b40d2cf2c20de876432f1036a8756c3 Mon Sep 17 00:00:00 2001 From: Kashif Minhaj Date: Thu, 27 Feb 2020 14:42:19 +0530 Subject: [PATCH 6/6] MINOR: server: add proto option --- build/haproxy_spec.yaml | 12 ++++++++---- models/haproxy.yaml | 3 +++ 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/build/haproxy_spec.yaml b/build/haproxy_spec.yaml index 1c15b9b..57702d9 100644 --- a/build/haproxy_spec.yaml +++ b/build/haproxy_spec.yaml @@ -16,10 +16,11 @@ externalDocs: definitions: site: additionalProperties: false - description: "Site configuration. Sites are considered as one service and all farms - connected to that service.\nFarms are connected to service using use-backend and - default_backend directives. Sites let you\nconfigure simple HAProxy configurations, - for more advanced options use /haproxy/configuration \nendpoints.\n" + description: | + Site configuration. Sites are considered as one service and all farms connected to that service. + Farms are connected to service using use-backend and default_backend directives. Sites let you + configure simple HAProxy configurations, for more advanced options use /haproxy/configuration + endpoints. example: farms: - balance: @@ -823,6 +824,9 @@ definitions: minimum: 1 type: integer x-nullable: true + proto: + pattern: ^[^\s]+$ + type: string send-proxy: enum: - enabled diff --git a/models/haproxy.yaml b/models/haproxy.yaml index b658bf7..6b67b8c 100644 --- a/models/haproxy.yaml +++ b/models/haproxy.yaml @@ -559,6 +559,9 @@ server: check: type: string enum: [enabled, disabled] + proto: + type: string + pattern: '^[^\s]+$' maintenance: type: string enum: [enabled, disabled]