Merge "Drop IP & hostname regexes for formats"

This commit is contained in:
Zuul 2018-06-08 14:06:31 +00:00 committed by Gerrit Code Review
commit ec912fde36
1 changed files with 12 additions and 7 deletions

View File

@ -13,19 +13,24 @@ data:
pattern: '^(\d|[1-9]\d|1\d\d|2([0-4]\d|5[0-5]))\.(\d|[1-9]\d|1\d\d|2([0-4]\d|5[0-5]))\.(\d|[1-9]\d|1\d\d|2([0-4]\d|5[0-5]))\.(\d|[1-9]\d|1\d\d|2([0-4]\d|5[0-5]))\/([0-9]|[1-2][0-9]|3[0-2])$' pattern: '^(\d|[1-9]\d|1\d\d|2([0-4]\d|5[0-5]))\.(\d|[1-9]\d|1\d\d|2([0-4]\d|5[0-5]))\.(\d|[1-9]\d|1\d\d|2([0-4]\d|5[0-5]))\.(\d|[1-9]\d|1\d\d|2([0-4]\d|5[0-5]))\/([0-9]|[1-2][0-9]|3[0-2])$'
domain_name: domain_name:
type: string type: string
pattern: '^([a-z][a-z0-9-]+\.)+[a-z]+\.?$' format: hostname
domain_suffix:
type: string
pattern: '^\.[a-z0-9][a-z0-9-\.]*$'
hostname: hostname:
type: string type: string
pattern: '^([a-z][a-z0-9-]+)(\.+[a-z]+\.)?$' format: hostname
hostname_or_ip_address: hostname_or_ip_address:
type: string anyOf:
pattern: '^(([a-z][a-z0-9-]+)(\.+[a-z]+\.)?|(\d|[1-9]\d|1\d\d|2([0-4]\d|5[0-5]))\.(\d|[1-9]\d|1\d\d|2([0-4]\d|5[0-5]))\.(\d|[1-9]\d|1\d\d|2([0-4]\d|5[0-5]))\.(\d|[1-9]\d|1\d\d|2([0-4]\d|5[0-5])))$' - $ref: '#/definitions/hostname'
- $ref: '#/definitions/ip_address'
- $ref: '#/definitions/domain_suffix'
ip_address: ip_address:
type: string type: string
pattern: '^(\d|[1-9]\d|1\d\d|2([0-4]\d|5[0-5]))\.(\d|[1-9]\d|1\d\d|2([0-4]\d|5[0-5]))\.(\d|[1-9]\d|1\d\d|2([0-4]\d|5[0-5]))\.(\d|[1-9]\d|1\d\d|2([0-4]\d|5[0-5]))$' format: ipv4
url: url:
type: string type: string
# XXX add regex format: uri
type: object type: object
properties: properties:
@ -102,7 +107,7 @@ data:
additional_no_proxy: additional_no_proxy:
type: array type: array
items: items:
type: 'string' $ref: '#/definitions/hostname_or_ip_address'
url: url:
$ref: '#/definitions/url' $ref: '#/definitions/url'
required: required: