Skip to content

Commit 8bed971

Browse files
committed
BUG/MINOR: validation: ease regex validations
Ease regex validation on backend_switching_rule to allow using variables for backend name. Also remove regex check for cookie in backend and defaults to allow adding extra cookie parameters.
1 parent 99529e9 commit 8bed971

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

build/haproxy_spec.yaml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,6 @@ definitions:
271271
type: string
272272
x-display-name: Continous Statistics
273273
cookie:
274-
pattern: ^[^\s]+$
275274
type: string
276275
default_backend:
277276
pattern: ^[A-Za-z0-9-_.:]+$
@@ -537,7 +536,6 @@ definitions:
537536
type: integer
538537
x-nullable: true
539538
cookie:
540-
pattern: ^[^\s]+$
541539
type: string
542540
x-dependency:
543541
mode:
@@ -1479,7 +1477,7 @@ definitions:
14791477
type: integer
14801478
x-nullable: true
14811479
name:
1482-
pattern: ^[A-Za-z0-9-_.:]+$
1480+
pattern: ^[^\s]+$
14831481
type: string
14841482
x-display-name: Backend Name
14851483
x-dynamic-enum:
@@ -2438,6 +2436,22 @@ definitions:
24382436
$ref: "#/definitions/transaction"
24392437
info:
24402438
description: General API, OS and hardware information
2439+
example:
2440+
api:
2441+
build_date: "2019-08-21T17:31:56.000Z"
2442+
version: v1.2.1 45a3288.dev
2443+
system:
2444+
cpu_info:
2445+
model: Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz
2446+
num_cpus: 4
2447+
hostname: test
2448+
mem_info:
2449+
dataplaneapi_memory: 44755536
2450+
free_memory: 5790642176
2451+
total_memory: 16681517056
2452+
os_string: 'Linux 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019'
2453+
time: 1566401525
2454+
uptime: 87340
24412455
properties:
24422456
api:
24432457
properties:

models/haproxy.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,6 @@ defaults:
151151
x-display-name: Continous Statistics
152152
cookie:
153153
type: string
154-
pattern: '^[^\s]+$'
155154
client_timeout:
156155
type: integer
157156
x-nullable: true
@@ -358,7 +357,6 @@ backend:
358357
value: http
359358
cookie:
360359
type: string
361-
pattern: '^[^\s]+$'
362360
x-dependency:
363361
mode:
364362
value: http
@@ -1055,7 +1053,7 @@ backend_switching_rule:
10551053
x-nullable: true
10561054
name:
10571055
type: string
1058-
pattern: '^[A-Za-z0-9-_.:]+$'
1056+
pattern: '^[^\s]+$'
10591057
x-nullable: false
10601058
x-dynamic-enum:
10611059
operation: getBackends

0 commit comments

Comments
 (0)