1
1
/*
2
- * examples/examplepb/a_bit_of_everything.proto
2
+ * A Bit of Everything
3
3
*
4
4
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
5
*
6
- * OpenAPI spec version: version not set
7
- *
6
+ * OpenAPI spec version: 1.0
7
+
8
8
* Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
*/
10
10
@@ -91,7 +91,7 @@ func (a ABitOfEverythingServiceApi) Create(floatValue float32, doubleValue float
91
91
}
92
92
93
93
// to determine the Content-Type header
94
- localVarHttpContentTypes := []string { "application/json" , }
94
+ localVarHttpContentTypes := []string { "application/json" , "application/x-foo-mime" , }
95
95
96
96
// set Content-Type header
97
97
localVarHttpContentType := a .Configuration .APIClient .SelectHeaderContentType (localVarHttpContentTypes )
@@ -101,6 +101,7 @@ func (a ABitOfEverythingServiceApi) Create(floatValue float32, doubleValue float
101
101
// to determine the Accept header
102
102
localVarHttpHeaderAccepts := []string {
103
103
"application/json" ,
104
+ "application/x-foo-mime" ,
104
105
}
105
106
106
107
// set Accept header
@@ -150,7 +151,7 @@ func (a ABitOfEverythingServiceApi) CreateBody(body ExamplepbABitOfEverything) (
150
151
}
151
152
152
153
// to determine the Content-Type header
153
- localVarHttpContentTypes := []string { "application/json" , }
154
+ localVarHttpContentTypes := []string { "application/json" , "application/x-foo-mime" , }
154
155
155
156
// set Content-Type header
156
157
localVarHttpContentType := a .Configuration .APIClient .SelectHeaderContentType (localVarHttpContentTypes )
@@ -160,6 +161,7 @@ func (a ABitOfEverythingServiceApi) CreateBody(body ExamplepbABitOfEverything) (
160
161
// to determine the Accept header
161
162
localVarHttpHeaderAccepts := []string {
162
163
"application/json" ,
164
+ "application/x-foo-mime" ,
163
165
}
164
166
165
167
// set Accept header
@@ -213,7 +215,7 @@ func (a ABitOfEverythingServiceApi) DeepPathEcho(singleNestedName string, body E
213
215
}
214
216
215
217
// to determine the Content-Type header
216
- localVarHttpContentTypes := []string { "application/json" , }
218
+ localVarHttpContentTypes := []string { "application/json" , "application/x-foo-mime" , }
217
219
218
220
// set Content-Type header
219
221
localVarHttpContentType := a .Configuration .APIClient .SelectHeaderContentType (localVarHttpContentTypes )
@@ -223,6 +225,7 @@ func (a ABitOfEverythingServiceApi) DeepPathEcho(singleNestedName string, body E
223
225
// to determine the Accept header
224
226
localVarHttpHeaderAccepts := []string {
225
227
"application/json" ,
228
+ "application/x-foo-mime" ,
226
229
}
227
230
228
231
// set Accept header
@@ -275,7 +278,7 @@ func (a ABitOfEverythingServiceApi) Delete(uuid string) (*ProtobufEmpty, *APIRes
275
278
}
276
279
277
280
// to determine the Content-Type header
278
- localVarHttpContentTypes := []string { "application/json" , }
281
+ localVarHttpContentTypes := []string { "application/json" , "application/x-foo-mime" , }
279
282
280
283
// set Content-Type header
281
284
localVarHttpContentType := a .Configuration .APIClient .SelectHeaderContentType (localVarHttpContentTypes )
@@ -285,6 +288,7 @@ func (a ABitOfEverythingServiceApi) Delete(uuid string) (*ProtobufEmpty, *APIRes
285
288
// to determine the Accept header
286
289
localVarHttpHeaderAccepts := []string {
287
290
"application/json" ,
291
+ "application/x-foo-mime" ,
288
292
}
289
293
290
294
// set Accept header
@@ -311,7 +315,8 @@ func (a ABitOfEverythingServiceApi) Delete(uuid string) (*ProtobufEmpty, *APIRes
311
315
}
312
316
313
317
/**
314
- *
318
+ * Echo allows posting a StringMessage value.
319
+ * It also exposes multiple bindings. This makes it useful when validating that the OpenAPI v2 API description exposes documentation correctly on all paths defined as additional_bindings in the proto.
315
320
*
316
321
* @param value
317
322
* @return *SubStringMessage
@@ -335,7 +340,7 @@ func (a ABitOfEverythingServiceApi) Echo(value string) (*SubStringMessage, *APIR
335
340
}
336
341
337
342
// to determine the Content-Type header
338
- localVarHttpContentTypes := []string { "application/json" , }
343
+ localVarHttpContentTypes := []string { "application/json" , "application/x-foo-mime" , }
339
344
340
345
// set Content-Type header
341
346
localVarHttpContentType := a .Configuration .APIClient .SelectHeaderContentType (localVarHttpContentTypes )
@@ -345,6 +350,7 @@ func (a ABitOfEverythingServiceApi) Echo(value string) (*SubStringMessage, *APIR
345
350
// to determine the Accept header
346
351
localVarHttpHeaderAccepts := []string {
347
352
"application/json" ,
353
+ "application/x-foo-mime" ,
348
354
}
349
355
350
356
// set Accept header
@@ -371,14 +377,15 @@ func (a ABitOfEverythingServiceApi) Echo(value string) (*SubStringMessage, *APIR
371
377
}
372
378
373
379
/**
374
- *
380
+ * Echo allows posting a StringMessage value.
381
+ * It also exposes multiple bindings. This makes it useful when validating that the OpenAPI v2 API description exposes documentation correctly on all paths defined as additional_bindings in the proto.
375
382
*
376
- * @param value
383
+ * @param body
377
384
* @return *SubStringMessage
378
385
*/
379
- func (a ABitOfEverythingServiceApi ) Echo_1 ( value string ) (* SubStringMessage , * APIResponse , error ) {
386
+ func (a ABitOfEverythingServiceApi ) Echo2 ( body string ) (* SubStringMessage , * APIResponse , error ) {
380
387
381
- var localVarHttpMethod = strings .ToUpper ("Get " )
388
+ var localVarHttpMethod = strings .ToUpper ("Post " )
382
389
// create path and map variables
383
390
localVarPath := a .Configuration .BasePath + "/v2/example/echo"
384
391
@@ -392,10 +399,9 @@ func (a ABitOfEverythingServiceApi) Echo_1(value string) (*SubStringMessage, *AP
392
399
for key := range a .Configuration .DefaultHeader {
393
400
localVarHeaderParams [key ] = a .Configuration .DefaultHeader [key ]
394
401
}
395
- localVarQueryParams .Add ("value" , a .Configuration .APIClient .ParameterToString (value , "" ))
396
402
397
403
// to determine the Content-Type header
398
- localVarHttpContentTypes := []string { "application/json" , }
404
+ localVarHttpContentTypes := []string { "application/json" , "application/x-foo-mime" , }
399
405
400
406
// set Content-Type header
401
407
localVarHttpContentType := a .Configuration .APIClient .SelectHeaderContentType (localVarHttpContentTypes )
@@ -405,19 +411,22 @@ func (a ABitOfEverythingServiceApi) Echo_1(value string) (*SubStringMessage, *AP
405
411
// to determine the Accept header
406
412
localVarHttpHeaderAccepts := []string {
407
413
"application/json" ,
414
+ "application/x-foo-mime" ,
408
415
}
409
416
410
417
// set Accept header
411
418
localVarHttpHeaderAccept := a .Configuration .APIClient .SelectHeaderAccept (localVarHttpHeaderAccepts )
412
419
if localVarHttpHeaderAccept != "" {
413
420
localVarHeaderParams ["Accept" ] = localVarHttpHeaderAccept
414
421
}
422
+ // body params
423
+ localVarPostBody = & body
415
424
var successPayload = new (SubStringMessage )
416
425
localVarHttpResponse , err := a .Configuration .APIClient .CallAPI (localVarPath , localVarHttpMethod , localVarPostBody , localVarHeaderParams , localVarQueryParams , localVarFormParams , localVarFileName , localVarFileBytes )
417
426
418
427
var localVarURL , _ = url .Parse (localVarPath )
419
428
localVarURL .RawQuery = localVarQueryParams .Encode ()
420
- var localVarAPIResponse = & APIResponse {Operation : "Echo_0 " , Method : localVarHttpMethod , RequestURL : localVarURL .String ()}
429
+ var localVarAPIResponse = & APIResponse {Operation : "Echo2 " , Method : localVarHttpMethod , RequestURL : localVarURL .String ()}
421
430
if localVarHttpResponse != nil {
422
431
localVarAPIResponse .Response = localVarHttpResponse .RawResponse
423
432
localVarAPIResponse .Payload = localVarHttpResponse .Body ()
@@ -431,14 +440,15 @@ func (a ABitOfEverythingServiceApi) Echo_1(value string) (*SubStringMessage, *AP
431
440
}
432
441
433
442
/**
434
- *
443
+ * Echo allows posting a StringMessage value.
444
+ * It also exposes multiple bindings. This makes it useful when validating that the OpenAPI v2 API description exposes documentation correctly on all paths defined as additional_bindings in the proto.
435
445
*
436
- * @param body
446
+ * @param value
437
447
* @return *SubStringMessage
438
448
*/
439
- func (a ABitOfEverythingServiceApi ) Echo_2 ( body string ) (* SubStringMessage , * APIResponse , error ) {
449
+ func (a ABitOfEverythingServiceApi ) Echo3 ( value string ) (* SubStringMessage , * APIResponse , error ) {
440
450
441
- var localVarHttpMethod = strings .ToUpper ("Post " )
451
+ var localVarHttpMethod = strings .ToUpper ("Get " )
442
452
// create path and map variables
443
453
localVarPath := a .Configuration .BasePath + "/v2/example/echo"
444
454
@@ -452,9 +462,10 @@ func (a ABitOfEverythingServiceApi) Echo_2(body string) (*SubStringMessage, *API
452
462
for key := range a .Configuration .DefaultHeader {
453
463
localVarHeaderParams [key ] = a .Configuration .DefaultHeader [key ]
454
464
}
465
+ localVarQueryParams .Add ("value" , a .Configuration .APIClient .ParameterToString (value , "" ))
455
466
456
467
// to determine the Content-Type header
457
- localVarHttpContentTypes := []string { "application/json" , }
468
+ localVarHttpContentTypes := []string { "application/json" , "application/x-foo-mime" , }
458
469
459
470
// set Content-Type header
460
471
localVarHttpContentType := a .Configuration .APIClient .SelectHeaderContentType (localVarHttpContentTypes )
@@ -464,21 +475,20 @@ func (a ABitOfEverythingServiceApi) Echo_2(body string) (*SubStringMessage, *API
464
475
// to determine the Accept header
465
476
localVarHttpHeaderAccepts := []string {
466
477
"application/json" ,
478
+ "application/x-foo-mime" ,
467
479
}
468
480
469
481
// set Accept header
470
482
localVarHttpHeaderAccept := a .Configuration .APIClient .SelectHeaderAccept (localVarHttpHeaderAccepts )
471
483
if localVarHttpHeaderAccept != "" {
472
484
localVarHeaderParams ["Accept" ] = localVarHttpHeaderAccept
473
485
}
474
- // body params
475
- localVarPostBody = & body
476
486
var successPayload = new (SubStringMessage )
477
487
localVarHttpResponse , err := a .Configuration .APIClient .CallAPI (localVarPath , localVarHttpMethod , localVarPostBody , localVarHeaderParams , localVarQueryParams , localVarFormParams , localVarFileName , localVarFileBytes )
478
488
479
489
var localVarURL , _ = url .Parse (localVarPath )
480
490
localVarURL .RawQuery = localVarQueryParams .Encode ()
481
- var localVarAPIResponse = & APIResponse {Operation : "Echo_1 " , Method : localVarHttpMethod , RequestURL : localVarURL .String ()}
491
+ var localVarAPIResponse = & APIResponse {Operation : "Echo3 " , Method : localVarHttpMethod , RequestURL : localVarURL .String ()}
482
492
if localVarHttpResponse != nil {
483
493
localVarAPIResponse .Response = localVarHttpResponse .RawResponse
484
494
localVarAPIResponse .Payload = localVarHttpResponse .Body ()
@@ -566,7 +576,7 @@ func (a ABitOfEverythingServiceApi) GetQuery(uuid string, singleNestedName strin
566
576
567
577
568
578
// to determine the Content-Type header
569
- localVarHttpContentTypes := []string { "application/json" , }
579
+ localVarHttpContentTypes := []string { "application/json" , "application/x-foo-mime" , }
570
580
571
581
// set Content-Type header
572
582
localVarHttpContentType := a .Configuration .APIClient .SelectHeaderContentType (localVarHttpContentTypes )
@@ -576,6 +586,7 @@ func (a ABitOfEverythingServiceApi) GetQuery(uuid string, singleNestedName strin
576
586
// to determine the Accept header
577
587
localVarHttpHeaderAccepts := []string {
578
588
"application/json" ,
589
+ "application/x-foo-mime" ,
579
590
}
580
591
581
592
// set Accept header
@@ -626,7 +637,7 @@ func (a ABitOfEverythingServiceApi) Lookup(uuid string) (*ExamplepbABitOfEveryth
626
637
}
627
638
628
639
// to determine the Content-Type header
629
- localVarHttpContentTypes := []string { "application/json" , }
640
+ localVarHttpContentTypes := []string { "application/json" , "application/x-foo-mime" , }
630
641
631
642
// set Content-Type header
632
643
localVarHttpContentType := a .Configuration .APIClient .SelectHeaderContentType (localVarHttpContentTypes )
@@ -636,6 +647,7 @@ func (a ABitOfEverythingServiceApi) Lookup(uuid string) (*ExamplepbABitOfEveryth
636
647
// to determine the Accept header
637
648
localVarHttpHeaderAccepts := []string {
638
649
"application/json" ,
650
+ "application/x-foo-mime" ,
639
651
}
640
652
641
653
// set Accept header
@@ -684,7 +696,7 @@ func (a ABitOfEverythingServiceApi) Timeout() (*ProtobufEmpty, *APIResponse, err
684
696
}
685
697
686
698
// to determine the Content-Type header
687
- localVarHttpContentTypes := []string { "application/json" , }
699
+ localVarHttpContentTypes := []string { "application/json" , "application/x-foo-mime" , }
688
700
689
701
// set Content-Type header
690
702
localVarHttpContentType := a .Configuration .APIClient .SelectHeaderContentType (localVarHttpContentTypes )
@@ -694,6 +706,7 @@ func (a ABitOfEverythingServiceApi) Timeout() (*ProtobufEmpty, *APIResponse, err
694
706
// to determine the Accept header
695
707
localVarHttpHeaderAccepts := []string {
696
708
"application/json" ,
709
+ "application/x-foo-mime" ,
697
710
}
698
711
699
712
// set Accept header
@@ -745,7 +758,7 @@ func (a ABitOfEverythingServiceApi) Update(uuid string, body ExamplepbABitOfEver
745
758
}
746
759
747
760
// to determine the Content-Type header
748
- localVarHttpContentTypes := []string { "application/json" , }
761
+ localVarHttpContentTypes := []string { "application/json" , "application/x-foo-mime" , }
749
762
750
763
// set Content-Type header
751
764
localVarHttpContentType := a .Configuration .APIClient .SelectHeaderContentType (localVarHttpContentTypes )
@@ -755,6 +768,7 @@ func (a ABitOfEverythingServiceApi) Update(uuid string, body ExamplepbABitOfEver
755
768
// to determine the Accept header
756
769
localVarHttpHeaderAccepts := []string {
757
770
"application/json" ,
771
+ "application/x-foo-mime" ,
758
772
}
759
773
760
774
// set Accept header
0 commit comments