Skip to content

Commit

Permalink
Merging to release-5-lts: [TT-5012] add schema pattern for domain nam…
Browse files Browse the repository at this point in the history
…e validation (#5975) (#6010)

[TT-5012] add schema pattern for domain name validation (#5975)

[TT-5012]:
https://tyktech.atlassian.net/browse/TT-5012?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

Co-authored-by: Jeffy Mathew <[email protected]>
  • Loading branch information
buger and jeffy-mathew authored Feb 1, 2024
1 parent 3de6f56 commit 4cd1c5f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions apidef/oas/schema/x-tyk-api-gateway.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
"type": "object",
"properties": {
"domain": {
"type": "string"
"$ref": "#/definitions/X-Tyk-DomainDef"
},
"certificate": {
"type": "string"
Expand Down Expand Up @@ -132,7 +132,7 @@
"type": "object",
"properties": {
"domain": {
"type": "string"
"$ref": "#/definitions/X-Tyk-DomainDef"
},
"publicKeys": {
"type": "array",
Expand Down Expand Up @@ -1344,6 +1344,10 @@
"name",
"value"
]
},
"X-Tyk-DomainDef": {
"type": "string",
"pattern": "^([*a-zA-Z0-9-]+(\\.[*a-zA-Z0-9-]+)*)(:\\d+)?$"
}
}
}

0 comments on commit 4cd1c5f

Please sign in to comment.