99)
1010
1111const (
12- deepObjectURL = `/v2/fake/deep_object_test?inputOptions[F1]=1&inputOptions[F2]=teststring&inputOptions[F3]=null&inputOptions[id]=1&inputOptions[name]=TestCat&test_pet[F1]=1&test_pet[F2]=teststring&test_pet[F3]=null&test_pet[id]=1&test_pet[name]=Test&test_pet[photoUrls]=http%3A%2F%2Flocalhost&test_pet[tags][F1]=1&test_pet[tags][F2]=teststring&test_pet[tags][F3]=null&test_pet[tags][id]=2&test_pet[tags][name]=tag1`
12+ deepObjectURL = `/v2/fake/deep_object_test?inputOptions[F1]=1&inputOptions[F2]=teststring&inputOptions[F3]=null&inputOptions[id]=1&inputOptions[name]=TestCat&test_pet[F1]=1&test_pet[F2]=teststring&test_pet[F3]=null&test_pet[id]=1&test_pet[name]=Test&test_pet[photoUrls]=http%3A%2F%2Flocalhost&test_pet[tags][F1]=1&test_pet[tags][F2]=teststring&test_pet[tags][F3]=null&test_pet[tags][id]=2&test_pet[tags][name]=tag1`
13+ paramCollectionFormatURL = `/v2/fake/test-query-parameters?context=context&http=http&ioutil=ioutil&pipe=pipe&url=url`
1314)
1415
1516// TestPutBodyWithFileSchema ensures a model with the name 'File'
@@ -39,12 +40,12 @@ func TestQueryDeepObject(t *testing.T) {
3940 var idTag1 = int64 (2 )
4041 var nameTag1 = "tag1"
4142 req = req .TestPet (sw.Pet {
42- Id : & id ,
43- Name : "Test" ,
44- PhotoUrls : []string { "http://localhost" },
43+ Id : & id ,
44+ Name : "Test" ,
45+ PhotoUrls : []string {"http://localhost" },
4546 Tags : []sw.Tag {
4647 {
47- Id : & idTag1 ,
48+ Id : & idTag1 ,
4849 Name : & nameTag1 ,
4950 AdditionalProperties : map [string ]interface {}{
5051 "F1" : 1 ,
@@ -61,7 +62,7 @@ func TestQueryDeepObject(t *testing.T) {
6162 })
6263 var idcat = int64 (1 )
6364 req = req .InputOptions (sw.Category {
64- Id : & idcat ,
65+ Id : & idcat ,
6566 Name : "TestCat" ,
6667 AdditionalProperties : map [string ]interface {}{
6768 "F1" : 1 ,
@@ -76,5 +77,22 @@ func TestQueryDeepObject(t *testing.T) {
7677
7778 assert .Equal (t ,
7879 expectedDeepObjectURL ,
79- r .Request .URL .String () )
80+ r .Request .URL .String ())
81+ }
82+
83+ func TestQueryParameterCollectionFormat (t * testing.T ) {
84+ req := client .FakeAPI .TestQueryParameterCollectionFormat (context .Background ()).
85+ Pipe ([]string {"pipe" }).
86+ Ioutil ([]string {"ioutil" }).
87+ Http ([]string {"http" }).
88+ Url ([]string {"url" }).
89+ Context ([]string {"context" })
90+
91+ r , _ := req .Execute ()
92+
93+ var expectedParamCollectionFormatURL = testScheme + "://" + testHost + paramCollectionFormatURL
94+
95+ assert .Equal (t ,
96+ expectedParamCollectionFormatURL ,
97+ r .Request .URL .String ())
8098}
0 commit comments