diff --git a/pkg/visor/visorconfig/parse.go b/pkg/visor/visorconfig/parse.go index 1cfbd026db..5306e47825 100644 --- a/pkg/visor/visorconfig/parse.go +++ b/pkg/visor/visorconfig/parse.go @@ -34,7 +34,10 @@ func Parse(log *logging.MasterLogger, path string, raw []byte) (*V1, error) { } switch cc.Version { - case V1Name: // Current version. + // parse any v1-compatible version with v1 parse procedure + case V110Name: + fallthrough + case V100Name: return parseV1(cc, raw) case V0Name, V0NameOldFormat, "": return parseV0(cc, raw) @@ -47,7 +50,6 @@ func parseV1(cc *Common, raw []byte) (*V1, error) { conf := MakeBaseConfig(cc) dec := json.NewDecoder(bytes.NewReader(raw)) - dec.DisallowUnknownFields() if err := dec.Decode(&conf); err != nil { return nil, err } diff --git a/pkg/visor/visorconfig/v1.go b/pkg/visor/visorconfig/v1.go index 0426b4648e..4d78867d09 100644 --- a/pkg/visor/visorconfig/v1.go +++ b/pkg/visor/visorconfig/v1.go @@ -12,8 +12,15 @@ import ( //go:generate readmegen -n V1 -o ./README.md ./v1.go -// V1Name is the semantic version string for V1. -const V1Name = "v1.0.0" +// V100Name is the semantic version string for v1.0.0. +const V100Name = "v1.0.0" + +// V110Name is the semantic version string for v1.1.0. +// Added MinHops field to V1Routing section of config +const V110Name = "v1.1.0" + +// V1Name is the semantic version string for the most recent version of V1. +const V1Name = V110Name // V1 is visor config v1.0.0 type V1 struct {