Skip to content

Commit 940814f

Browse files
committed
fix null type of values schema
1 parent 550cade commit 940814f

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

pkg/util/flags/flags.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ const (
4646
)
4747

4848
const (
49+
typeNull = "null"
4950
typeString = "string"
5051
typeNumber = "number"
5152
typeInteger = "integer"
@@ -123,6 +124,8 @@ func buildOneFlag(cmd *cobra.Command, k string, s *spec.Schema, isArray bool) er
123124
}
124125
case typeArray:
125126
return fmt.Errorf("unsupported build flags for object with array nested within an array")
127+
case typeNull:
128+
return nil
126129
default:
127130
return fmt.Errorf("unsupported json schema type %s", s.Type)
128131
}
@@ -148,6 +151,8 @@ func buildOneFlag(cmd *cobra.Command, k string, s *spec.Schema, isArray bool) er
148151
if err := buildOneFlag(cmd, name, s.Items.Schema, true); err != nil {
149152
return err
150153
}
154+
case typeNull:
155+
return nil
151156
default:
152157
return fmt.Errorf("unsupported json schema type %s", s.Type)
153158
}

0 commit comments

Comments
 (0)