Skip to content

Commit ab68e45

Browse files
committed
made dockerfile non-mandatory, deleted generate.go as per suggestion. Also changed map to interface
1 parent 616da5c commit ab68e45

4 files changed

Lines changed: 6 additions & 39 deletions

File tree

docs/schemas/config-jsonschema.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -869,8 +869,7 @@
869869
},
870870
"type": "object",
871871
"required": [
872-
"image",
873-
"dockerfile"
872+
"image"
874873
],
875874
"description": "Image defines the image specification"
876875
},

docs/schemas/config-openapi.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -877,8 +877,7 @@
877877
},
878878
"type": "object",
879879
"required": [
880-
"image",
881-
"dockerfile"
880+
"image"
882881
],
883882
"description": "Image defines the image specification"
884883
},

hack/genjsonschema/generate.go

Lines changed: 0 additions & 31 deletions
This file was deleted.

pkg/devspace/config/versions/latest/schema.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ func (p *Pipeline) UnmarshalYAML(unmarshal func(interface{}) error) error {
179179
pipelineString := ""
180180
err := unmarshal(&pipelineString)
181181
if err != nil {
182-
m := map[string]interface{}{}
182+
var m interface{}
183183
err := unmarshal(m)
184184
if err != nil {
185185
return err
@@ -245,7 +245,7 @@ type Image struct {
245245

246246
// Dockerfile specifies a path (relative or absolute) to the dockerfile. Defaults
247247
// to ./Dockerfile
248-
Dockerfile string `yaml:"dockerfile" json:"dockerfile" jsonschema:"default=./Dockerfile" jsonschema_extras:"group=buildConfig" jsonschema_description:"Dockerfile specifies a path (relative or absolute) to the dockerfile. Defaults to ./Dockerfile."`
248+
Dockerfile string `yaml:"dockerfile,omitempty" json:"dockerfile,omitempty" jsonschema:"default=./Dockerfile" jsonschema_extras:"group=buildConfig" jsonschema_description:"Dockerfile specifies a path (relative or absolute) to the dockerfile. Defaults to ./Dockerfile."`
249249

250250
// Context is the context path to build with. Defaults to the current working directory
251251
Context string `yaml:"context,omitempty" json:"context,omitempty" jsonschema:"default=./" jsonschema_extras:"group=buildConfig" jsonschema_description:"Context is the context path to build with. Defaults to the current working directory."`
@@ -1439,7 +1439,7 @@ func (c *CommandConfig) UnmarshalYAML(unmarshal func(interface{}) error) error {
14391439
commandString := ""
14401440
err := unmarshal(&commandString)
14411441
if err != nil {
1442-
m := map[string]interface{}{}
1442+
var m interface{}
14431443
err := unmarshal(m)
14441444
if err != nil {
14451445
return err
@@ -1509,7 +1509,7 @@ func (v *Variable) UnmarshalYAML(unmarshal func(interface{}) error) error {
15091509
varString := ""
15101510
err := unmarshal(&varString)
15111511
if err != nil {
1512-
m := map[string]interface{}{}
1512+
var m interface{}
15131513
err := unmarshal(m)
15141514
if err != nil {
15151515
return err

0 commit comments

Comments
 (0)