From 6fdb41f4af73fff5d57e35301b4349fb2771e018 Mon Sep 17 00:00:00 2001 From: Carlos A Becker Date: Tue, 26 Jul 2022 09:18:30 -0300 Subject: [PATCH] fix: jsonschema hopefully fixes #3238 Signed-off-by: Carlos A Becker --- pkg/config/config.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pkg/config/config.go b/pkg/config/config.go index f138b2662..85125a8f2 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -460,14 +460,10 @@ func (f *File) UnmarshalYAML(unmarshal func(interface{}) error) error { } func (f File) JSONSchema() *jsonschema.Schema { - type t File reflector := jsonschema.Reflector{ ExpandedStruct: true, } - schema := reflector.Reflect(&t{}) - // jsonschema would just refer to FileInfo in the definition. It doesn't get included there, as we override the - // generated schema with JSONSchema here. So we need to include it directly in the schema of File. - schema.Properties.Set("info", reflector.Reflect(&FileInfo{}).Type) + schema := reflector.Reflect(&File{}) return &jsonschema.Schema{ OneOf: []*jsonschema.Schema{ {