11/*
2- * examples/examplepb/a_bit_of_everything.proto
2+ * A Bit of Everything
33 *
44 * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
55 *
6- * OpenAPI spec version: version not set
7- *
6+ * OpenAPI spec version: 1.0
7+ * Contact: none@example.com
88 * Generated by: https://github.com/swagger-api/swagger-codegen.git
99 */
1010
@@ -91,7 +91,7 @@ func (a ABitOfEverythingServiceApi) Create(floatValue float32, doubleValue float
9191}
9292
9393// to determine the Content-Type header
94- localVarHttpContentTypes := []string { "application/json" , }
94+ localVarHttpContentTypes := []string { "application/json" , "application/x-foo-mime" , }
9595
9696// set Content-Type header
9797localVarHttpContentType := a .Configuration .APIClient .SelectHeaderContentType (localVarHttpContentTypes )
@@ -101,6 +101,7 @@ func (a ABitOfEverythingServiceApi) Create(floatValue float32, doubleValue float
101101// to determine the Accept header
102102localVarHttpHeaderAccepts := []string {
103103"application/json" ,
104+ "application/x-foo-mime" ,
104105}
105106
106107// set Accept header
@@ -150,7 +151,7 @@ func (a ABitOfEverythingServiceApi) CreateBody(body ExamplepbABitOfEverything) (
150151}
151152
152153// to determine the Content-Type header
153- localVarHttpContentTypes := []string { "application/json" , }
154+ localVarHttpContentTypes := []string { "application/json" , "application/x-foo-mime" , }
154155
155156// set Content-Type header
156157localVarHttpContentType := a .Configuration .APIClient .SelectHeaderContentType (localVarHttpContentTypes )
@@ -160,6 +161,7 @@ func (a ABitOfEverythingServiceApi) CreateBody(body ExamplepbABitOfEverything) (
160161// to determine the Accept header
161162localVarHttpHeaderAccepts := []string {
162163"application/json" ,
164+ "application/x-foo-mime" ,
163165}
164166
165167// set Accept header
@@ -213,7 +215,7 @@ func (a ABitOfEverythingServiceApi) DeepPathEcho(singleNestedName string, body E
213215}
214216
215217// to determine the Content-Type header
216- localVarHttpContentTypes := []string { "application/json" , }
218+ localVarHttpContentTypes := []string { "application/json" , "application/x-foo-mime" , }
217219
218220// set Content-Type header
219221localVarHttpContentType := a .Configuration .APIClient .SelectHeaderContentType (localVarHttpContentTypes )
@@ -223,6 +225,7 @@ func (a ABitOfEverythingServiceApi) DeepPathEcho(singleNestedName string, body E
223225// to determine the Accept header
224226localVarHttpHeaderAccepts := []string {
225227"application/json" ,
228+ "application/x-foo-mime" ,
226229}
227230
228231// set Accept header
@@ -275,7 +278,7 @@ func (a ABitOfEverythingServiceApi) Delete(uuid string) (*ProtobufEmpty, *APIRes
275278}
276279
277280// to determine the Content-Type header
278- localVarHttpContentTypes := []string { "application/json" , }
281+ localVarHttpContentTypes := []string { "application/json" , "application/x-foo-mime" , }
279282
280283// set Content-Type header
281284localVarHttpContentType := a .Configuration .APIClient .SelectHeaderContentType (localVarHttpContentTypes )
@@ -285,6 +288,7 @@ func (a ABitOfEverythingServiceApi) Delete(uuid string) (*ProtobufEmpty, *APIRes
285288// to determine the Accept header
286289localVarHttpHeaderAccepts := []string {
287290"application/json" ,
291+ "application/x-foo-mime" ,
288292}
289293
290294// set Accept header
@@ -311,7 +315,8 @@ func (a ABitOfEverythingServiceApi) Delete(uuid string) (*ProtobufEmpty, *APIRes
311315}
312316
313317/**
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.
315320 *
316321 * @param value
317322 * @return *SubStringMessage
@@ -335,7 +340,7 @@ func (a ABitOfEverythingServiceApi) Echo(value string) (*SubStringMessage, *APIR
335340}
336341
337342// to determine the Content-Type header
338- localVarHttpContentTypes := []string { "application/json" , }
343+ localVarHttpContentTypes := []string { "application/json" , "application/x-foo-mime" , }
339344
340345// set Content-Type header
341346localVarHttpContentType := a .Configuration .APIClient .SelectHeaderContentType (localVarHttpContentTypes )
@@ -345,6 +350,7 @@ func (a ABitOfEverythingServiceApi) Echo(value string) (*SubStringMessage, *APIR
345350// to determine the Accept header
346351localVarHttpHeaderAccepts := []string {
347352"application/json" ,
353+ "application/x-foo-mime" ,
348354}
349355
350356// set Accept header
@@ -371,14 +377,15 @@ func (a ABitOfEverythingServiceApi) Echo(value string) (*SubStringMessage, *APIR
371377}
372378
373379/**
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.
375382 *
376- * @param value
383+ * @param body
377384 * @return *SubStringMessage
378385 */
379- func (a ABitOfEverythingServiceApi ) Echo_1 ( value string ) (* SubStringMessage , * APIResponse , error ) {
386+ func (a ABitOfEverythingServiceApi ) Echo2 ( body string ) (* SubStringMessage , * APIResponse , error ) {
380387
381- var localVarHttpMethod = strings .ToUpper ("Get " )
388+ var localVarHttpMethod = strings .ToUpper ("Post " )
382389// create path and map variables
383390localVarPath := a .Configuration .BasePath + "/v2/example/echo"
384391
@@ -392,10 +399,9 @@ func (a ABitOfEverythingServiceApi) Echo_1(value string) (*SubStringMessage, *AP
392399for key := range a .Configuration .DefaultHeader {
393400localVarHeaderParams [key ] = a .Configuration .DefaultHeader [key ]
394401}
395- localVarQueryParams .Add ("value" , a .Configuration .APIClient .ParameterToString (value , "" ))
396402
397403// to determine the Content-Type header
398- localVarHttpContentTypes := []string { "application/json" , }
404+ localVarHttpContentTypes := []string { "application/json" , "application/x-foo-mime" , }
399405
400406// set Content-Type header
401407localVarHttpContentType := a .Configuration .APIClient .SelectHeaderContentType (localVarHttpContentTypes )
@@ -405,19 +411,22 @@ func (a ABitOfEverythingServiceApi) Echo_1(value string) (*SubStringMessage, *AP
405411// to determine the Accept header
406412localVarHttpHeaderAccepts := []string {
407413"application/json" ,
414+ "application/x-foo-mime" ,
408415}
409416
410417// set Accept header
411418localVarHttpHeaderAccept := a .Configuration .APIClient .SelectHeaderAccept (localVarHttpHeaderAccepts )
412419if localVarHttpHeaderAccept != "" {
413420localVarHeaderParams ["Accept" ] = localVarHttpHeaderAccept
414421}
422+ // body params
423+ localVarPostBody = & body
415424var successPayload = new (SubStringMessage )
416425localVarHttpResponse , err := a .Configuration .APIClient .CallAPI (localVarPath , localVarHttpMethod , localVarPostBody , localVarHeaderParams , localVarQueryParams , localVarFormParams , localVarFileName , localVarFileBytes )
417426
418427var localVarURL , _ = url .Parse (localVarPath )
419428localVarURL .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 ()}
421430if localVarHttpResponse != nil {
422431localVarAPIResponse .Response = localVarHttpResponse .RawResponse
423432localVarAPIResponse .Payload = localVarHttpResponse .Body ()
@@ -431,14 +440,15 @@ func (a ABitOfEverythingServiceApi) Echo_1(value string) (*SubStringMessage, *AP
431440}
432441
433442/**
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.
435445 *
436- * @param body
446+ * @param value
437447 * @return *SubStringMessage
438448 */
439- func (a ABitOfEverythingServiceApi ) Echo_2 ( body string ) (* SubStringMessage , * APIResponse , error ) {
449+ func (a ABitOfEverythingServiceApi ) Echo3 ( value string ) (* SubStringMessage , * APIResponse , error ) {
440450
441- var localVarHttpMethod = strings .ToUpper ("Post " )
451+ var localVarHttpMethod = strings .ToUpper ("Get " )
442452// create path and map variables
443453localVarPath := a .Configuration .BasePath + "/v2/example/echo"
444454
@@ -452,9 +462,10 @@ func (a ABitOfEverythingServiceApi) Echo_2(body string) (*SubStringMessage, *API
452462for key := range a .Configuration .DefaultHeader {
453463localVarHeaderParams [key ] = a .Configuration .DefaultHeader [key ]
454464}
465+ localVarQueryParams .Add ("value" , a .Configuration .APIClient .ParameterToString (value , "" ))
455466
456467// to determine the Content-Type header
457- localVarHttpContentTypes := []string { "application/json" , }
468+ localVarHttpContentTypes := []string { "application/json" , "application/x-foo-mime" , }
458469
459470// set Content-Type header
460471localVarHttpContentType := a .Configuration .APIClient .SelectHeaderContentType (localVarHttpContentTypes )
@@ -464,21 +475,20 @@ func (a ABitOfEverythingServiceApi) Echo_2(body string) (*SubStringMessage, *API
464475// to determine the Accept header
465476localVarHttpHeaderAccepts := []string {
466477"application/json" ,
478+ "application/x-foo-mime" ,
467479}
468480
469481// set Accept header
470482localVarHttpHeaderAccept := a .Configuration .APIClient .SelectHeaderAccept (localVarHttpHeaderAccepts )
471483if localVarHttpHeaderAccept != "" {
472484localVarHeaderParams ["Accept" ] = localVarHttpHeaderAccept
473485}
474- // body params
475- localVarPostBody = & body
476486var successPayload = new (SubStringMessage )
477487localVarHttpResponse , err := a .Configuration .APIClient .CallAPI (localVarPath , localVarHttpMethod , localVarPostBody , localVarHeaderParams , localVarQueryParams , localVarFormParams , localVarFileName , localVarFileBytes )
478488
479489var localVarURL , _ = url .Parse (localVarPath )
480490localVarURL .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 ()}
482492if localVarHttpResponse != nil {
483493localVarAPIResponse .Response = localVarHttpResponse .RawResponse
484494localVarAPIResponse .Payload = localVarHttpResponse .Body ()
@@ -566,7 +576,7 @@ func (a ABitOfEverythingServiceApi) GetQuery(uuid string, singleNestedName strin
566576
567577
568578// to determine the Content-Type header
569- localVarHttpContentTypes := []string { "application/json" , }
579+ localVarHttpContentTypes := []string { "application/json" , "application/x-foo-mime" , }
570580
571581// set Content-Type header
572582localVarHttpContentType := a .Configuration .APIClient .SelectHeaderContentType (localVarHttpContentTypes )
@@ -576,6 +586,7 @@ func (a ABitOfEverythingServiceApi) GetQuery(uuid string, singleNestedName strin
576586// to determine the Accept header
577587localVarHttpHeaderAccepts := []string {
578588"application/json" ,
589+ "application/x-foo-mime" ,
579590}
580591
581592// set Accept header
@@ -626,7 +637,7 @@ func (a ABitOfEverythingServiceApi) Lookup(uuid string) (*ExamplepbABitOfEveryth
626637}
627638
628639// to determine the Content-Type header
629- localVarHttpContentTypes := []string { "application/json" , }
640+ localVarHttpContentTypes := []string { "application/json" , "application/x-foo-mime" , }
630641
631642// set Content-Type header
632643localVarHttpContentType := a .Configuration .APIClient .SelectHeaderContentType (localVarHttpContentTypes )
@@ -636,6 +647,7 @@ func (a ABitOfEverythingServiceApi) Lookup(uuid string) (*ExamplepbABitOfEveryth
636647// to determine the Accept header
637648localVarHttpHeaderAccepts := []string {
638649"application/json" ,
650+ "application/x-foo-mime" ,
639651}
640652
641653// set Accept header
@@ -684,7 +696,7 @@ func (a ABitOfEverythingServiceApi) Timeout() (*ProtobufEmpty, *APIResponse, err
684696}
685697
686698// to determine the Content-Type header
687- localVarHttpContentTypes := []string { "application/json" , }
699+ localVarHttpContentTypes := []string { "application/json" , "application/x-foo-mime" , }
688700
689701// set Content-Type header
690702localVarHttpContentType := a .Configuration .APIClient .SelectHeaderContentType (localVarHttpContentTypes )
@@ -694,6 +706,7 @@ func (a ABitOfEverythingServiceApi) Timeout() (*ProtobufEmpty, *APIResponse, err
694706// to determine the Accept header
695707localVarHttpHeaderAccepts := []string {
696708"application/json" ,
709+ "application/x-foo-mime" ,
697710}
698711
699712// set Accept header
@@ -745,7 +758,7 @@ func (a ABitOfEverythingServiceApi) Update(uuid string, body ExamplepbABitOfEver
745758}
746759
747760// to determine the Content-Type header
748- localVarHttpContentTypes := []string { "application/json" , }
761+ localVarHttpContentTypes := []string { "application/json" , "application/x-foo-mime" , }
749762
750763// set Content-Type header
751764localVarHttpContentType := a .Configuration .APIClient .SelectHeaderContentType (localVarHttpContentTypes )
@@ -755,6 +768,7 @@ func (a ABitOfEverythingServiceApi) Update(uuid string, body ExamplepbABitOfEver
755768// to determine the Accept header
756769localVarHttpHeaderAccepts := []string {
757770"application/json" ,
771+ "application/x-foo-mime" ,
758772}
759773
760774// set Accept header
0 commit comments