mirror of
https://github.com/openziti/ziti.git
synced 2026-09-22 02:24:00 +00:00
Fix issues with host.v1 config type schema (#640)
- require "low", "high" properties in portRange - fixed allowedAddresses item type in json schema docs
This commit is contained in:
@@ -316,6 +316,7 @@ var tunnelDefinitions = map[string]interface{}{
|
||||
"low": map[string]interface{}{"$ref": "#/definitions/portNumber"},
|
||||
"high": map[string]interface{}{"$ref": "#/definitions/portNumber"},
|
||||
},
|
||||
"required": []interface{}{"low", "high"},
|
||||
},
|
||||
"protocolName": map[string]interface{}{
|
||||
"type": "string",
|
||||
|
||||
@@ -22,7 +22,7 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
CurrentDbVersion = 21
|
||||
CurrentDbVersion = 22
|
||||
FieldVersion = "version"
|
||||
)
|
||||
|
||||
@@ -91,6 +91,11 @@ func (m *Migrations) migrate(step *boltz.MigrationStep) int {
|
||||
step.SetError(m.stores.ConfigType.Update(step.Ctx, hostV2ConfigType, nil))
|
||||
}
|
||||
|
||||
if step.CurrentVersion < 22 {
|
||||
step.SetError(m.stores.ConfigType.Update(step.Ctx, hostV1ConfigType, nil))
|
||||
step.SetError(m.stores.ConfigType.Update(step.Ctx, hostV2ConfigType, nil))
|
||||
}
|
||||
|
||||
// current version
|
||||
if step.CurrentVersion <= CurrentDbVersion {
|
||||
return CurrentDbVersion
|
||||
|
||||
@@ -71,7 +71,11 @@
|
||||
"high": {
|
||||
"$ref": "#/$defs/portNumber"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"low",
|
||||
"high"
|
||||
]
|
||||
},
|
||||
"protocolName": {
|
||||
"type": "string",
|
||||
@@ -136,7 +140,7 @@
|
||||
{
|
||||
"if": {
|
||||
"properties": {
|
||||
"forwardProtocol": {
|
||||
"forwardPort": {
|
||||
"const": true
|
||||
}
|
||||
},
|
||||
@@ -173,7 +177,7 @@
|
||||
},
|
||||
{
|
||||
"items": {
|
||||
"$ref": "#/$defs/dialAddress"
|
||||
"$ref": "#/$defs/listenAddress"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -156,7 +156,11 @@
|
||||
"high": {
|
||||
"$ref": "#/definitions/portNumber"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"low",
|
||||
"high"
|
||||
]
|
||||
},
|
||||
"protocolName": {
|
||||
"type": "string",
|
||||
@@ -258,7 +262,7 @@
|
||||
{
|
||||
"if": {
|
||||
"properties": {
|
||||
"forwardProtocol": {
|
||||
"forwardPort": {
|
||||
"const": true
|
||||
}
|
||||
},
|
||||
@@ -295,7 +299,7 @@
|
||||
},
|
||||
{
|
||||
"items": {
|
||||
"$ref": "#/definitions/dialAddress"
|
||||
"$ref": "#/definitions/listenAddress"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user