Skip to content

Commit 107de02

Browse files
committed
Updated the width and height types to default so they remain as strings
Refer : #5
1 parent 471db20 commit 107de02

File tree

6 files changed

+64
-70
lines changed

6 files changed

+64
-70
lines changed

esign_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ func TestOp_Do_FileUpload(t *testing.T) {
335335
Transport: &ctxclient.ErrorTransport{Err: errors.New("ERROR")},
336336
})
337337
ctx := context.Background()
338-
if err := op.Do(ctx, nil); err == nil || err.Error() != "Post https://www.example.com/restapi/v2/accounts/1234/multipart/go: ERROR" {
338+
if err := op.Do(ctx, nil); err == nil || err.Error() != "Post \"https://www.example.com/restapi/v2/accounts/1234/multipart/go\": ERROR" {
339339
t.Fatalf("multipart test expected post error; got %v", err)
340340
}
341341
time.Sleep(time.Second)

examples_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -309,8 +309,8 @@ func Example_create_envelope_fileupload() {
309309
TabStyle: model.TabStyle{
310310
Name: "This is the tab tooltip",
311311
},
312-
Width: 300,
313-
Height: 150,
312+
Width: "300",
313+
Height: "150",
314314
},
315315
},
316316
},

gen-esign/overrides.go

-8
Original file line numberDiff line numberDiff line change
@@ -1648,14 +1648,6 @@ func TabDefsV21(defMap map[string]Definition, overrides map[string]map[string]st
16481648
defOverrides = make(map[string]string)
16491649
overrides[dx.ID] = defOverrides
16501650
}
1651-
// NOTE: in v2.1 swagger files, these are listed as strings.
1652-
// TODO: Check for fix in future
1653-
if xmap["width"] {
1654-
defOverrides["width"] = "int32"
1655-
}
1656-
if xmap["height"] {
1657-
defOverrides["height"] = "int32"
1658-
}
16591651

16601652
memberOf := make([]string, 0) // tab types for this tab
16611653
// Loop thru each tab type

go.mod

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
module github.com/jfcote87/esign
22

3+
go 1.14
4+
35
require (
46
cloud.google.com/go v0.43.0 // indirect
57
github.com/hashicorp/golang-lru v0.5.3 // indirect

legacy/example_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import (
99
"fmt"
1010
"log"
1111

12-
"github.com/jfcote87/esign/v2/folders"
1312
"github.com/jfcote87/esign/legacy"
13+
"github.com/jfcote87/esign/v2/folders"
1414
)
1515

1616
func Example_config() {

0 commit comments

Comments
 (0)