Skip to content

Commit bbb70b4

Browse files
committed
Merge branch 'context' of https://github.com/bvwells/swagger-codegen into bvwells-context
2 parents 432b358 + 5e8e78e commit bbb70b4

File tree

18 files changed

+24
-24
lines changed

18 files changed

+24
-24
lines changed

modules/swagger-codegen/src/main/resources/go/api.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ package {{packageName}}
33

44
{{#operations}}
55
import (
6+
"context"
67
"io/ioutil"
78
"net/http"
89
"net/url"
910
"strings"
10-
"context"
1111
{{#imports}} "{{import}}"
1212
{{/imports}}
1313
)

modules/swagger-codegen/src/main/resources/go/client.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package {{packageName}}
33

44
import (
55
"bytes"
6+
"context"
67
"encoding/json"
78
"encoding/xml"
89
"errors"
@@ -20,7 +21,6 @@ import (
2021
"time"
2122
"unicode/utf8"
2223

23-
"context"
2424
"golang.org/x/oauth2"
2525
)
2626

samples/client/petstore/go/go-petstore-withXml/api/swagger.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,11 @@ paths:
107107
type: "array"
108108
items:
109109
type: "string"
110+
default: "available"
110111
enum:
111112
- "available"
112113
- "pending"
113114
- "sold"
114-
default: "available"
115115
collectionFormat: "csv"
116116
x-exportParamName: "Status"
117117
responses:
@@ -639,10 +639,10 @@ paths:
639639
type: "array"
640640
items:
641641
type: "string"
642+
default: "$"
642643
enum:
643644
- ">"
644645
- "$"
645-
default: "$"
646646
x-exportParamName: "EnumFormStringArray"
647647
- name: "enum_form_string"
648648
in: "formData"
@@ -663,10 +663,10 @@ paths:
663663
type: "array"
664664
items:
665665
type: "string"
666+
default: "$"
666667
enum:
667668
- ">"
668669
- "$"
669-
default: "$"
670670
x-exportParamName: "EnumHeaderStringArray"
671671
- name: "enum_header_string"
672672
in: "header"
@@ -687,10 +687,10 @@ paths:
687687
type: "array"
688688
items:
689689
type: "string"
690+
default: "$"
690691
enum:
691692
- ">"
692693
- "$"
693-
default: "$"
694694
x-exportParamName: "EnumQueryStringArray"
695695
- name: "enum_query_string"
696696
in: "query"

samples/client/petstore/go/go-petstore-withXml/api_another_fake.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
package petstore
1212

1313
import (
14+
"context"
1415
"io/ioutil"
1516
"net/http"
1617
"net/url"
1718
"strings"
18-
"context"
1919
)
2020

2121
// Linger please

samples/client/petstore/go/go-petstore-withXml/api_fake.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
package petstore
1212

1313
import (
14+
"context"
1415
"io/ioutil"
1516
"net/http"
1617
"net/url"
1718
"strings"
18-
"context"
1919
"github.com/antihax/optional"
2020
)
2121

samples/client/petstore/go/go-petstore-withXml/api_fake_classname_tags123.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
package petstore
1212

1313
import (
14+
"context"
1415
"io/ioutil"
1516
"net/http"
1617
"net/url"
1718
"strings"
18-
"context"
1919
)
2020

2121
// Linger please

samples/client/petstore/go/go-petstore-withXml/api_pet.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
package petstore
1212

1313
import (
14+
"context"
1415
"io/ioutil"
1516
"net/http"
1617
"net/url"
1718
"strings"
18-
"context"
1919
"fmt"
2020
"github.com/antihax/optional"
2121
"os"

samples/client/petstore/go/go-petstore-withXml/api_store.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
package petstore
1212

1313
import (
14+
"context"
1415
"io/ioutil"
1516
"net/http"
1617
"net/url"
1718
"strings"
18-
"context"
1919
"fmt"
2020
)
2121

samples/client/petstore/go/go-petstore-withXml/api_user.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
package petstore
1212

1313
import (
14+
"context"
1415
"io/ioutil"
1516
"net/http"
1617
"net/url"
1718
"strings"
18-
"context"
1919
"fmt"
2020
)
2121

samples/client/petstore/go/go-petstore-withXml/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ package petstore
1212

1313
import (
1414
"bytes"
15+
"context"
1516
"encoding/json"
1617
"encoding/xml"
1718
"errors"
@@ -29,7 +30,6 @@ import (
2930
"time"
3031
"unicode/utf8"
3132

32-
"context"
3333
"golang.org/x/oauth2"
3434
)
3535

0 commit comments

Comments
 (0)