Skip to content

Commit 8bf4648

Browse files
fix(edge-app): fix required fields for data (#69)
1 parent 4d6912e commit 8bf4648

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

client/image_configuration/image_configuration_get_image_by_name_responses.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"fmt"
55
"io"
66

7+
"github.com/davecgh/go-spew/spew"
78
"github.com/go-openapi/runtime"
89
"github.com/go-openapi/strfmt"
910

@@ -315,11 +316,11 @@ func (o *ImageConfigurationGetImageByNameNotFound) Code() int {
315316
}
316317

317318
func (o *ImageConfigurationGetImageByNameNotFound) Error() string {
318-
return fmt.Sprintf("[GET /v1/apps/images/name/{name}][%d] imageConfigurationGetImageByNameNotFound %+v", 404, o.Payload)
319+
return fmt.Sprintf("GET /v1/apps/images/name/{name} => Not Found: %d\n%+v", 404, spew.Sdump(o.Payload.Error))
319320
}
320321

321322
func (o *ImageConfigurationGetImageByNameNotFound) String() string {
322-
return fmt.Sprintf("[GET /v1/apps/images/name/{name}][%d] imageConfigurationGetImageByNameNotFound %+v", 404, o.Payload)
323+
return fmt.Sprintf("GET /v1/apps/images/name/{name} => Not Found: %d\n%+v", 404, spew.Sdump(o.Payload.Error))
323324
}
324325

325326
func (o *ImageConfigurationGetImageByNameNotFound) GetPayload() *models.ZsrvResponse {

schemas/image.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ func Image() map[string]*schema.Schema {
182182
"datastore_id": {
183183
Description: `Datastore Id where image binary is located.`,
184184
Type: schema.TypeString,
185-
Required: true,
185+
Optional: true,
186186
},
187187

188188
"description": {
@@ -200,7 +200,7 @@ func Image() map[string]*schema.Schema {
200200
"image_arch": {
201201
Description: `Image Architecture.`,
202202
Type: schema.TypeString,
203-
Required: true,
203+
Optional: true,
204204
},
205205

206206
"image_error": {
@@ -212,7 +212,7 @@ func Image() map[string]*schema.Schema {
212212
"image_format": {
213213
Description: `Image binary format.`,
214214
Type: schema.TypeString,
215-
Required: true,
215+
Optional: true,
216216
},
217217

218218
"image_local": {
@@ -248,7 +248,7 @@ func Image() map[string]*schema.Schema {
248248
"image_type": {
249249
Description: `Image type`,
250250
Type: schema.TypeString,
251-
Required: true,
251+
Optional: true,
252252
},
253253

254254
"image_version": {
@@ -290,7 +290,7 @@ func Image() map[string]*schema.Schema {
290290
"title": {
291291
Description: `User defined title of the image. Title can be changed at any time.`,
292292
Type: schema.TypeString,
293-
Required: true,
293+
Optional: true,
294294
},
295295
}
296296
}

0 commit comments

Comments
 (0)