[Go] Update API naming to follow Golang standard pkg (1 line change) (#15331)

* Add apiNameSuffix to AbstractGoCodegen

* Regenerate files

* Update tests

* Regenerate files

* Update test files

* Regenerate for CI test

* Regenerate for CI test

* Remove some docs

* Add files back
This commit is contained in:
Ween Jiann
2023-05-13 09:40:26 +08:00
committed by GitHub
parent aeecd9cc26
commit 78bffff8f3
101 changed files with 1333 additions and 4200 deletions

View File

@@ -145,6 +145,8 @@ public abstract class AbstractGoCodegen extends DefaultCodegen implements Codege
"float32", "float64") "float32", "float64")
); );
apiNameSuffix = "API";
cliOptions.clear(); cliOptions.clear();
cliOptions.add(new CliOption(CodegenConstants.PACKAGE_NAME, "Go package name (convention: lowercase).") cliOptions.add(new CliOption(CodegenConstants.PACKAGE_NAME, "Go package name (convention: lowercase).")
.defaultValue("openapi")); .defaultValue("openapi"));

View File

@@ -19,6 +19,11 @@ package org.openapitools.codegen.go;
import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.Operation; import io.swagger.v3.oas.models.Operation;
import org.openapitools.codegen.*;
import org.openapitools.codegen.config.CodegenConfigurator;
import org.openapitools.codegen.languages.GoClientCodegen;
import org.testng.Assert;
import org.testng.annotations.Test;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
@@ -29,17 +34,6 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import org.openapitools.codegen.CodegenConstants;
import org.openapitools.codegen.CodegenOperation;
import org.openapitools.codegen.CodegenParameter;
import org.openapitools.codegen.DefaultGenerator;
import org.openapitools.codegen.TestUtils;
import org.openapitools.codegen.config.CodegenConfigurator;
import org.openapitools.codegen.languages.GoClientCodegen;
import org.testng.Assert;
import org.testng.annotations.Test;
import org.testng.annotations.Ignore;
public class GoClientCodegenTest { public class GoClientCodegenTest {
@@ -179,7 +173,7 @@ public class GoClientCodegenTest {
System.out.println(files); System.out.println(files);
files.forEach(File::deleteOnExit); files.forEach(File::deleteOnExit);
Path docFile = Paths.get(output + "/docs/PetApi.md"); Path docFile = Paths.get(output + "/docs/PetAPI.md");
TestUtils.assertFileContains(docFile, "openapiclient.pet{Cat: openapiclient.NewCat(\"Attr_example\")}, openapiclient.pet{Cat: openapiclient.NewCat(\"Attr_example\")}, openapiclient.pet{Cat: openapiclient.NewCat(\"Attr_example\")}"); TestUtils.assertFileContains(docFile, "openapiclient.pet{Cat: openapiclient.NewCat(\"Attr_example\")}, openapiclient.pet{Cat: openapiclient.NewCat(\"Attr_example\")}, openapiclient.pet{Cat: openapiclient.NewCat(\"Attr_example\")}");
} }
@@ -201,7 +195,7 @@ public class GoClientCodegenTest {
List<File> files = generator.opts(configurator.toClientOptInput()).generate(); List<File> files = generator.opts(configurator.toClientOptInput()).generate();
files.forEach(File::deleteOnExit); files.forEach(File::deleteOnExit);
TestUtils.assertFileContains(Paths.get(output + "/api_pet.go"), "type PetApiAddPetRequest struct"); TestUtils.assertFileContains(Paths.get(output + "/api_pet.go"), "type PetAPIAddPetRequest struct");
} }
@Test @Test
@@ -229,7 +223,7 @@ public class GoClientCodegenTest {
TestUtils.assertFileExists(Paths.get(output + "/test/api_pet_test.go")); TestUtils.assertFileExists(Paths.get(output + "/test/api_pet_test.go"));
TestUtils.assertFileContains(Paths.get(output + "/test/api_pet_test.go"), TestUtils.assertFileContains(Paths.get(output + "/test/api_pet_test.go"),
"func Test_openapi_PetApiService(t *testing.T) {"); "func Test_openapi_PetAPIService(t *testing.T) {");
} }
@Test @Test
@@ -292,9 +286,9 @@ public class GoClientCodegenTest {
TestUtils.assertFileNotContains(Paths.get(output + "/test/api_pet_test.go"), TestUtils.assertFileNotContains(Paths.get(output + "/test/api_pet_test.go"),
"require.NotNil(t, resp)"); "require.NotNil(t, resp)");
TestUtils.assertFileNotContains(Paths.get(output + "/test/api_pet_test.go"), TestUtils.assertFileNotContains(Paths.get(output + "/test/api_pet_test.go"),
"resp, httpRes, err := apiClient.PetApi.PetDelete(context.Background()).Execute()"); "resp, httpRes, err := apiClient.PetAPI.PetDelete(context.Background()).Execute()");
TestUtils.assertFileContains(Paths.get(output + "/test/api_pet_test.go"), TestUtils.assertFileContains(Paths.get(output + "/test/api_pet_test.go"),
"httpRes, err := apiClient.PetApi.PetDelete(context.Background()).Execute()"); "httpRes, err := apiClient.PetAPI.PetDelete(context.Background()).Execute()");
} }
@Test @Test

View File

@@ -19,7 +19,7 @@ docs/AdditionalPropertiesNumber.md
docs/AdditionalPropertiesObject.md docs/AdditionalPropertiesObject.md
docs/AdditionalPropertiesString.md docs/AdditionalPropertiesString.md
docs/Animal.md docs/Animal.md
docs/AnotherFakeApi.md docs/AnotherFakeAPI.md
docs/ApiResponse.md docs/ApiResponse.md
docs/ArrayOfArrayOfNumberOnly.md docs/ArrayOfArrayOfNumberOnly.md
docs/ArrayOfNumberOnly.md docs/ArrayOfNumberOnly.md
@@ -37,8 +37,8 @@ docs/DogAllOf.md
docs/EnumArrays.md docs/EnumArrays.md
docs/EnumClass.md docs/EnumClass.md
docs/EnumTest.md docs/EnumTest.md
docs/FakeApi.md docs/FakeAPI.md
docs/FakeClassnameTags123Api.md docs/FakeClassnameTags123API.md
docs/File.md docs/File.md
docs/FileSchemaTestClass.md docs/FileSchemaTestClass.md
docs/FormatTest.md docs/FormatTest.md
@@ -53,16 +53,16 @@ docs/Order.md
docs/OuterComposite.md docs/OuterComposite.md
docs/OuterEnum.md docs/OuterEnum.md
docs/Pet.md docs/Pet.md
docs/PetApi.md docs/PetAPI.md
docs/ReadOnlyFirst.md docs/ReadOnlyFirst.md
docs/Return.md docs/Return.md
docs/SpecialModelName.md docs/SpecialModelName.md
docs/StoreApi.md docs/StoreAPI.md
docs/Tag.md docs/Tag.md
docs/TypeHolderDefault.md docs/TypeHolderDefault.md
docs/TypeHolderExample.md docs/TypeHolderExample.md
docs/User.md docs/User.md
docs/UserApi.md docs/UserAPI.md
docs/XmlItem.md docs/XmlItem.md
git_push.sh git_push.sh
go.mod go.mod

View File

@@ -78,43 +78,43 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
Class | Method | HTTP request | Description Class | Method | HTTP request | Description
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
*AnotherFakeApi* | [**Call123TestSpecialTags**](docs/AnotherFakeApi.md#call123testspecialtags) | **Patch** /another-fake/dummy | To test special tags *AnotherFakeAPI* | [**Call123TestSpecialTags**](docs/AnotherFakeAPI.md#call123testspecialtags) | **Patch** /another-fake/dummy | To test special tags
*FakeApi* | [**CreateXmlItem**](docs/FakeApi.md#createxmlitem) | **Post** /fake/create_xml_item | creates an XmlItem *FakeAPI* | [**CreateXmlItem**](docs/FakeAPI.md#createxmlitem) | **Post** /fake/create_xml_item | creates an XmlItem
*FakeApi* | [**FakeOuterBooleanSerialize**](docs/FakeApi.md#fakeouterbooleanserialize) | **Post** /fake/outer/boolean | *FakeAPI* | [**FakeOuterBooleanSerialize**](docs/FakeAPI.md#fakeouterbooleanserialize) | **Post** /fake/outer/boolean |
*FakeApi* | [**FakeOuterCompositeSerialize**](docs/FakeApi.md#fakeoutercompositeserialize) | **Post** /fake/outer/composite | *FakeAPI* | [**FakeOuterCompositeSerialize**](docs/FakeAPI.md#fakeoutercompositeserialize) | **Post** /fake/outer/composite |
*FakeApi* | [**FakeOuterNumberSerialize**](docs/FakeApi.md#fakeouternumberserialize) | **Post** /fake/outer/number | *FakeAPI* | [**FakeOuterNumberSerialize**](docs/FakeAPI.md#fakeouternumberserialize) | **Post** /fake/outer/number |
*FakeApi* | [**FakeOuterStringSerialize**](docs/FakeApi.md#fakeouterstringserialize) | **Post** /fake/outer/string | *FakeAPI* | [**FakeOuterStringSerialize**](docs/FakeAPI.md#fakeouterstringserialize) | **Post** /fake/outer/string |
*FakeApi* | [**TestBodyWithFileSchema**](docs/FakeApi.md#testbodywithfileschema) | **Put** /fake/body-with-file-schema | *FakeAPI* | [**TestBodyWithFileSchema**](docs/FakeAPI.md#testbodywithfileschema) | **Put** /fake/body-with-file-schema |
*FakeApi* | [**TestBodyWithQueryParams**](docs/FakeApi.md#testbodywithqueryparams) | **Put** /fake/body-with-query-params | *FakeAPI* | [**TestBodyWithQueryParams**](docs/FakeAPI.md#testbodywithqueryparams) | **Put** /fake/body-with-query-params |
*FakeApi* | [**TestClientModel**](docs/FakeApi.md#testclientmodel) | **Patch** /fake | To test \&quot;client\&quot; model *FakeAPI* | [**TestClientModel**](docs/FakeAPI.md#testclientmodel) | **Patch** /fake | To test \&quot;client\&quot; model
*FakeApi* | [**TestEndpointParameters**](docs/FakeApi.md#testendpointparameters) | **Post** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 *FakeAPI* | [**TestEndpointParameters**](docs/FakeAPI.md#testendpointparameters) | **Post** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
*FakeApi* | [**TestEnumParameters**](docs/FakeApi.md#testenumparameters) | **Get** /fake | To test enum parameters *FakeAPI* | [**TestEnumParameters**](docs/FakeAPI.md#testenumparameters) | **Get** /fake | To test enum parameters
*FakeApi* | [**TestGroupParameters**](docs/FakeApi.md#testgroupparameters) | **Delete** /fake | Fake endpoint to test group parameters (optional) *FakeAPI* | [**TestGroupParameters**](docs/FakeAPI.md#testgroupparameters) | **Delete** /fake | Fake endpoint to test group parameters (optional)
*FakeApi* | [**TestInlineAdditionalProperties**](docs/FakeApi.md#testinlineadditionalproperties) | **Post** /fake/inline-additionalProperties | test inline additionalProperties *FakeAPI* | [**TestInlineAdditionalProperties**](docs/FakeAPI.md#testinlineadditionalproperties) | **Post** /fake/inline-additionalProperties | test inline additionalProperties
*FakeApi* | [**TestJsonFormData**](docs/FakeApi.md#testjsonformdata) | **Get** /fake/jsonFormData | test json serialization of form data *FakeAPI* | [**TestJsonFormData**](docs/FakeAPI.md#testjsonformdata) | **Get** /fake/jsonFormData | test json serialization of form data
*FakeApi* | [**TestQueryParameterCollectionFormat**](docs/FakeApi.md#testqueryparametercollectionformat) | **Put** /fake/test-query-parameters | *FakeAPI* | [**TestQueryParameterCollectionFormat**](docs/FakeAPI.md#testqueryparametercollectionformat) | **Put** /fake/test-query-parameters |
*FakeClassnameTags123Api* | [**TestClassname**](docs/FakeClassnameTags123Api.md#testclassname) | **Patch** /fake_classname_test | To test class name in snake case *FakeClassnameTags123API* | [**TestClassname**](docs/FakeClassnameTags123API.md#testclassname) | **Patch** /fake_classname_test | To test class name in snake case
*PetApi* | [**AddPet**](docs/PetApi.md#addpet) | **Post** /pet | Add a new pet to the store *PetAPI* | [**AddPet**](docs/PetAPI.md#addpet) | **Post** /pet | Add a new pet to the store
*PetApi* | [**DeletePet**](docs/PetApi.md#deletepet) | **Delete** /pet/{petId} | Deletes a pet *PetAPI* | [**DeletePet**](docs/PetAPI.md#deletepet) | **Delete** /pet/{petId} | Deletes a pet
*PetApi* | [**FindPetsByStatus**](docs/PetApi.md#findpetsbystatus) | **Get** /pet/findByStatus | Finds Pets by status *PetAPI* | [**FindPetsByStatus**](docs/PetAPI.md#findpetsbystatus) | **Get** /pet/findByStatus | Finds Pets by status
*PetApi* | [**FindPetsByTags**](docs/PetApi.md#findpetsbytags) | **Get** /pet/findByTags | Finds Pets by tags *PetAPI* | [**FindPetsByTags**](docs/PetAPI.md#findpetsbytags) | **Get** /pet/findByTags | Finds Pets by tags
*PetApi* | [**GetPetById**](docs/PetApi.md#getpetbyid) | **Get** /pet/{petId} | Find pet by ID *PetAPI* | [**GetPetById**](docs/PetAPI.md#getpetbyid) | **Get** /pet/{petId} | Find pet by ID
*PetApi* | [**UpdatePet**](docs/PetApi.md#updatepet) | **Put** /pet | Update an existing pet *PetAPI* | [**UpdatePet**](docs/PetAPI.md#updatepet) | **Put** /pet | Update an existing pet
*PetApi* | [**UpdatePetWithForm**](docs/PetApi.md#updatepetwithform) | **Post** /pet/{petId} | Updates a pet in the store with form data *PetAPI* | [**UpdatePetWithForm**](docs/PetAPI.md#updatepetwithform) | **Post** /pet/{petId} | Updates a pet in the store with form data
*PetApi* | [**UploadFile**](docs/PetApi.md#uploadfile) | **Post** /pet/{petId}/uploadImage | uploads an image *PetAPI* | [**UploadFile**](docs/PetAPI.md#uploadfile) | **Post** /pet/{petId}/uploadImage | uploads an image
*PetApi* | [**UploadFileWithRequiredFile**](docs/PetApi.md#uploadfilewithrequiredfile) | **Post** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) *PetAPI* | [**UploadFileWithRequiredFile**](docs/PetAPI.md#uploadfilewithrequiredfile) | **Post** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
*StoreApi* | [**DeleteOrder**](docs/StoreApi.md#deleteorder) | **Delete** /store/order/{order_id} | Delete purchase order by ID *StoreAPI* | [**DeleteOrder**](docs/StoreAPI.md#deleteorder) | **Delete** /store/order/{order_id} | Delete purchase order by ID
*StoreApi* | [**GetInventory**](docs/StoreApi.md#getinventory) | **Get** /store/inventory | Returns pet inventories by status *StoreAPI* | [**GetInventory**](docs/StoreAPI.md#getinventory) | **Get** /store/inventory | Returns pet inventories by status
*StoreApi* | [**GetOrderById**](docs/StoreApi.md#getorderbyid) | **Get** /store/order/{order_id} | Find purchase order by ID *StoreAPI* | [**GetOrderById**](docs/StoreAPI.md#getorderbyid) | **Get** /store/order/{order_id} | Find purchase order by ID
*StoreApi* | [**PlaceOrder**](docs/StoreApi.md#placeorder) | **Post** /store/order | Place an order for a pet *StoreAPI* | [**PlaceOrder**](docs/StoreAPI.md#placeorder) | **Post** /store/order | Place an order for a pet
*UserApi* | [**CreateUser**](docs/UserApi.md#createuser) | **Post** /user | Create user *UserAPI* | [**CreateUser**](docs/UserAPI.md#createuser) | **Post** /user | Create user
*UserApi* | [**CreateUsersWithArrayInput**](docs/UserApi.md#createuserswitharrayinput) | **Post** /user/createWithArray | Creates list of users with given input array *UserAPI* | [**CreateUsersWithArrayInput**](docs/UserAPI.md#createuserswitharrayinput) | **Post** /user/createWithArray | Creates list of users with given input array
*UserApi* | [**CreateUsersWithListInput**](docs/UserApi.md#createuserswithlistinput) | **Post** /user/createWithList | Creates list of users with given input array *UserAPI* | [**CreateUsersWithListInput**](docs/UserAPI.md#createuserswithlistinput) | **Post** /user/createWithList | Creates list of users with given input array
*UserApi* | [**DeleteUser**](docs/UserApi.md#deleteuser) | **Delete** /user/{username} | Delete user *UserAPI* | [**DeleteUser**](docs/UserAPI.md#deleteuser) | **Delete** /user/{username} | Delete user
*UserApi* | [**GetUserByName**](docs/UserApi.md#getuserbyname) | **Get** /user/{username} | Get user by user name *UserAPI* | [**GetUserByName**](docs/UserAPI.md#getuserbyname) | **Get** /user/{username} | Get user by user name
*UserApi* | [**LoginUser**](docs/UserApi.md#loginuser) | **Get** /user/login | Logs user into the system *UserAPI* | [**LoginUser**](docs/UserAPI.md#loginuser) | **Get** /user/login | Logs user into the system
*UserApi* | [**LogoutUser**](docs/UserApi.md#logoutuser) | **Get** /user/logout | Logs out current logged in user session *UserAPI* | [**LogoutUser**](docs/UserAPI.md#logoutuser) | **Get** /user/logout | Logs out current logged in user session
*UserApi* | [**UpdateUser**](docs/UserApi.md#updateuser) | **Put** /user/{username} | Updated user *UserAPI* | [**UpdateUser**](docs/UserAPI.md#updateuser) | **Put** /user/{username} | Updated user
## Documentation For Models ## Documentation For Models

View File

@@ -19,7 +19,7 @@ import (
) )
type AnotherFakeApi interface { type AnotherFakeAPI interface {
/* /*
Call123TestSpecialTags To test special tags Call123TestSpecialTags To test special tags
@@ -36,12 +36,12 @@ type AnotherFakeApi interface {
Call123TestSpecialTagsExecute(r ApiCall123TestSpecialTagsRequest) (*Client, *http.Response, error) Call123TestSpecialTagsExecute(r ApiCall123TestSpecialTagsRequest) (*Client, *http.Response, error)
} }
// AnotherFakeApiService AnotherFakeApi service // AnotherFakeAPIService AnotherFakeAPI service
type AnotherFakeApiService service type AnotherFakeAPIService service
type ApiCall123TestSpecialTagsRequest struct { type ApiCall123TestSpecialTagsRequest struct {
ctx context.Context ctx context.Context
ApiService AnotherFakeApi ApiService AnotherFakeAPI
body *Client body *Client
} }
@@ -63,7 +63,7 @@ To test special tags and operation ID starting with number
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiCall123TestSpecialTagsRequest @return ApiCall123TestSpecialTagsRequest
*/ */
func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx context.Context) ApiCall123TestSpecialTagsRequest { func (a *AnotherFakeAPIService) Call123TestSpecialTags(ctx context.Context) ApiCall123TestSpecialTagsRequest {
return ApiCall123TestSpecialTagsRequest{ return ApiCall123TestSpecialTagsRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -72,7 +72,7 @@ func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx context.Context) ApiC
// Execute executes the request // Execute executes the request
// @return Client // @return Client
func (a *AnotherFakeApiService) Call123TestSpecialTagsExecute(r ApiCall123TestSpecialTagsRequest) (*Client, *http.Response, error) { func (a *AnotherFakeAPIService) Call123TestSpecialTagsExecute(r ApiCall123TestSpecialTagsRequest) (*Client, *http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodPatch localVarHTTPMethod = http.MethodPatch
localVarPostBody interface{} localVarPostBody interface{}
@@ -80,7 +80,7 @@ func (a *AnotherFakeApiService) Call123TestSpecialTagsExecute(r ApiCall123TestSp
localVarReturnValue *Client localVarReturnValue *Client
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AnotherFakeApiService.Call123TestSpecialTags") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AnotherFakeAPIService.Call123TestSpecialTags")
if err != nil { if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
} }

View File

@@ -22,7 +22,7 @@ import (
) )
type FakeApi interface { type FakeAPI interface {
/* /*
CreateXmlItem creates an XmlItem CreateXmlItem creates an XmlItem
@@ -209,12 +209,12 @@ type FakeApi interface {
TestQueryParameterCollectionFormatExecute(r ApiTestQueryParameterCollectionFormatRequest) (*http.Response, error) TestQueryParameterCollectionFormatExecute(r ApiTestQueryParameterCollectionFormatRequest) (*http.Response, error)
} }
// FakeApiService FakeApi service // FakeAPIService FakeAPI service
type FakeApiService service type FakeAPIService service
type ApiCreateXmlItemRequest struct { type ApiCreateXmlItemRequest struct {
ctx context.Context ctx context.Context
ApiService FakeApi ApiService FakeAPI
xmlItem *XmlItem xmlItem *XmlItem
} }
@@ -236,7 +236,7 @@ this route creates an XmlItem
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiCreateXmlItemRequest @return ApiCreateXmlItemRequest
*/ */
func (a *FakeApiService) CreateXmlItem(ctx context.Context) ApiCreateXmlItemRequest { func (a *FakeAPIService) CreateXmlItem(ctx context.Context) ApiCreateXmlItemRequest {
return ApiCreateXmlItemRequest{ return ApiCreateXmlItemRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -244,14 +244,14 @@ func (a *FakeApiService) CreateXmlItem(ctx context.Context) ApiCreateXmlItemRequ
} }
// Execute executes the request // Execute executes the request
func (a *FakeApiService) CreateXmlItemExecute(r ApiCreateXmlItemRequest) (*http.Response, error) { func (a *FakeAPIService) CreateXmlItemExecute(r ApiCreateXmlItemRequest) (*http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodPost localVarHTTPMethod = http.MethodPost
localVarPostBody interface{} localVarPostBody interface{}
formFiles []formFile formFiles []formFile
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.CreateXmlItem") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeAPIService.CreateXmlItem")
if err != nil { if err != nil {
return nil, &GenericOpenAPIError{error: err.Error()} return nil, &GenericOpenAPIError{error: err.Error()}
} }
@@ -314,7 +314,7 @@ func (a *FakeApiService) CreateXmlItemExecute(r ApiCreateXmlItemRequest) (*http.
type ApiFakeOuterBooleanSerializeRequest struct { type ApiFakeOuterBooleanSerializeRequest struct {
ctx context.Context ctx context.Context
ApiService FakeApi ApiService FakeAPI
body *bool body *bool
} }
@@ -336,7 +336,7 @@ Test serialization of outer boolean types
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiFakeOuterBooleanSerializeRequest @return ApiFakeOuterBooleanSerializeRequest
*/ */
func (a *FakeApiService) FakeOuterBooleanSerialize(ctx context.Context) ApiFakeOuterBooleanSerializeRequest { func (a *FakeAPIService) FakeOuterBooleanSerialize(ctx context.Context) ApiFakeOuterBooleanSerializeRequest {
return ApiFakeOuterBooleanSerializeRequest{ return ApiFakeOuterBooleanSerializeRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -345,7 +345,7 @@ func (a *FakeApiService) FakeOuterBooleanSerialize(ctx context.Context) ApiFakeO
// Execute executes the request // Execute executes the request
// @return bool // @return bool
func (a *FakeApiService) FakeOuterBooleanSerializeExecute(r ApiFakeOuterBooleanSerializeRequest) (bool, *http.Response, error) { func (a *FakeAPIService) FakeOuterBooleanSerializeExecute(r ApiFakeOuterBooleanSerializeRequest) (bool, *http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodPost localVarHTTPMethod = http.MethodPost
localVarPostBody interface{} localVarPostBody interface{}
@@ -353,7 +353,7 @@ func (a *FakeApiService) FakeOuterBooleanSerializeExecute(r ApiFakeOuterBooleanS
localVarReturnValue bool localVarReturnValue bool
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.FakeOuterBooleanSerialize") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeAPIService.FakeOuterBooleanSerialize")
if err != nil { if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
} }
@@ -422,7 +422,7 @@ func (a *FakeApiService) FakeOuterBooleanSerializeExecute(r ApiFakeOuterBooleanS
type ApiFakeOuterCompositeSerializeRequest struct { type ApiFakeOuterCompositeSerializeRequest struct {
ctx context.Context ctx context.Context
ApiService FakeApi ApiService FakeAPI
body *OuterComposite body *OuterComposite
} }
@@ -444,7 +444,7 @@ Test serialization of object with outer number type
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiFakeOuterCompositeSerializeRequest @return ApiFakeOuterCompositeSerializeRequest
*/ */
func (a *FakeApiService) FakeOuterCompositeSerialize(ctx context.Context) ApiFakeOuterCompositeSerializeRequest { func (a *FakeAPIService) FakeOuterCompositeSerialize(ctx context.Context) ApiFakeOuterCompositeSerializeRequest {
return ApiFakeOuterCompositeSerializeRequest{ return ApiFakeOuterCompositeSerializeRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -453,7 +453,7 @@ func (a *FakeApiService) FakeOuterCompositeSerialize(ctx context.Context) ApiFak
// Execute executes the request // Execute executes the request
// @return OuterComposite // @return OuterComposite
func (a *FakeApiService) FakeOuterCompositeSerializeExecute(r ApiFakeOuterCompositeSerializeRequest) (*OuterComposite, *http.Response, error) { func (a *FakeAPIService) FakeOuterCompositeSerializeExecute(r ApiFakeOuterCompositeSerializeRequest) (*OuterComposite, *http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodPost localVarHTTPMethod = http.MethodPost
localVarPostBody interface{} localVarPostBody interface{}
@@ -461,7 +461,7 @@ func (a *FakeApiService) FakeOuterCompositeSerializeExecute(r ApiFakeOuterCompos
localVarReturnValue *OuterComposite localVarReturnValue *OuterComposite
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.FakeOuterCompositeSerialize") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeAPIService.FakeOuterCompositeSerialize")
if err != nil { if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
} }
@@ -530,7 +530,7 @@ func (a *FakeApiService) FakeOuterCompositeSerializeExecute(r ApiFakeOuterCompos
type ApiFakeOuterNumberSerializeRequest struct { type ApiFakeOuterNumberSerializeRequest struct {
ctx context.Context ctx context.Context
ApiService FakeApi ApiService FakeAPI
body *float32 body *float32
} }
@@ -552,7 +552,7 @@ Test serialization of outer number types
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiFakeOuterNumberSerializeRequest @return ApiFakeOuterNumberSerializeRequest
*/ */
func (a *FakeApiService) FakeOuterNumberSerialize(ctx context.Context) ApiFakeOuterNumberSerializeRequest { func (a *FakeAPIService) FakeOuterNumberSerialize(ctx context.Context) ApiFakeOuterNumberSerializeRequest {
return ApiFakeOuterNumberSerializeRequest{ return ApiFakeOuterNumberSerializeRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -561,7 +561,7 @@ func (a *FakeApiService) FakeOuterNumberSerialize(ctx context.Context) ApiFakeOu
// Execute executes the request // Execute executes the request
// @return float32 // @return float32
func (a *FakeApiService) FakeOuterNumberSerializeExecute(r ApiFakeOuterNumberSerializeRequest) (float32, *http.Response, error) { func (a *FakeAPIService) FakeOuterNumberSerializeExecute(r ApiFakeOuterNumberSerializeRequest) (float32, *http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodPost localVarHTTPMethod = http.MethodPost
localVarPostBody interface{} localVarPostBody interface{}
@@ -569,7 +569,7 @@ func (a *FakeApiService) FakeOuterNumberSerializeExecute(r ApiFakeOuterNumberSer
localVarReturnValue float32 localVarReturnValue float32
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.FakeOuterNumberSerialize") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeAPIService.FakeOuterNumberSerialize")
if err != nil { if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
} }
@@ -638,7 +638,7 @@ func (a *FakeApiService) FakeOuterNumberSerializeExecute(r ApiFakeOuterNumberSer
type ApiFakeOuterStringSerializeRequest struct { type ApiFakeOuterStringSerializeRequest struct {
ctx context.Context ctx context.Context
ApiService FakeApi ApiService FakeAPI
body *string body *string
} }
@@ -660,7 +660,7 @@ Test serialization of outer string types
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiFakeOuterStringSerializeRequest @return ApiFakeOuterStringSerializeRequest
*/ */
func (a *FakeApiService) FakeOuterStringSerialize(ctx context.Context) ApiFakeOuterStringSerializeRequest { func (a *FakeAPIService) FakeOuterStringSerialize(ctx context.Context) ApiFakeOuterStringSerializeRequest {
return ApiFakeOuterStringSerializeRequest{ return ApiFakeOuterStringSerializeRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -669,7 +669,7 @@ func (a *FakeApiService) FakeOuterStringSerialize(ctx context.Context) ApiFakeOu
// Execute executes the request // Execute executes the request
// @return string // @return string
func (a *FakeApiService) FakeOuterStringSerializeExecute(r ApiFakeOuterStringSerializeRequest) (string, *http.Response, error) { func (a *FakeAPIService) FakeOuterStringSerializeExecute(r ApiFakeOuterStringSerializeRequest) (string, *http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodPost localVarHTTPMethod = http.MethodPost
localVarPostBody interface{} localVarPostBody interface{}
@@ -677,7 +677,7 @@ func (a *FakeApiService) FakeOuterStringSerializeExecute(r ApiFakeOuterStringSer
localVarReturnValue string localVarReturnValue string
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.FakeOuterStringSerialize") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeAPIService.FakeOuterStringSerialize")
if err != nil { if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
} }
@@ -746,7 +746,7 @@ func (a *FakeApiService) FakeOuterStringSerializeExecute(r ApiFakeOuterStringSer
type ApiTestBodyWithFileSchemaRequest struct { type ApiTestBodyWithFileSchemaRequest struct {
ctx context.Context ctx context.Context
ApiService FakeApi ApiService FakeAPI
body *FileSchemaTestClass body *FileSchemaTestClass
} }
@@ -767,7 +767,7 @@ For this test, the body for this request much reference a schema named `File`.
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiTestBodyWithFileSchemaRequest @return ApiTestBodyWithFileSchemaRequest
*/ */
func (a *FakeApiService) TestBodyWithFileSchema(ctx context.Context) ApiTestBodyWithFileSchemaRequest { func (a *FakeAPIService) TestBodyWithFileSchema(ctx context.Context) ApiTestBodyWithFileSchemaRequest {
return ApiTestBodyWithFileSchemaRequest{ return ApiTestBodyWithFileSchemaRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -775,14 +775,14 @@ func (a *FakeApiService) TestBodyWithFileSchema(ctx context.Context) ApiTestBody
} }
// Execute executes the request // Execute executes the request
func (a *FakeApiService) TestBodyWithFileSchemaExecute(r ApiTestBodyWithFileSchemaRequest) (*http.Response, error) { func (a *FakeAPIService) TestBodyWithFileSchemaExecute(r ApiTestBodyWithFileSchemaRequest) (*http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodPut localVarHTTPMethod = http.MethodPut
localVarPostBody interface{} localVarPostBody interface{}
formFiles []formFile formFiles []formFile
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestBodyWithFileSchema") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeAPIService.TestBodyWithFileSchema")
if err != nil { if err != nil {
return nil, &GenericOpenAPIError{error: err.Error()} return nil, &GenericOpenAPIError{error: err.Error()}
} }
@@ -845,7 +845,7 @@ func (a *FakeApiService) TestBodyWithFileSchemaExecute(r ApiTestBodyWithFileSche
type ApiTestBodyWithQueryParamsRequest struct { type ApiTestBodyWithQueryParamsRequest struct {
ctx context.Context ctx context.Context
ApiService FakeApi ApiService FakeAPI
query *string query *string
body *User body *User
} }
@@ -870,7 +870,7 @@ TestBodyWithQueryParams Method for TestBodyWithQueryParams
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiTestBodyWithQueryParamsRequest @return ApiTestBodyWithQueryParamsRequest
*/ */
func (a *FakeApiService) TestBodyWithQueryParams(ctx context.Context) ApiTestBodyWithQueryParamsRequest { func (a *FakeAPIService) TestBodyWithQueryParams(ctx context.Context) ApiTestBodyWithQueryParamsRequest {
return ApiTestBodyWithQueryParamsRequest{ return ApiTestBodyWithQueryParamsRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -878,14 +878,14 @@ func (a *FakeApiService) TestBodyWithQueryParams(ctx context.Context) ApiTestBod
} }
// Execute executes the request // Execute executes the request
func (a *FakeApiService) TestBodyWithQueryParamsExecute(r ApiTestBodyWithQueryParamsRequest) (*http.Response, error) { func (a *FakeAPIService) TestBodyWithQueryParamsExecute(r ApiTestBodyWithQueryParamsRequest) (*http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodPut localVarHTTPMethod = http.MethodPut
localVarPostBody interface{} localVarPostBody interface{}
formFiles []formFile formFiles []formFile
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestBodyWithQueryParams") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeAPIService.TestBodyWithQueryParams")
if err != nil { if err != nil {
return nil, &GenericOpenAPIError{error: err.Error()} return nil, &GenericOpenAPIError{error: err.Error()}
} }
@@ -952,7 +952,7 @@ func (a *FakeApiService) TestBodyWithQueryParamsExecute(r ApiTestBodyWithQueryPa
type ApiTestClientModelRequest struct { type ApiTestClientModelRequest struct {
ctx context.Context ctx context.Context
ApiService FakeApi ApiService FakeAPI
body *Client body *Client
} }
@@ -974,7 +974,7 @@ To test "client" model
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiTestClientModelRequest @return ApiTestClientModelRequest
*/ */
func (a *FakeApiService) TestClientModel(ctx context.Context) ApiTestClientModelRequest { func (a *FakeAPIService) TestClientModel(ctx context.Context) ApiTestClientModelRequest {
return ApiTestClientModelRequest{ return ApiTestClientModelRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -983,7 +983,7 @@ func (a *FakeApiService) TestClientModel(ctx context.Context) ApiTestClientModel
// Execute executes the request // Execute executes the request
// @return Client // @return Client
func (a *FakeApiService) TestClientModelExecute(r ApiTestClientModelRequest) (*Client, *http.Response, error) { func (a *FakeAPIService) TestClientModelExecute(r ApiTestClientModelRequest) (*Client, *http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodPatch localVarHTTPMethod = http.MethodPatch
localVarPostBody interface{} localVarPostBody interface{}
@@ -991,7 +991,7 @@ func (a *FakeApiService) TestClientModelExecute(r ApiTestClientModelRequest) (*C
localVarReturnValue *Client localVarReturnValue *Client
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestClientModel") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeAPIService.TestClientModel")
if err != nil { if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
} }
@@ -1063,7 +1063,7 @@ func (a *FakeApiService) TestClientModelExecute(r ApiTestClientModelRequest) (*C
type ApiTestEndpointParametersRequest struct { type ApiTestEndpointParametersRequest struct {
ctx context.Context ctx context.Context
ApiService FakeApi ApiService FakeAPI
number *float32 number *float32
double *float64 double *float64
patternWithoutDelimiter *string patternWithoutDelimiter *string
@@ -1179,7 +1179,7 @@ Fake endpoint for testing various parameters
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiTestEndpointParametersRequest @return ApiTestEndpointParametersRequest
*/ */
func (a *FakeApiService) TestEndpointParameters(ctx context.Context) ApiTestEndpointParametersRequest { func (a *FakeAPIService) TestEndpointParameters(ctx context.Context) ApiTestEndpointParametersRequest {
return ApiTestEndpointParametersRequest{ return ApiTestEndpointParametersRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -1187,14 +1187,14 @@ func (a *FakeApiService) TestEndpointParameters(ctx context.Context) ApiTestEndp
} }
// Execute executes the request // Execute executes the request
func (a *FakeApiService) TestEndpointParametersExecute(r ApiTestEndpointParametersRequest) (*http.Response, error) { func (a *FakeAPIService) TestEndpointParametersExecute(r ApiTestEndpointParametersRequest) (*http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodPost localVarHTTPMethod = http.MethodPost
localVarPostBody interface{} localVarPostBody interface{}
formFiles []formFile formFiles []formFile
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestEndpointParameters") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeAPIService.TestEndpointParameters")
if err != nil { if err != nil {
return nil, &GenericOpenAPIError{error: err.Error()} return nil, &GenericOpenAPIError{error: err.Error()}
} }
@@ -1324,7 +1324,7 @@ func (a *FakeApiService) TestEndpointParametersExecute(r ApiTestEndpointParamete
type ApiTestEnumParametersRequest struct { type ApiTestEnumParametersRequest struct {
ctx context.Context ctx context.Context
ApiService FakeApi ApiService FakeAPI
enumHeaderStringArray *[]string enumHeaderStringArray *[]string
enumHeaderString *string enumHeaderString *string
enumQueryStringArray *[]string enumQueryStringArray *[]string
@@ -1395,7 +1395,7 @@ To test enum parameters
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiTestEnumParametersRequest @return ApiTestEnumParametersRequest
*/ */
func (a *FakeApiService) TestEnumParameters(ctx context.Context) ApiTestEnumParametersRequest { func (a *FakeAPIService) TestEnumParameters(ctx context.Context) ApiTestEnumParametersRequest {
return ApiTestEnumParametersRequest{ return ApiTestEnumParametersRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -1403,14 +1403,14 @@ func (a *FakeApiService) TestEnumParameters(ctx context.Context) ApiTestEnumPara
} }
// Execute executes the request // Execute executes the request
func (a *FakeApiService) TestEnumParametersExecute(r ApiTestEnumParametersRequest) (*http.Response, error) { func (a *FakeAPIService) TestEnumParametersExecute(r ApiTestEnumParametersRequest) (*http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodGet localVarHTTPMethod = http.MethodGet
localVarPostBody interface{} localVarPostBody interface{}
formFiles []formFile formFiles []formFile
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestEnumParameters") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeAPIService.TestEnumParameters")
if err != nil { if err != nil {
return nil, &GenericOpenAPIError{error: err.Error()} return nil, &GenericOpenAPIError{error: err.Error()}
} }
@@ -1492,7 +1492,7 @@ func (a *FakeApiService) TestEnumParametersExecute(r ApiTestEnumParametersReques
type ApiTestGroupParametersRequest struct { type ApiTestGroupParametersRequest struct {
ctx context.Context ctx context.Context
ApiService FakeApi ApiService FakeAPI
requiredStringGroup *int32 requiredStringGroup *int32
requiredBooleanGroup *bool requiredBooleanGroup *bool
requiredInt64Group *int64 requiredInt64Group *int64
@@ -1549,7 +1549,7 @@ Fake endpoint to test group parameters (optional)
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiTestGroupParametersRequest @return ApiTestGroupParametersRequest
*/ */
func (a *FakeApiService) TestGroupParameters(ctx context.Context) ApiTestGroupParametersRequest { func (a *FakeAPIService) TestGroupParameters(ctx context.Context) ApiTestGroupParametersRequest {
return ApiTestGroupParametersRequest{ return ApiTestGroupParametersRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -1557,14 +1557,14 @@ func (a *FakeApiService) TestGroupParameters(ctx context.Context) ApiTestGroupPa
} }
// Execute executes the request // Execute executes the request
func (a *FakeApiService) TestGroupParametersExecute(r ApiTestGroupParametersRequest) (*http.Response, error) { func (a *FakeAPIService) TestGroupParametersExecute(r ApiTestGroupParametersRequest) (*http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodDelete localVarHTTPMethod = http.MethodDelete
localVarPostBody interface{} localVarPostBody interface{}
formFiles []formFile formFiles []formFile
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestGroupParameters") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeAPIService.TestGroupParameters")
if err != nil { if err != nil {
return nil, &GenericOpenAPIError{error: err.Error()} return nil, &GenericOpenAPIError{error: err.Error()}
} }
@@ -1643,7 +1643,7 @@ func (a *FakeApiService) TestGroupParametersExecute(r ApiTestGroupParametersRequ
type ApiTestInlineAdditionalPropertiesRequest struct { type ApiTestInlineAdditionalPropertiesRequest struct {
ctx context.Context ctx context.Context
ApiService FakeApi ApiService FakeAPI
param *map[string]string param *map[string]string
} }
@@ -1663,7 +1663,7 @@ TestInlineAdditionalProperties test inline additionalProperties
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiTestInlineAdditionalPropertiesRequest @return ApiTestInlineAdditionalPropertiesRequest
*/ */
func (a *FakeApiService) TestInlineAdditionalProperties(ctx context.Context) ApiTestInlineAdditionalPropertiesRequest { func (a *FakeAPIService) TestInlineAdditionalProperties(ctx context.Context) ApiTestInlineAdditionalPropertiesRequest {
return ApiTestInlineAdditionalPropertiesRequest{ return ApiTestInlineAdditionalPropertiesRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -1671,14 +1671,14 @@ func (a *FakeApiService) TestInlineAdditionalProperties(ctx context.Context) Api
} }
// Execute executes the request // Execute executes the request
func (a *FakeApiService) TestInlineAdditionalPropertiesExecute(r ApiTestInlineAdditionalPropertiesRequest) (*http.Response, error) { func (a *FakeAPIService) TestInlineAdditionalPropertiesExecute(r ApiTestInlineAdditionalPropertiesRequest) (*http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodPost localVarHTTPMethod = http.MethodPost
localVarPostBody interface{} localVarPostBody interface{}
formFiles []formFile formFiles []formFile
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestInlineAdditionalProperties") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeAPIService.TestInlineAdditionalProperties")
if err != nil { if err != nil {
return nil, &GenericOpenAPIError{error: err.Error()} return nil, &GenericOpenAPIError{error: err.Error()}
} }
@@ -1741,7 +1741,7 @@ func (a *FakeApiService) TestInlineAdditionalPropertiesExecute(r ApiTestInlineAd
type ApiTestJsonFormDataRequest struct { type ApiTestJsonFormDataRequest struct {
ctx context.Context ctx context.Context
ApiService FakeApi ApiService FakeAPI
param *string param *string
param2 *string param2 *string
} }
@@ -1768,7 +1768,7 @@ TestJsonFormData test json serialization of form data
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiTestJsonFormDataRequest @return ApiTestJsonFormDataRequest
*/ */
func (a *FakeApiService) TestJsonFormData(ctx context.Context) ApiTestJsonFormDataRequest { func (a *FakeAPIService) TestJsonFormData(ctx context.Context) ApiTestJsonFormDataRequest {
return ApiTestJsonFormDataRequest{ return ApiTestJsonFormDataRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -1776,14 +1776,14 @@ func (a *FakeApiService) TestJsonFormData(ctx context.Context) ApiTestJsonFormDa
} }
// Execute executes the request // Execute executes the request
func (a *FakeApiService) TestJsonFormDataExecute(r ApiTestJsonFormDataRequest) (*http.Response, error) { func (a *FakeAPIService) TestJsonFormDataExecute(r ApiTestJsonFormDataRequest) (*http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodGet localVarHTTPMethod = http.MethodGet
localVarPostBody interface{} localVarPostBody interface{}
formFiles []formFile formFiles []formFile
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestJsonFormData") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeAPIService.TestJsonFormData")
if err != nil { if err != nil {
return nil, &GenericOpenAPIError{error: err.Error()} return nil, &GenericOpenAPIError{error: err.Error()}
} }
@@ -1849,7 +1849,7 @@ func (a *FakeApiService) TestJsonFormDataExecute(r ApiTestJsonFormDataRequest) (
type ApiTestQueryParameterCollectionFormatRequest struct { type ApiTestQueryParameterCollectionFormatRequest struct {
ctx context.Context ctx context.Context
ApiService FakeApi ApiService FakeAPI
pipe *[]string pipe *[]string
ioutil *[]string ioutil *[]string
http *[]string http *[]string
@@ -1894,7 +1894,7 @@ To test the collection format in query parameters
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiTestQueryParameterCollectionFormatRequest @return ApiTestQueryParameterCollectionFormatRequest
*/ */
func (a *FakeApiService) TestQueryParameterCollectionFormat(ctx context.Context) ApiTestQueryParameterCollectionFormatRequest { func (a *FakeAPIService) TestQueryParameterCollectionFormat(ctx context.Context) ApiTestQueryParameterCollectionFormatRequest {
return ApiTestQueryParameterCollectionFormatRequest{ return ApiTestQueryParameterCollectionFormatRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -1902,14 +1902,14 @@ func (a *FakeApiService) TestQueryParameterCollectionFormat(ctx context.Context)
} }
// Execute executes the request // Execute executes the request
func (a *FakeApiService) TestQueryParameterCollectionFormatExecute(r ApiTestQueryParameterCollectionFormatRequest) (*http.Response, error) { func (a *FakeAPIService) TestQueryParameterCollectionFormatExecute(r ApiTestQueryParameterCollectionFormatRequest) (*http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodPut localVarHTTPMethod = http.MethodPut
localVarPostBody interface{} localVarPostBody interface{}
formFiles []formFile formFiles []formFile
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestQueryParameterCollectionFormat") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeAPIService.TestQueryParameterCollectionFormat")
if err != nil { if err != nil {
return nil, &GenericOpenAPIError{error: err.Error()} return nil, &GenericOpenAPIError{error: err.Error()}
} }

View File

@@ -19,7 +19,7 @@ import (
) )
type FakeClassnameTags123Api interface { type FakeClassnameTags123API interface {
/* /*
TestClassname To test class name in snake case TestClassname To test class name in snake case
@@ -36,12 +36,12 @@ type FakeClassnameTags123Api interface {
TestClassnameExecute(r ApiTestClassnameRequest) (*Client, *http.Response, error) TestClassnameExecute(r ApiTestClassnameRequest) (*Client, *http.Response, error)
} }
// FakeClassnameTags123ApiService FakeClassnameTags123Api service // FakeClassnameTags123APIService FakeClassnameTags123API service
type FakeClassnameTags123ApiService service type FakeClassnameTags123APIService service
type ApiTestClassnameRequest struct { type ApiTestClassnameRequest struct {
ctx context.Context ctx context.Context
ApiService FakeClassnameTags123Api ApiService FakeClassnameTags123API
body *Client body *Client
} }
@@ -63,7 +63,7 @@ To test class name in snake case
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiTestClassnameRequest @return ApiTestClassnameRequest
*/ */
func (a *FakeClassnameTags123ApiService) TestClassname(ctx context.Context) ApiTestClassnameRequest { func (a *FakeClassnameTags123APIService) TestClassname(ctx context.Context) ApiTestClassnameRequest {
return ApiTestClassnameRequest{ return ApiTestClassnameRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -72,7 +72,7 @@ func (a *FakeClassnameTags123ApiService) TestClassname(ctx context.Context) ApiT
// Execute executes the request // Execute executes the request
// @return Client // @return Client
func (a *FakeClassnameTags123ApiService) TestClassnameExecute(r ApiTestClassnameRequest) (*Client, *http.Response, error) { func (a *FakeClassnameTags123APIService) TestClassnameExecute(r ApiTestClassnameRequest) (*Client, *http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodPatch localVarHTTPMethod = http.MethodPatch
localVarPostBody interface{} localVarPostBody interface{}
@@ -80,7 +80,7 @@ func (a *FakeClassnameTags123ApiService) TestClassnameExecute(r ApiTestClassname
localVarReturnValue *Client localVarReturnValue *Client
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeClassnameTags123ApiService.TestClassname") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeClassnameTags123APIService.TestClassname")
if err != nil { if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
} }

View File

@@ -21,7 +21,7 @@ import (
) )
type PetApi interface { type PetAPI interface {
/* /*
AddPet Add a new pet to the store AddPet Add a new pet to the store
@@ -142,12 +142,12 @@ type PetApi interface {
UploadFileWithRequiredFileExecute(r ApiUploadFileWithRequiredFileRequest) (*ApiResponse, *http.Response, error) UploadFileWithRequiredFileExecute(r ApiUploadFileWithRequiredFileRequest) (*ApiResponse, *http.Response, error)
} }
// PetApiService PetApi service // PetAPIService PetAPI service
type PetApiService service type PetAPIService service
type ApiAddPetRequest struct { type ApiAddPetRequest struct {
ctx context.Context ctx context.Context
ApiService PetApi ApiService PetAPI
body *Pet body *Pet
} }
@@ -167,7 +167,7 @@ AddPet Add a new pet to the store
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiAddPetRequest @return ApiAddPetRequest
*/ */
func (a *PetApiService) AddPet(ctx context.Context) ApiAddPetRequest { func (a *PetAPIService) AddPet(ctx context.Context) ApiAddPetRequest {
return ApiAddPetRequest{ return ApiAddPetRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -175,14 +175,14 @@ func (a *PetApiService) AddPet(ctx context.Context) ApiAddPetRequest {
} }
// Execute executes the request // Execute executes the request
func (a *PetApiService) AddPetExecute(r ApiAddPetRequest) (*http.Response, error) { func (a *PetAPIService) AddPetExecute(r ApiAddPetRequest) (*http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodPost localVarHTTPMethod = http.MethodPost
localVarPostBody interface{} localVarPostBody interface{}
formFiles []formFile formFiles []formFile
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.AddPet") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetAPIService.AddPet")
if err != nil { if err != nil {
return nil, &GenericOpenAPIError{error: err.Error()} return nil, &GenericOpenAPIError{error: err.Error()}
} }
@@ -245,7 +245,7 @@ func (a *PetApiService) AddPetExecute(r ApiAddPetRequest) (*http.Response, error
type ApiDeletePetRequest struct { type ApiDeletePetRequest struct {
ctx context.Context ctx context.Context
ApiService PetApi ApiService PetAPI
petId int64 petId int64
apiKey *string apiKey *string
} }
@@ -266,7 +266,7 @@ DeletePet Deletes a pet
@param petId Pet id to delete @param petId Pet id to delete
@return ApiDeletePetRequest @return ApiDeletePetRequest
*/ */
func (a *PetApiService) DeletePet(ctx context.Context, petId int64) ApiDeletePetRequest { func (a *PetAPIService) DeletePet(ctx context.Context, petId int64) ApiDeletePetRequest {
return ApiDeletePetRequest{ return ApiDeletePetRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -275,14 +275,14 @@ func (a *PetApiService) DeletePet(ctx context.Context, petId int64) ApiDeletePet
} }
// Execute executes the request // Execute executes the request
func (a *PetApiService) DeletePetExecute(r ApiDeletePetRequest) (*http.Response, error) { func (a *PetAPIService) DeletePetExecute(r ApiDeletePetRequest) (*http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodDelete localVarHTTPMethod = http.MethodDelete
localVarPostBody interface{} localVarPostBody interface{}
formFiles []formFile formFiles []formFile
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.DeletePet") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetAPIService.DeletePet")
if err != nil { if err != nil {
return nil, &GenericOpenAPIError{error: err.Error()} return nil, &GenericOpenAPIError{error: err.Error()}
} }
@@ -344,7 +344,7 @@ func (a *PetApiService) DeletePetExecute(r ApiDeletePetRequest) (*http.Response,
type ApiFindPetsByStatusRequest struct { type ApiFindPetsByStatusRequest struct {
ctx context.Context ctx context.Context
ApiService PetApi ApiService PetAPI
status *[]string status *[]string
} }
@@ -366,7 +366,7 @@ Multiple status values can be provided with comma separated strings
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiFindPetsByStatusRequest @return ApiFindPetsByStatusRequest
*/ */
func (a *PetApiService) FindPetsByStatus(ctx context.Context) ApiFindPetsByStatusRequest { func (a *PetAPIService) FindPetsByStatus(ctx context.Context) ApiFindPetsByStatusRequest {
return ApiFindPetsByStatusRequest{ return ApiFindPetsByStatusRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -375,7 +375,7 @@ func (a *PetApiService) FindPetsByStatus(ctx context.Context) ApiFindPetsByStatu
// Execute executes the request // Execute executes the request
// @return []Pet // @return []Pet
func (a *PetApiService) FindPetsByStatusExecute(r ApiFindPetsByStatusRequest) ([]Pet, *http.Response, error) { func (a *PetAPIService) FindPetsByStatusExecute(r ApiFindPetsByStatusRequest) ([]Pet, *http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodGet localVarHTTPMethod = http.MethodGet
localVarPostBody interface{} localVarPostBody interface{}
@@ -383,7 +383,7 @@ func (a *PetApiService) FindPetsByStatusExecute(r ApiFindPetsByStatusRequest) ([
localVarReturnValue []Pet localVarReturnValue []Pet
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.FindPetsByStatus") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetAPIService.FindPetsByStatus")
if err != nil { if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
} }
@@ -454,7 +454,7 @@ func (a *PetApiService) FindPetsByStatusExecute(r ApiFindPetsByStatusRequest) ([
type ApiFindPetsByTagsRequest struct { type ApiFindPetsByTagsRequest struct {
ctx context.Context ctx context.Context
ApiService PetApi ApiService PetAPI
tags *[]string tags *[]string
} }
@@ -478,7 +478,7 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3
Deprecated Deprecated
*/ */
func (a *PetApiService) FindPetsByTags(ctx context.Context) ApiFindPetsByTagsRequest { func (a *PetAPIService) FindPetsByTags(ctx context.Context) ApiFindPetsByTagsRequest {
return ApiFindPetsByTagsRequest{ return ApiFindPetsByTagsRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -488,7 +488,7 @@ func (a *PetApiService) FindPetsByTags(ctx context.Context) ApiFindPetsByTagsReq
// Execute executes the request // Execute executes the request
// @return []Pet // @return []Pet
// Deprecated // Deprecated
func (a *PetApiService) FindPetsByTagsExecute(r ApiFindPetsByTagsRequest) ([]Pet, *http.Response, error) { func (a *PetAPIService) FindPetsByTagsExecute(r ApiFindPetsByTagsRequest) ([]Pet, *http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodGet localVarHTTPMethod = http.MethodGet
localVarPostBody interface{} localVarPostBody interface{}
@@ -496,7 +496,7 @@ func (a *PetApiService) FindPetsByTagsExecute(r ApiFindPetsByTagsRequest) ([]Pet
localVarReturnValue []Pet localVarReturnValue []Pet
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.FindPetsByTags") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetAPIService.FindPetsByTags")
if err != nil { if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
} }
@@ -567,7 +567,7 @@ func (a *PetApiService) FindPetsByTagsExecute(r ApiFindPetsByTagsRequest) ([]Pet
type ApiGetPetByIdRequest struct { type ApiGetPetByIdRequest struct {
ctx context.Context ctx context.Context
ApiService PetApi ApiService PetAPI
petId int64 petId int64
} }
@@ -584,7 +584,7 @@ Returns a single pet
@param petId ID of pet to return @param petId ID of pet to return
@return ApiGetPetByIdRequest @return ApiGetPetByIdRequest
*/ */
func (a *PetApiService) GetPetById(ctx context.Context, petId int64) ApiGetPetByIdRequest { func (a *PetAPIService) GetPetById(ctx context.Context, petId int64) ApiGetPetByIdRequest {
return ApiGetPetByIdRequest{ return ApiGetPetByIdRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -594,7 +594,7 @@ func (a *PetApiService) GetPetById(ctx context.Context, petId int64) ApiGetPetBy
// Execute executes the request // Execute executes the request
// @return Pet // @return Pet
func (a *PetApiService) GetPetByIdExecute(r ApiGetPetByIdRequest) (*Pet, *http.Response, error) { func (a *PetAPIService) GetPetByIdExecute(r ApiGetPetByIdRequest) (*Pet, *http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodGet localVarHTTPMethod = http.MethodGet
localVarPostBody interface{} localVarPostBody interface{}
@@ -602,7 +602,7 @@ func (a *PetApiService) GetPetByIdExecute(r ApiGetPetByIdRequest) (*Pet, *http.R
localVarReturnValue *Pet localVarReturnValue *Pet
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.GetPetById") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetAPIService.GetPetById")
if err != nil { if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
} }
@@ -684,7 +684,7 @@ func (a *PetApiService) GetPetByIdExecute(r ApiGetPetByIdRequest) (*Pet, *http.R
type ApiUpdatePetRequest struct { type ApiUpdatePetRequest struct {
ctx context.Context ctx context.Context
ApiService PetApi ApiService PetAPI
body *Pet body *Pet
} }
@@ -704,7 +704,7 @@ UpdatePet Update an existing pet
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiUpdatePetRequest @return ApiUpdatePetRequest
*/ */
func (a *PetApiService) UpdatePet(ctx context.Context) ApiUpdatePetRequest { func (a *PetAPIService) UpdatePet(ctx context.Context) ApiUpdatePetRequest {
return ApiUpdatePetRequest{ return ApiUpdatePetRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -712,14 +712,14 @@ func (a *PetApiService) UpdatePet(ctx context.Context) ApiUpdatePetRequest {
} }
// Execute executes the request // Execute executes the request
func (a *PetApiService) UpdatePetExecute(r ApiUpdatePetRequest) (*http.Response, error) { func (a *PetAPIService) UpdatePetExecute(r ApiUpdatePetRequest) (*http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodPut localVarHTTPMethod = http.MethodPut
localVarPostBody interface{} localVarPostBody interface{}
formFiles []formFile formFiles []formFile
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.UpdatePet") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetAPIService.UpdatePet")
if err != nil { if err != nil {
return nil, &GenericOpenAPIError{error: err.Error()} return nil, &GenericOpenAPIError{error: err.Error()}
} }
@@ -782,7 +782,7 @@ func (a *PetApiService) UpdatePetExecute(r ApiUpdatePetRequest) (*http.Response,
type ApiUpdatePetWithFormRequest struct { type ApiUpdatePetWithFormRequest struct {
ctx context.Context ctx context.Context
ApiService PetApi ApiService PetAPI
petId int64 petId int64
name *string name *string
status *string status *string
@@ -811,7 +811,7 @@ UpdatePetWithForm Updates a pet in the store with form data
@param petId ID of pet that needs to be updated @param petId ID of pet that needs to be updated
@return ApiUpdatePetWithFormRequest @return ApiUpdatePetWithFormRequest
*/ */
func (a *PetApiService) UpdatePetWithForm(ctx context.Context, petId int64) ApiUpdatePetWithFormRequest { func (a *PetAPIService) UpdatePetWithForm(ctx context.Context, petId int64) ApiUpdatePetWithFormRequest {
return ApiUpdatePetWithFormRequest{ return ApiUpdatePetWithFormRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -820,14 +820,14 @@ func (a *PetApiService) UpdatePetWithForm(ctx context.Context, petId int64) ApiU
} }
// Execute executes the request // Execute executes the request
func (a *PetApiService) UpdatePetWithFormExecute(r ApiUpdatePetWithFormRequest) (*http.Response, error) { func (a *PetAPIService) UpdatePetWithFormExecute(r ApiUpdatePetWithFormRequest) (*http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodPost localVarHTTPMethod = http.MethodPost
localVarPostBody interface{} localVarPostBody interface{}
formFiles []formFile formFiles []formFile
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.UpdatePetWithForm") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetAPIService.UpdatePetWithForm")
if err != nil { if err != nil {
return nil, &GenericOpenAPIError{error: err.Error()} return nil, &GenericOpenAPIError{error: err.Error()}
} }
@@ -892,7 +892,7 @@ func (a *PetApiService) UpdatePetWithFormExecute(r ApiUpdatePetWithFormRequest)
type ApiUploadFileRequest struct { type ApiUploadFileRequest struct {
ctx context.Context ctx context.Context
ApiService PetApi ApiService PetAPI
petId int64 petId int64
additionalMetadata *string additionalMetadata *string
file *os.File file *os.File
@@ -921,7 +921,7 @@ UploadFile uploads an image
@param petId ID of pet to update @param petId ID of pet to update
@return ApiUploadFileRequest @return ApiUploadFileRequest
*/ */
func (a *PetApiService) UploadFile(ctx context.Context, petId int64) ApiUploadFileRequest { func (a *PetAPIService) UploadFile(ctx context.Context, petId int64) ApiUploadFileRequest {
return ApiUploadFileRequest{ return ApiUploadFileRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -931,7 +931,7 @@ func (a *PetApiService) UploadFile(ctx context.Context, petId int64) ApiUploadFi
// Execute executes the request // Execute executes the request
// @return ApiResponse // @return ApiResponse
func (a *PetApiService) UploadFileExecute(r ApiUploadFileRequest) (*ApiResponse, *http.Response, error) { func (a *PetAPIService) UploadFileExecute(r ApiUploadFileRequest) (*ApiResponse, *http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodPost localVarHTTPMethod = http.MethodPost
localVarPostBody interface{} localVarPostBody interface{}
@@ -939,7 +939,7 @@ func (a *PetApiService) UploadFileExecute(r ApiUploadFileRequest) (*ApiResponse,
localVarReturnValue *ApiResponse localVarReturnValue *ApiResponse
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.UploadFile") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetAPIService.UploadFile")
if err != nil { if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
} }
@@ -1027,7 +1027,7 @@ func (a *PetApiService) UploadFileExecute(r ApiUploadFileRequest) (*ApiResponse,
type ApiUploadFileWithRequiredFileRequest struct { type ApiUploadFileWithRequiredFileRequest struct {
ctx context.Context ctx context.Context
ApiService PetApi ApiService PetAPI
petId int64 petId int64
requiredFile *os.File requiredFile *os.File
additionalMetadata *string additionalMetadata *string
@@ -1056,7 +1056,7 @@ UploadFileWithRequiredFile uploads an image (required)
@param petId ID of pet to update @param petId ID of pet to update
@return ApiUploadFileWithRequiredFileRequest @return ApiUploadFileWithRequiredFileRequest
*/ */
func (a *PetApiService) UploadFileWithRequiredFile(ctx context.Context, petId int64) ApiUploadFileWithRequiredFileRequest { func (a *PetAPIService) UploadFileWithRequiredFile(ctx context.Context, petId int64) ApiUploadFileWithRequiredFileRequest {
return ApiUploadFileWithRequiredFileRequest{ return ApiUploadFileWithRequiredFileRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -1066,7 +1066,7 @@ func (a *PetApiService) UploadFileWithRequiredFile(ctx context.Context, petId in
// Execute executes the request // Execute executes the request
// @return ApiResponse // @return ApiResponse
func (a *PetApiService) UploadFileWithRequiredFileExecute(r ApiUploadFileWithRequiredFileRequest) (*ApiResponse, *http.Response, error) { func (a *PetAPIService) UploadFileWithRequiredFileExecute(r ApiUploadFileWithRequiredFileRequest) (*ApiResponse, *http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodPost localVarHTTPMethod = http.MethodPost
localVarPostBody interface{} localVarPostBody interface{}
@@ -1074,7 +1074,7 @@ func (a *PetApiService) UploadFileWithRequiredFileExecute(r ApiUploadFileWithReq
localVarReturnValue *ApiResponse localVarReturnValue *ApiResponse
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.UploadFileWithRequiredFile") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetAPIService.UploadFileWithRequiredFile")
if err != nil { if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
} }

View File

@@ -20,7 +20,7 @@ import (
) )
type StoreApi interface { type StoreAPI interface {
/* /*
DeleteOrder Delete purchase order by ID DeleteOrder Delete purchase order by ID
@@ -78,12 +78,12 @@ type StoreApi interface {
PlaceOrderExecute(r ApiPlaceOrderRequest) (*Order, *http.Response, error) PlaceOrderExecute(r ApiPlaceOrderRequest) (*Order, *http.Response, error)
} }
// StoreApiService StoreApi service // StoreAPIService StoreAPI service
type StoreApiService service type StoreAPIService service
type ApiDeleteOrderRequest struct { type ApiDeleteOrderRequest struct {
ctx context.Context ctx context.Context
ApiService StoreApi ApiService StoreAPI
orderId string orderId string
} }
@@ -100,7 +100,7 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or non
@param orderId ID of the order that needs to be deleted @param orderId ID of the order that needs to be deleted
@return ApiDeleteOrderRequest @return ApiDeleteOrderRequest
*/ */
func (a *StoreApiService) DeleteOrder(ctx context.Context, orderId string) ApiDeleteOrderRequest { func (a *StoreAPIService) DeleteOrder(ctx context.Context, orderId string) ApiDeleteOrderRequest {
return ApiDeleteOrderRequest{ return ApiDeleteOrderRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -109,14 +109,14 @@ func (a *StoreApiService) DeleteOrder(ctx context.Context, orderId string) ApiDe
} }
// Execute executes the request // Execute executes the request
func (a *StoreApiService) DeleteOrderExecute(r ApiDeleteOrderRequest) (*http.Response, error) { func (a *StoreAPIService) DeleteOrderExecute(r ApiDeleteOrderRequest) (*http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodDelete localVarHTTPMethod = http.MethodDelete
localVarPostBody interface{} localVarPostBody interface{}
formFiles []formFile formFiles []formFile
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StoreApiService.DeleteOrder") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StoreAPIService.DeleteOrder")
if err != nil { if err != nil {
return nil, &GenericOpenAPIError{error: err.Error()} return nil, &GenericOpenAPIError{error: err.Error()}
} }
@@ -175,7 +175,7 @@ func (a *StoreApiService) DeleteOrderExecute(r ApiDeleteOrderRequest) (*http.Res
type ApiGetInventoryRequest struct { type ApiGetInventoryRequest struct {
ctx context.Context ctx context.Context
ApiService StoreApi ApiService StoreAPI
} }
func (r ApiGetInventoryRequest) Execute() (map[string]int32, *http.Response, error) { func (r ApiGetInventoryRequest) Execute() (map[string]int32, *http.Response, error) {
@@ -190,7 +190,7 @@ Returns a map of status codes to quantities
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiGetInventoryRequest @return ApiGetInventoryRequest
*/ */
func (a *StoreApiService) GetInventory(ctx context.Context) ApiGetInventoryRequest { func (a *StoreAPIService) GetInventory(ctx context.Context) ApiGetInventoryRequest {
return ApiGetInventoryRequest{ return ApiGetInventoryRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -199,7 +199,7 @@ func (a *StoreApiService) GetInventory(ctx context.Context) ApiGetInventoryReque
// Execute executes the request // Execute executes the request
// @return map[string]int32 // @return map[string]int32
func (a *StoreApiService) GetInventoryExecute(r ApiGetInventoryRequest) (map[string]int32, *http.Response, error) { func (a *StoreAPIService) GetInventoryExecute(r ApiGetInventoryRequest) (map[string]int32, *http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodGet localVarHTTPMethod = http.MethodGet
localVarPostBody interface{} localVarPostBody interface{}
@@ -207,7 +207,7 @@ func (a *StoreApiService) GetInventoryExecute(r ApiGetInventoryRequest) (map[str
localVarReturnValue map[string]int32 localVarReturnValue map[string]int32
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StoreApiService.GetInventory") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StoreAPIService.GetInventory")
if err != nil { if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
} }
@@ -288,7 +288,7 @@ func (a *StoreApiService) GetInventoryExecute(r ApiGetInventoryRequest) (map[str
type ApiGetOrderByIdRequest struct { type ApiGetOrderByIdRequest struct {
ctx context.Context ctx context.Context
ApiService StoreApi ApiService StoreAPI
orderId int64 orderId int64
} }
@@ -305,7 +305,7 @@ For valid response try integer IDs with value <= 5 or > 10. Other values will ge
@param orderId ID of pet that needs to be fetched @param orderId ID of pet that needs to be fetched
@return ApiGetOrderByIdRequest @return ApiGetOrderByIdRequest
*/ */
func (a *StoreApiService) GetOrderById(ctx context.Context, orderId int64) ApiGetOrderByIdRequest { func (a *StoreAPIService) GetOrderById(ctx context.Context, orderId int64) ApiGetOrderByIdRequest {
return ApiGetOrderByIdRequest{ return ApiGetOrderByIdRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -315,7 +315,7 @@ func (a *StoreApiService) GetOrderById(ctx context.Context, orderId int64) ApiGe
// Execute executes the request // Execute executes the request
// @return Order // @return Order
func (a *StoreApiService) GetOrderByIdExecute(r ApiGetOrderByIdRequest) (*Order, *http.Response, error) { func (a *StoreAPIService) GetOrderByIdExecute(r ApiGetOrderByIdRequest) (*Order, *http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodGet localVarHTTPMethod = http.MethodGet
localVarPostBody interface{} localVarPostBody interface{}
@@ -323,7 +323,7 @@ func (a *StoreApiService) GetOrderByIdExecute(r ApiGetOrderByIdRequest) (*Order,
localVarReturnValue *Order localVarReturnValue *Order
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StoreApiService.GetOrderById") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StoreAPIService.GetOrderById")
if err != nil { if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
} }
@@ -397,7 +397,7 @@ func (a *StoreApiService) GetOrderByIdExecute(r ApiGetOrderByIdRequest) (*Order,
type ApiPlaceOrderRequest struct { type ApiPlaceOrderRequest struct {
ctx context.Context ctx context.Context
ApiService StoreApi ApiService StoreAPI
body *Order body *Order
} }
@@ -417,7 +417,7 @@ PlaceOrder Place an order for a pet
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiPlaceOrderRequest @return ApiPlaceOrderRequest
*/ */
func (a *StoreApiService) PlaceOrder(ctx context.Context) ApiPlaceOrderRequest { func (a *StoreAPIService) PlaceOrder(ctx context.Context) ApiPlaceOrderRequest {
return ApiPlaceOrderRequest{ return ApiPlaceOrderRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -426,7 +426,7 @@ func (a *StoreApiService) PlaceOrder(ctx context.Context) ApiPlaceOrderRequest {
// Execute executes the request // Execute executes the request
// @return Order // @return Order
func (a *StoreApiService) PlaceOrderExecute(r ApiPlaceOrderRequest) (*Order, *http.Response, error) { func (a *StoreAPIService) PlaceOrderExecute(r ApiPlaceOrderRequest) (*Order, *http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodPost localVarHTTPMethod = http.MethodPost
localVarPostBody interface{} localVarPostBody interface{}
@@ -434,7 +434,7 @@ func (a *StoreApiService) PlaceOrderExecute(r ApiPlaceOrderRequest) (*Order, *ht
localVarReturnValue *Order localVarReturnValue *Order
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StoreApiService.PlaceOrder") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StoreAPIService.PlaceOrder")
if err != nil { if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
} }

View File

@@ -20,7 +20,7 @@ import (
) )
type UserApi interface { type UserAPI interface {
/* /*
CreateUser Create user CreateUser Create user
@@ -122,12 +122,12 @@ type UserApi interface {
UpdateUserExecute(r ApiUpdateUserRequest) (*http.Response, error) UpdateUserExecute(r ApiUpdateUserRequest) (*http.Response, error)
} }
// UserApiService UserApi service // UserAPIService UserAPI service
type UserApiService service type UserAPIService service
type ApiCreateUserRequest struct { type ApiCreateUserRequest struct {
ctx context.Context ctx context.Context
ApiService UserApi ApiService UserAPI
body *User body *User
} }
@@ -149,7 +149,7 @@ This can only be done by the logged in user.
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiCreateUserRequest @return ApiCreateUserRequest
*/ */
func (a *UserApiService) CreateUser(ctx context.Context) ApiCreateUserRequest { func (a *UserAPIService) CreateUser(ctx context.Context) ApiCreateUserRequest {
return ApiCreateUserRequest{ return ApiCreateUserRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -157,14 +157,14 @@ func (a *UserApiService) CreateUser(ctx context.Context) ApiCreateUserRequest {
} }
// Execute executes the request // Execute executes the request
func (a *UserApiService) CreateUserExecute(r ApiCreateUserRequest) (*http.Response, error) { func (a *UserAPIService) CreateUserExecute(r ApiCreateUserRequest) (*http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodPost localVarHTTPMethod = http.MethodPost
localVarPostBody interface{} localVarPostBody interface{}
formFiles []formFile formFiles []formFile
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.CreateUser") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserAPIService.CreateUser")
if err != nil { if err != nil {
return nil, &GenericOpenAPIError{error: err.Error()} return nil, &GenericOpenAPIError{error: err.Error()}
} }
@@ -227,7 +227,7 @@ func (a *UserApiService) CreateUserExecute(r ApiCreateUserRequest) (*http.Respon
type ApiCreateUsersWithArrayInputRequest struct { type ApiCreateUsersWithArrayInputRequest struct {
ctx context.Context ctx context.Context
ApiService UserApi ApiService UserAPI
body *[]User body *[]User
} }
@@ -247,7 +247,7 @@ CreateUsersWithArrayInput Creates list of users with given input array
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiCreateUsersWithArrayInputRequest @return ApiCreateUsersWithArrayInputRequest
*/ */
func (a *UserApiService) CreateUsersWithArrayInput(ctx context.Context) ApiCreateUsersWithArrayInputRequest { func (a *UserAPIService) CreateUsersWithArrayInput(ctx context.Context) ApiCreateUsersWithArrayInputRequest {
return ApiCreateUsersWithArrayInputRequest{ return ApiCreateUsersWithArrayInputRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -255,14 +255,14 @@ func (a *UserApiService) CreateUsersWithArrayInput(ctx context.Context) ApiCreat
} }
// Execute executes the request // Execute executes the request
func (a *UserApiService) CreateUsersWithArrayInputExecute(r ApiCreateUsersWithArrayInputRequest) (*http.Response, error) { func (a *UserAPIService) CreateUsersWithArrayInputExecute(r ApiCreateUsersWithArrayInputRequest) (*http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodPost localVarHTTPMethod = http.MethodPost
localVarPostBody interface{} localVarPostBody interface{}
formFiles []formFile formFiles []formFile
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.CreateUsersWithArrayInput") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserAPIService.CreateUsersWithArrayInput")
if err != nil { if err != nil {
return nil, &GenericOpenAPIError{error: err.Error()} return nil, &GenericOpenAPIError{error: err.Error()}
} }
@@ -325,7 +325,7 @@ func (a *UserApiService) CreateUsersWithArrayInputExecute(r ApiCreateUsersWithAr
type ApiCreateUsersWithListInputRequest struct { type ApiCreateUsersWithListInputRequest struct {
ctx context.Context ctx context.Context
ApiService UserApi ApiService UserAPI
body *[]User body *[]User
} }
@@ -345,7 +345,7 @@ CreateUsersWithListInput Creates list of users with given input array
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiCreateUsersWithListInputRequest @return ApiCreateUsersWithListInputRequest
*/ */
func (a *UserApiService) CreateUsersWithListInput(ctx context.Context) ApiCreateUsersWithListInputRequest { func (a *UserAPIService) CreateUsersWithListInput(ctx context.Context) ApiCreateUsersWithListInputRequest {
return ApiCreateUsersWithListInputRequest{ return ApiCreateUsersWithListInputRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -353,14 +353,14 @@ func (a *UserApiService) CreateUsersWithListInput(ctx context.Context) ApiCreate
} }
// Execute executes the request // Execute executes the request
func (a *UserApiService) CreateUsersWithListInputExecute(r ApiCreateUsersWithListInputRequest) (*http.Response, error) { func (a *UserAPIService) CreateUsersWithListInputExecute(r ApiCreateUsersWithListInputRequest) (*http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodPost localVarHTTPMethod = http.MethodPost
localVarPostBody interface{} localVarPostBody interface{}
formFiles []formFile formFiles []formFile
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.CreateUsersWithListInput") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserAPIService.CreateUsersWithListInput")
if err != nil { if err != nil {
return nil, &GenericOpenAPIError{error: err.Error()} return nil, &GenericOpenAPIError{error: err.Error()}
} }
@@ -423,7 +423,7 @@ func (a *UserApiService) CreateUsersWithListInputExecute(r ApiCreateUsersWithLis
type ApiDeleteUserRequest struct { type ApiDeleteUserRequest struct {
ctx context.Context ctx context.Context
ApiService UserApi ApiService UserAPI
username string username string
} }
@@ -440,7 +440,7 @@ This can only be done by the logged in user.
@param username The name that needs to be deleted @param username The name that needs to be deleted
@return ApiDeleteUserRequest @return ApiDeleteUserRequest
*/ */
func (a *UserApiService) DeleteUser(ctx context.Context, username string) ApiDeleteUserRequest { func (a *UserAPIService) DeleteUser(ctx context.Context, username string) ApiDeleteUserRequest {
return ApiDeleteUserRequest{ return ApiDeleteUserRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -449,14 +449,14 @@ func (a *UserApiService) DeleteUser(ctx context.Context, username string) ApiDel
} }
// Execute executes the request // Execute executes the request
func (a *UserApiService) DeleteUserExecute(r ApiDeleteUserRequest) (*http.Response, error) { func (a *UserAPIService) DeleteUserExecute(r ApiDeleteUserRequest) (*http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodDelete localVarHTTPMethod = http.MethodDelete
localVarPostBody interface{} localVarPostBody interface{}
formFiles []formFile formFiles []formFile
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.DeleteUser") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserAPIService.DeleteUser")
if err != nil { if err != nil {
return nil, &GenericOpenAPIError{error: err.Error()} return nil, &GenericOpenAPIError{error: err.Error()}
} }
@@ -515,7 +515,7 @@ func (a *UserApiService) DeleteUserExecute(r ApiDeleteUserRequest) (*http.Respon
type ApiGetUserByNameRequest struct { type ApiGetUserByNameRequest struct {
ctx context.Context ctx context.Context
ApiService UserApi ApiService UserAPI
username string username string
} }
@@ -530,7 +530,7 @@ GetUserByName Get user by user name
@param username The name that needs to be fetched. Use user1 for testing. @param username The name that needs to be fetched. Use user1 for testing.
@return ApiGetUserByNameRequest @return ApiGetUserByNameRequest
*/ */
func (a *UserApiService) GetUserByName(ctx context.Context, username string) ApiGetUserByNameRequest { func (a *UserAPIService) GetUserByName(ctx context.Context, username string) ApiGetUserByNameRequest {
return ApiGetUserByNameRequest{ return ApiGetUserByNameRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -540,7 +540,7 @@ func (a *UserApiService) GetUserByName(ctx context.Context, username string) Api
// Execute executes the request // Execute executes the request
// @return User // @return User
func (a *UserApiService) GetUserByNameExecute(r ApiGetUserByNameRequest) (*User, *http.Response, error) { func (a *UserAPIService) GetUserByNameExecute(r ApiGetUserByNameRequest) (*User, *http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodGet localVarHTTPMethod = http.MethodGet
localVarPostBody interface{} localVarPostBody interface{}
@@ -548,7 +548,7 @@ func (a *UserApiService) GetUserByNameExecute(r ApiGetUserByNameRequest) (*User,
localVarReturnValue *User localVarReturnValue *User
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.GetUserByName") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserAPIService.GetUserByName")
if err != nil { if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
} }
@@ -616,7 +616,7 @@ func (a *UserApiService) GetUserByNameExecute(r ApiGetUserByNameRequest) (*User,
type ApiLoginUserRequest struct { type ApiLoginUserRequest struct {
ctx context.Context ctx context.Context
ApiService UserApi ApiService UserAPI
username *string username *string
password *string password *string
} }
@@ -643,7 +643,7 @@ LoginUser Logs user into the system
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiLoginUserRequest @return ApiLoginUserRequest
*/ */
func (a *UserApiService) LoginUser(ctx context.Context) ApiLoginUserRequest { func (a *UserAPIService) LoginUser(ctx context.Context) ApiLoginUserRequest {
return ApiLoginUserRequest{ return ApiLoginUserRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -652,7 +652,7 @@ func (a *UserApiService) LoginUser(ctx context.Context) ApiLoginUserRequest {
// Execute executes the request // Execute executes the request
// @return string // @return string
func (a *UserApiService) LoginUserExecute(r ApiLoginUserRequest) (string, *http.Response, error) { func (a *UserAPIService) LoginUserExecute(r ApiLoginUserRequest) (string, *http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodGet localVarHTTPMethod = http.MethodGet
localVarPostBody interface{} localVarPostBody interface{}
@@ -660,7 +660,7 @@ func (a *UserApiService) LoginUserExecute(r ApiLoginUserRequest) (string, *http.
localVarReturnValue string localVarReturnValue string
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.LoginUser") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserAPIService.LoginUser")
if err != nil { if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
} }
@@ -735,7 +735,7 @@ func (a *UserApiService) LoginUserExecute(r ApiLoginUserRequest) (string, *http.
type ApiLogoutUserRequest struct { type ApiLogoutUserRequest struct {
ctx context.Context ctx context.Context
ApiService UserApi ApiService UserAPI
} }
func (r ApiLogoutUserRequest) Execute() (*http.Response, error) { func (r ApiLogoutUserRequest) Execute() (*http.Response, error) {
@@ -748,7 +748,7 @@ LogoutUser Logs out current logged in user session
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiLogoutUserRequest @return ApiLogoutUserRequest
*/ */
func (a *UserApiService) LogoutUser(ctx context.Context) ApiLogoutUserRequest { func (a *UserAPIService) LogoutUser(ctx context.Context) ApiLogoutUserRequest {
return ApiLogoutUserRequest{ return ApiLogoutUserRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -756,14 +756,14 @@ func (a *UserApiService) LogoutUser(ctx context.Context) ApiLogoutUserRequest {
} }
// Execute executes the request // Execute executes the request
func (a *UserApiService) LogoutUserExecute(r ApiLogoutUserRequest) (*http.Response, error) { func (a *UserAPIService) LogoutUserExecute(r ApiLogoutUserRequest) (*http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodGet localVarHTTPMethod = http.MethodGet
localVarPostBody interface{} localVarPostBody interface{}
formFiles []formFile formFiles []formFile
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.LogoutUser") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserAPIService.LogoutUser")
if err != nil { if err != nil {
return nil, &GenericOpenAPIError{error: err.Error()} return nil, &GenericOpenAPIError{error: err.Error()}
} }
@@ -821,7 +821,7 @@ func (a *UserApiService) LogoutUserExecute(r ApiLogoutUserRequest) (*http.Respon
type ApiUpdateUserRequest struct { type ApiUpdateUserRequest struct {
ctx context.Context ctx context.Context
ApiService UserApi ApiService UserAPI
username string username string
body *User body *User
} }
@@ -845,7 +845,7 @@ This can only be done by the logged in user.
@param username name that need to be deleted @param username name that need to be deleted
@return ApiUpdateUserRequest @return ApiUpdateUserRequest
*/ */
func (a *UserApiService) UpdateUser(ctx context.Context, username string) ApiUpdateUserRequest { func (a *UserAPIService) UpdateUser(ctx context.Context, username string) ApiUpdateUserRequest {
return ApiUpdateUserRequest{ return ApiUpdateUserRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -854,14 +854,14 @@ func (a *UserApiService) UpdateUser(ctx context.Context, username string) ApiUpd
} }
// Execute executes the request // Execute executes the request
func (a *UserApiService) UpdateUserExecute(r ApiUpdateUserRequest) (*http.Response, error) { func (a *UserAPIService) UpdateUserExecute(r ApiUpdateUserRequest) (*http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodPut localVarHTTPMethod = http.MethodPut
localVarPostBody interface{} localVarPostBody interface{}
formFiles []formFile formFiles []formFile
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.UpdateUser") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserAPIService.UpdateUser")
if err != nil { if err != nil {
return nil, &GenericOpenAPIError{error: err.Error()} return nil, &GenericOpenAPIError{error: err.Error()}
} }

View File

@@ -50,17 +50,17 @@ type APIClient struct {
// API Services // API Services
AnotherFakeApi AnotherFakeApi AnotherFakeAPI AnotherFakeAPI
FakeApi FakeApi FakeAPI FakeAPI
FakeClassnameTags123Api FakeClassnameTags123Api FakeClassnameTags123API FakeClassnameTags123API
PetApi PetApi PetAPI PetAPI
StoreApi StoreApi StoreAPI StoreAPI
UserApi UserApi UserAPI UserAPI
} }
type service struct { type service struct {
@@ -79,12 +79,12 @@ func NewAPIClient(cfg *Configuration) *APIClient {
c.common.client = c c.common.client = c
// API Services // API Services
c.AnotherFakeApi = (*AnotherFakeApiService)(&c.common) c.AnotherFakeAPI = (*AnotherFakeAPIService)(&c.common)
c.FakeApi = (*FakeApiService)(&c.common) c.FakeAPI = (*FakeAPIService)(&c.common)
c.FakeClassnameTags123Api = (*FakeClassnameTags123ApiService)(&c.common) c.FakeClassnameTags123API = (*FakeClassnameTags123APIService)(&c.common)
c.PetApi = (*PetApiService)(&c.common) c.PetAPI = (*PetAPIService)(&c.common)
c.StoreApi = (*StoreApiService)(&c.common) c.StoreAPI = (*StoreAPIService)(&c.common)
c.UserApi = (*UserApiService)(&c.common) c.UserAPI = (*UserAPIService)(&c.common)
return c return c
} }

View File

@@ -1,10 +1,10 @@
# \AnotherFakeApi # \AnotherFakeAPI
All URIs are relative to *http://petstore.swagger.io:80/v2* All URIs are relative to *http://petstore.swagger.io:80/v2*
Method | HTTP request | Description Method | HTTP request | Description
------------- | ------------- | ------------- ------------- | ------------- | -------------
[**Call123TestSpecialTags**](AnotherFakeApi.md#Call123TestSpecialTags) | **Patch** /another-fake/dummy | To test special tags [**Call123TestSpecialTags**](AnotherFakeAPI.md#Call123TestSpecialTags) | **Patch** /another-fake/dummy | To test special tags
@@ -33,13 +33,13 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AnotherFakeApi.Call123TestSpecialTags(context.Background()).Body(body).Execute() resp, r, err := apiClient.AnotherFakeAPI.Call123TestSpecialTags(context.Background()).Body(body).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AnotherFakeApi.Call123TestSpecialTags``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `AnotherFakeAPI.Call123TestSpecialTags``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
// response from `Call123TestSpecialTags`: Client // response from `Call123TestSpecialTags`: Client
fmt.Fprintf(os.Stdout, "Response from `AnotherFakeApi.Call123TestSpecialTags`: %v\n", resp) fmt.Fprintf(os.Stdout, "Response from `AnotherFakeAPI.Call123TestSpecialTags`: %v\n", resp)
} }
``` ```

View File

@@ -1,23 +1,23 @@
# \FakeApi # \FakeAPI
All URIs are relative to *http://petstore.swagger.io:80/v2* All URIs are relative to *http://petstore.swagger.io:80/v2*
Method | HTTP request | Description Method | HTTP request | Description
------------- | ------------- | ------------- ------------- | ------------- | -------------
[**CreateXmlItem**](FakeApi.md#CreateXmlItem) | **Post** /fake/create_xml_item | creates an XmlItem [**CreateXmlItem**](FakeAPI.md#CreateXmlItem) | **Post** /fake/create_xml_item | creates an XmlItem
[**FakeOuterBooleanSerialize**](FakeApi.md#FakeOuterBooleanSerialize) | **Post** /fake/outer/boolean | [**FakeOuterBooleanSerialize**](FakeAPI.md#FakeOuterBooleanSerialize) | **Post** /fake/outer/boolean |
[**FakeOuterCompositeSerialize**](FakeApi.md#FakeOuterCompositeSerialize) | **Post** /fake/outer/composite | [**FakeOuterCompositeSerialize**](FakeAPI.md#FakeOuterCompositeSerialize) | **Post** /fake/outer/composite |
[**FakeOuterNumberSerialize**](FakeApi.md#FakeOuterNumberSerialize) | **Post** /fake/outer/number | [**FakeOuterNumberSerialize**](FakeAPI.md#FakeOuterNumberSerialize) | **Post** /fake/outer/number |
[**FakeOuterStringSerialize**](FakeApi.md#FakeOuterStringSerialize) | **Post** /fake/outer/string | [**FakeOuterStringSerialize**](FakeAPI.md#FakeOuterStringSerialize) | **Post** /fake/outer/string |
[**TestBodyWithFileSchema**](FakeApi.md#TestBodyWithFileSchema) | **Put** /fake/body-with-file-schema | [**TestBodyWithFileSchema**](FakeAPI.md#TestBodyWithFileSchema) | **Put** /fake/body-with-file-schema |
[**TestBodyWithQueryParams**](FakeApi.md#TestBodyWithQueryParams) | **Put** /fake/body-with-query-params | [**TestBodyWithQueryParams**](FakeAPI.md#TestBodyWithQueryParams) | **Put** /fake/body-with-query-params |
[**TestClientModel**](FakeApi.md#TestClientModel) | **Patch** /fake | To test \&quot;client\&quot; model [**TestClientModel**](FakeAPI.md#TestClientModel) | **Patch** /fake | To test \&quot;client\&quot; model
[**TestEndpointParameters**](FakeApi.md#TestEndpointParameters) | **Post** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 [**TestEndpointParameters**](FakeAPI.md#TestEndpointParameters) | **Post** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
[**TestEnumParameters**](FakeApi.md#TestEnumParameters) | **Get** /fake | To test enum parameters [**TestEnumParameters**](FakeAPI.md#TestEnumParameters) | **Get** /fake | To test enum parameters
[**TestGroupParameters**](FakeApi.md#TestGroupParameters) | **Delete** /fake | Fake endpoint to test group parameters (optional) [**TestGroupParameters**](FakeAPI.md#TestGroupParameters) | **Delete** /fake | Fake endpoint to test group parameters (optional)
[**TestInlineAdditionalProperties**](FakeApi.md#TestInlineAdditionalProperties) | **Post** /fake/inline-additionalProperties | test inline additionalProperties [**TestInlineAdditionalProperties**](FakeAPI.md#TestInlineAdditionalProperties) | **Post** /fake/inline-additionalProperties | test inline additionalProperties
[**TestJsonFormData**](FakeApi.md#TestJsonFormData) | **Get** /fake/jsonFormData | test json serialization of form data [**TestJsonFormData**](FakeAPI.md#TestJsonFormData) | **Get** /fake/jsonFormData | test json serialization of form data
[**TestQueryParameterCollectionFormat**](FakeApi.md#TestQueryParameterCollectionFormat) | **Put** /fake/test-query-parameters | [**TestQueryParameterCollectionFormat**](FakeAPI.md#TestQueryParameterCollectionFormat) | **Put** /fake/test-query-parameters |
@@ -46,9 +46,9 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.FakeApi.CreateXmlItem(context.Background()).XmlItem(xmlItem).Execute() r, err := apiClient.FakeAPI.CreateXmlItem(context.Background()).XmlItem(xmlItem).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.CreateXmlItem``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `FakeAPI.CreateXmlItem``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
} }
@@ -110,13 +110,13 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FakeApi.FakeOuterBooleanSerialize(context.Background()).Body(body).Execute() resp, r, err := apiClient.FakeAPI.FakeOuterBooleanSerialize(context.Background()).Body(body).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.FakeOuterBooleanSerialize``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `FakeAPI.FakeOuterBooleanSerialize``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
// response from `FakeOuterBooleanSerialize`: bool // response from `FakeOuterBooleanSerialize`: bool
fmt.Fprintf(os.Stdout, "Response from `FakeApi.FakeOuterBooleanSerialize`: %v\n", resp) fmt.Fprintf(os.Stdout, "Response from `FakeAPI.FakeOuterBooleanSerialize`: %v\n", resp)
} }
``` ```
@@ -176,13 +176,13 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FakeApi.FakeOuterCompositeSerialize(context.Background()).Body(body).Execute() resp, r, err := apiClient.FakeAPI.FakeOuterCompositeSerialize(context.Background()).Body(body).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.FakeOuterCompositeSerialize``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `FakeAPI.FakeOuterCompositeSerialize``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
// response from `FakeOuterCompositeSerialize`: OuterComposite // response from `FakeOuterCompositeSerialize`: OuterComposite
fmt.Fprintf(os.Stdout, "Response from `FakeApi.FakeOuterCompositeSerialize`: %v\n", resp) fmt.Fprintf(os.Stdout, "Response from `FakeAPI.FakeOuterCompositeSerialize`: %v\n", resp)
} }
``` ```
@@ -242,13 +242,13 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FakeApi.FakeOuterNumberSerialize(context.Background()).Body(body).Execute() resp, r, err := apiClient.FakeAPI.FakeOuterNumberSerialize(context.Background()).Body(body).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.FakeOuterNumberSerialize``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `FakeAPI.FakeOuterNumberSerialize``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
// response from `FakeOuterNumberSerialize`: float32 // response from `FakeOuterNumberSerialize`: float32
fmt.Fprintf(os.Stdout, "Response from `FakeApi.FakeOuterNumberSerialize`: %v\n", resp) fmt.Fprintf(os.Stdout, "Response from `FakeAPI.FakeOuterNumberSerialize`: %v\n", resp)
} }
``` ```
@@ -308,13 +308,13 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FakeApi.FakeOuterStringSerialize(context.Background()).Body(body).Execute() resp, r, err := apiClient.FakeAPI.FakeOuterStringSerialize(context.Background()).Body(body).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.FakeOuterStringSerialize``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `FakeAPI.FakeOuterStringSerialize``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
// response from `FakeOuterStringSerialize`: string // response from `FakeOuterStringSerialize`: string
fmt.Fprintf(os.Stdout, "Response from `FakeApi.FakeOuterStringSerialize`: %v\n", resp) fmt.Fprintf(os.Stdout, "Response from `FakeAPI.FakeOuterStringSerialize`: %v\n", resp)
} }
``` ```
@@ -374,9 +374,9 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.FakeApi.TestBodyWithFileSchema(context.Background()).Body(body).Execute() r, err := apiClient.FakeAPI.TestBodyWithFileSchema(context.Background()).Body(body).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestBodyWithFileSchema``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `FakeAPI.TestBodyWithFileSchema``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
} }
@@ -437,9 +437,9 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.FakeApi.TestBodyWithQueryParams(context.Background()).Query(query).Body(body).Execute() r, err := apiClient.FakeAPI.TestBodyWithQueryParams(context.Background()).Query(query).Body(body).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestBodyWithQueryParams``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `FakeAPI.TestBodyWithQueryParams``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
} }
@@ -502,13 +502,13 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FakeApi.TestClientModel(context.Background()).Body(body).Execute() resp, r, err := apiClient.FakeAPI.TestClientModel(context.Background()).Body(body).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestClientModel``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `FakeAPI.TestClientModel``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
// response from `TestClientModel`: Client // response from `TestClientModel`: Client
fmt.Fprintf(os.Stdout, "Response from `FakeApi.TestClientModel`: %v\n", resp) fmt.Fprintf(os.Stdout, "Response from `FakeAPI.TestClientModel`: %v\n", resp)
} }
``` ```
@@ -582,9 +582,9 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.FakeApi.TestEndpointParameters(context.Background()).Number(number).Double(double).PatternWithoutDelimiter(patternWithoutDelimiter).Byte_(byte_).Integer(integer).Int32_(int32_).Int64_(int64_).Float(float).String_(string_).Binary(binary).Date(date).DateTime(dateTime).Password(password).Callback(callback).Execute() r, err := apiClient.FakeAPI.TestEndpointParameters(context.Background()).Number(number).Double(double).PatternWithoutDelimiter(patternWithoutDelimiter).Byte_(byte_).Integer(integer).Int32_(int32_).Int64_(int64_).Float(float).String_(string_).Binary(binary).Date(date).DateTime(dateTime).Password(password).Callback(callback).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestEndpointParameters``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `FakeAPI.TestEndpointParameters``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
} }
@@ -666,9 +666,9 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.FakeApi.TestEnumParameters(context.Background()).EnumHeaderStringArray(enumHeaderStringArray).EnumHeaderString(enumHeaderString).EnumQueryStringArray(enumQueryStringArray).EnumQueryString(enumQueryString).EnumQueryInteger(enumQueryInteger).EnumQueryDouble(enumQueryDouble).EnumFormStringArray(enumFormStringArray).EnumFormString(enumFormString).Execute() r, err := apiClient.FakeAPI.TestEnumParameters(context.Background()).EnumHeaderStringArray(enumHeaderStringArray).EnumHeaderString(enumHeaderString).EnumQueryStringArray(enumQueryStringArray).EnumQueryString(enumQueryString).EnumQueryInteger(enumQueryInteger).EnumQueryDouble(enumQueryDouble).EnumFormStringArray(enumFormStringArray).EnumFormString(enumFormString).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestEnumParameters``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `FakeAPI.TestEnumParameters``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
} }
@@ -742,9 +742,9 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.FakeApi.TestGroupParameters(context.Background()).RequiredStringGroup(requiredStringGroup).RequiredBooleanGroup(requiredBooleanGroup).RequiredInt64Group(requiredInt64Group).StringGroup(stringGroup).BooleanGroup(booleanGroup).Int64Group(int64Group).Execute() r, err := apiClient.FakeAPI.TestGroupParameters(context.Background()).RequiredStringGroup(requiredStringGroup).RequiredBooleanGroup(requiredBooleanGroup).RequiredInt64Group(requiredInt64Group).StringGroup(stringGroup).BooleanGroup(booleanGroup).Int64Group(int64Group).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestGroupParameters``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `FakeAPI.TestGroupParameters``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
} }
@@ -809,9 +809,9 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.FakeApi.TestInlineAdditionalProperties(context.Background()).Param(param).Execute() r, err := apiClient.FakeAPI.TestInlineAdditionalProperties(context.Background()).Param(param).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestInlineAdditionalProperties``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `FakeAPI.TestInlineAdditionalProperties``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
} }
@@ -872,9 +872,9 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.FakeApi.TestJsonFormData(context.Background()).Param(param).Param2(param2).Execute() r, err := apiClient.FakeAPI.TestJsonFormData(context.Background()).Param(param).Param2(param2).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestJsonFormData``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `FakeAPI.TestJsonFormData``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
} }
@@ -941,9 +941,9 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.FakeApi.TestQueryParameterCollectionFormat(context.Background()).Pipe(pipe).Ioutil(ioutil).Http(http).Url(url).Context(context).Execute() r, err := apiClient.FakeAPI.TestQueryParameterCollectionFormat(context.Background()).Pipe(pipe).Ioutil(ioutil).Http(http).Url(url).Context(context).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestQueryParameterCollectionFormat``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `FakeAPI.TestQueryParameterCollectionFormat``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
} }

View File

@@ -1,10 +1,10 @@
# \FakeClassnameTags123Api # \FakeClassnameTags123API
All URIs are relative to *http://petstore.swagger.io:80/v2* All URIs are relative to *http://petstore.swagger.io:80/v2*
Method | HTTP request | Description Method | HTTP request | Description
------------- | ------------- | ------------- ------------- | ------------- | -------------
[**TestClassname**](FakeClassnameTags123Api.md#TestClassname) | **Patch** /fake_classname_test | To test class name in snake case [**TestClassname**](FakeClassnameTags123API.md#TestClassname) | **Patch** /fake_classname_test | To test class name in snake case
@@ -33,13 +33,13 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FakeClassnameTags123Api.TestClassname(context.Background()).Body(body).Execute() resp, r, err := apiClient.FakeClassnameTags123API.TestClassname(context.Background()).Body(body).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FakeClassnameTags123Api.TestClassname``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `FakeClassnameTags123API.TestClassname``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
// response from `TestClassname`: Client // response from `TestClassname`: Client
fmt.Fprintf(os.Stdout, "Response from `FakeClassnameTags123Api.TestClassname`: %v\n", resp) fmt.Fprintf(os.Stdout, "Response from `FakeClassnameTags123API.TestClassname`: %v\n", resp)
} }
``` ```

View File

@@ -1,18 +1,18 @@
# \PetApi # \PetAPI
All URIs are relative to *http://petstore.swagger.io:80/v2* All URIs are relative to *http://petstore.swagger.io:80/v2*
Method | HTTP request | Description Method | HTTP request | Description
------------- | ------------- | ------------- ------------- | ------------- | -------------
[**AddPet**](PetApi.md#AddPet) | **Post** /pet | Add a new pet to the store [**AddPet**](PetAPI.md#AddPet) | **Post** /pet | Add a new pet to the store
[**DeletePet**](PetApi.md#DeletePet) | **Delete** /pet/{petId} | Deletes a pet [**DeletePet**](PetAPI.md#DeletePet) | **Delete** /pet/{petId} | Deletes a pet
[**FindPetsByStatus**](PetApi.md#FindPetsByStatus) | **Get** /pet/findByStatus | Finds Pets by status [**FindPetsByStatus**](PetAPI.md#FindPetsByStatus) | **Get** /pet/findByStatus | Finds Pets by status
[**FindPetsByTags**](PetApi.md#FindPetsByTags) | **Get** /pet/findByTags | Finds Pets by tags [**FindPetsByTags**](PetAPI.md#FindPetsByTags) | **Get** /pet/findByTags | Finds Pets by tags
[**GetPetById**](PetApi.md#GetPetById) | **Get** /pet/{petId} | Find pet by ID [**GetPetById**](PetAPI.md#GetPetById) | **Get** /pet/{petId} | Find pet by ID
[**UpdatePet**](PetApi.md#UpdatePet) | **Put** /pet | Update an existing pet [**UpdatePet**](PetAPI.md#UpdatePet) | **Put** /pet | Update an existing pet
[**UpdatePetWithForm**](PetApi.md#UpdatePetWithForm) | **Post** /pet/{petId} | Updates a pet in the store with form data [**UpdatePetWithForm**](PetAPI.md#UpdatePetWithForm) | **Post** /pet/{petId} | Updates a pet in the store with form data
[**UploadFile**](PetApi.md#UploadFile) | **Post** /pet/{petId}/uploadImage | uploads an image [**UploadFile**](PetAPI.md#UploadFile) | **Post** /pet/{petId}/uploadImage | uploads an image
[**UploadFileWithRequiredFile**](PetApi.md#UploadFileWithRequiredFile) | **Post** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) [**UploadFileWithRequiredFile**](PetAPI.md#UploadFileWithRequiredFile) | **Post** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
@@ -39,9 +39,9 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.PetApi.AddPet(context.Background()).Body(body).Execute() r, err := apiClient.PetAPI.AddPet(context.Background()).Body(body).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PetApi.AddPet``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `PetAPI.AddPet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
} }
@@ -102,9 +102,9 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.PetApi.DeletePet(context.Background(), petId).ApiKey(apiKey).Execute() r, err := apiClient.PetAPI.DeletePet(context.Background(), petId).ApiKey(apiKey).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PetApi.DeletePet``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `PetAPI.DeletePet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
} }
@@ -171,13 +171,13 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PetApi.FindPetsByStatus(context.Background()).Status(status).Execute() resp, r, err := apiClient.PetAPI.FindPetsByStatus(context.Background()).Status(status).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PetApi.FindPetsByStatus``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `PetAPI.FindPetsByStatus``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
// response from `FindPetsByStatus`: []Pet // response from `FindPetsByStatus`: []Pet
fmt.Fprintf(os.Stdout, "Response from `PetApi.FindPetsByStatus`: %v\n", resp) fmt.Fprintf(os.Stdout, "Response from `PetAPI.FindPetsByStatus`: %v\n", resp)
} }
``` ```
@@ -237,13 +237,13 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PetApi.FindPetsByTags(context.Background()).Tags(tags).Execute() resp, r, err := apiClient.PetAPI.FindPetsByTags(context.Background()).Tags(tags).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PetApi.FindPetsByTags``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `PetAPI.FindPetsByTags``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
// response from `FindPetsByTags`: []Pet // response from `FindPetsByTags`: []Pet
fmt.Fprintf(os.Stdout, "Response from `PetApi.FindPetsByTags`: %v\n", resp) fmt.Fprintf(os.Stdout, "Response from `PetAPI.FindPetsByTags`: %v\n", resp)
} }
``` ```
@@ -303,13 +303,13 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PetApi.GetPetById(context.Background(), petId).Execute() resp, r, err := apiClient.PetAPI.GetPetById(context.Background(), petId).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PetApi.GetPetById``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `PetAPI.GetPetById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
// response from `GetPetById`: Pet // response from `GetPetById`: Pet
fmt.Fprintf(os.Stdout, "Response from `PetApi.GetPetById`: %v\n", resp) fmt.Fprintf(os.Stdout, "Response from `PetAPI.GetPetById`: %v\n", resp)
} }
``` ```
@@ -371,9 +371,9 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.PetApi.UpdatePet(context.Background()).Body(body).Execute() r, err := apiClient.PetAPI.UpdatePet(context.Background()).Body(body).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PetApi.UpdatePet``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `PetAPI.UpdatePet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
} }
@@ -435,9 +435,9 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.PetApi.UpdatePetWithForm(context.Background(), petId).Name(name).Status(status).Execute() r, err := apiClient.PetAPI.UpdatePetWithForm(context.Background(), petId).Name(name).Status(status).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PetApi.UpdatePetWithForm``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `PetAPI.UpdatePetWithForm``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
} }
@@ -505,13 +505,13 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PetApi.UploadFile(context.Background(), petId).AdditionalMetadata(additionalMetadata).File(file).Execute() resp, r, err := apiClient.PetAPI.UploadFile(context.Background(), petId).AdditionalMetadata(additionalMetadata).File(file).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PetApi.UploadFile``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `PetAPI.UploadFile``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
// response from `UploadFile`: ApiResponse // response from `UploadFile`: ApiResponse
fmt.Fprintf(os.Stdout, "Response from `PetApi.UploadFile`: %v\n", resp) fmt.Fprintf(os.Stdout, "Response from `PetAPI.UploadFile`: %v\n", resp)
} }
``` ```
@@ -577,13 +577,13 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PetApi.UploadFileWithRequiredFile(context.Background(), petId).RequiredFile(requiredFile).AdditionalMetadata(additionalMetadata).Execute() resp, r, err := apiClient.PetAPI.UploadFileWithRequiredFile(context.Background(), petId).RequiredFile(requiredFile).AdditionalMetadata(additionalMetadata).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PetApi.UploadFileWithRequiredFile``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `PetAPI.UploadFileWithRequiredFile``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
// response from `UploadFileWithRequiredFile`: ApiResponse // response from `UploadFileWithRequiredFile`: ApiResponse
fmt.Fprintf(os.Stdout, "Response from `PetApi.UploadFileWithRequiredFile`: %v\n", resp) fmt.Fprintf(os.Stdout, "Response from `PetAPI.UploadFileWithRequiredFile`: %v\n", resp)
} }
``` ```

View File

@@ -1,13 +1,13 @@
# \StoreApi # \StoreAPI
All URIs are relative to *http://petstore.swagger.io:80/v2* All URIs are relative to *http://petstore.swagger.io:80/v2*
Method | HTTP request | Description Method | HTTP request | Description
------------- | ------------- | ------------- ------------- | ------------- | -------------
[**DeleteOrder**](StoreApi.md#DeleteOrder) | **Delete** /store/order/{order_id} | Delete purchase order by ID [**DeleteOrder**](StoreAPI.md#DeleteOrder) | **Delete** /store/order/{order_id} | Delete purchase order by ID
[**GetInventory**](StoreApi.md#GetInventory) | **Get** /store/inventory | Returns pet inventories by status [**GetInventory**](StoreAPI.md#GetInventory) | **Get** /store/inventory | Returns pet inventories by status
[**GetOrderById**](StoreApi.md#GetOrderById) | **Get** /store/order/{order_id} | Find purchase order by ID [**GetOrderById**](StoreAPI.md#GetOrderById) | **Get** /store/order/{order_id} | Find purchase order by ID
[**PlaceOrder**](StoreApi.md#PlaceOrder) | **Post** /store/order | Place an order for a pet [**PlaceOrder**](StoreAPI.md#PlaceOrder) | **Post** /store/order | Place an order for a pet
@@ -36,9 +36,9 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.StoreApi.DeleteOrder(context.Background(), orderId).Execute() r, err := apiClient.StoreAPI.DeleteOrder(context.Background(), orderId).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `StoreApi.DeleteOrder``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `StoreAPI.DeleteOrder``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
} }
@@ -103,13 +103,13 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.StoreApi.GetInventory(context.Background()).Execute() resp, r, err := apiClient.StoreAPI.GetInventory(context.Background()).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `StoreApi.GetInventory``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `StoreAPI.GetInventory``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
// response from `GetInventory`: map[string]int32 // response from `GetInventory`: map[string]int32
fmt.Fprintf(os.Stdout, "Response from `StoreApi.GetInventory`: %v\n", resp) fmt.Fprintf(os.Stdout, "Response from `StoreAPI.GetInventory`: %v\n", resp)
} }
``` ```
@@ -165,13 +165,13 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.StoreApi.GetOrderById(context.Background(), orderId).Execute() resp, r, err := apiClient.StoreAPI.GetOrderById(context.Background(), orderId).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `StoreApi.GetOrderById``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `StoreAPI.GetOrderById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
// response from `GetOrderById`: Order // response from `GetOrderById`: Order
fmt.Fprintf(os.Stdout, "Response from `StoreApi.GetOrderById`: %v\n", resp) fmt.Fprintf(os.Stdout, "Response from `StoreAPI.GetOrderById`: %v\n", resp)
} }
``` ```
@@ -233,13 +233,13 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.StoreApi.PlaceOrder(context.Background()).Body(body).Execute() resp, r, err := apiClient.StoreAPI.PlaceOrder(context.Background()).Body(body).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `StoreApi.PlaceOrder``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `StoreAPI.PlaceOrder``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
// response from `PlaceOrder`: Order // response from `PlaceOrder`: Order
fmt.Fprintf(os.Stdout, "Response from `StoreApi.PlaceOrder`: %v\n", resp) fmt.Fprintf(os.Stdout, "Response from `StoreAPI.PlaceOrder`: %v\n", resp)
} }
``` ```

View File

@@ -1,17 +1,17 @@
# \UserApi # \UserAPI
All URIs are relative to *http://petstore.swagger.io:80/v2* All URIs are relative to *http://petstore.swagger.io:80/v2*
Method | HTTP request | Description Method | HTTP request | Description
------------- | ------------- | ------------- ------------- | ------------- | -------------
[**CreateUser**](UserApi.md#CreateUser) | **Post** /user | Create user [**CreateUser**](UserAPI.md#CreateUser) | **Post** /user | Create user
[**CreateUsersWithArrayInput**](UserApi.md#CreateUsersWithArrayInput) | **Post** /user/createWithArray | Creates list of users with given input array [**CreateUsersWithArrayInput**](UserAPI.md#CreateUsersWithArrayInput) | **Post** /user/createWithArray | Creates list of users with given input array
[**CreateUsersWithListInput**](UserApi.md#CreateUsersWithListInput) | **Post** /user/createWithList | Creates list of users with given input array [**CreateUsersWithListInput**](UserAPI.md#CreateUsersWithListInput) | **Post** /user/createWithList | Creates list of users with given input array
[**DeleteUser**](UserApi.md#DeleteUser) | **Delete** /user/{username} | Delete user [**DeleteUser**](UserAPI.md#DeleteUser) | **Delete** /user/{username} | Delete user
[**GetUserByName**](UserApi.md#GetUserByName) | **Get** /user/{username} | Get user by user name [**GetUserByName**](UserAPI.md#GetUserByName) | **Get** /user/{username} | Get user by user name
[**LoginUser**](UserApi.md#LoginUser) | **Get** /user/login | Logs user into the system [**LoginUser**](UserAPI.md#LoginUser) | **Get** /user/login | Logs user into the system
[**LogoutUser**](UserApi.md#LogoutUser) | **Get** /user/logout | Logs out current logged in user session [**LogoutUser**](UserAPI.md#LogoutUser) | **Get** /user/logout | Logs out current logged in user session
[**UpdateUser**](UserApi.md#UpdateUser) | **Put** /user/{username} | Updated user [**UpdateUser**](UserAPI.md#UpdateUser) | **Put** /user/{username} | Updated user
@@ -40,9 +40,9 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.UserApi.CreateUser(context.Background()).Body(body).Execute() r, err := apiClient.UserAPI.CreateUser(context.Background()).Body(body).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserApi.CreateUser``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `UserAPI.CreateUser``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
} }
@@ -102,9 +102,9 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.UserApi.CreateUsersWithArrayInput(context.Background()).Body(body).Execute() r, err := apiClient.UserAPI.CreateUsersWithArrayInput(context.Background()).Body(body).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserApi.CreateUsersWithArrayInput``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `UserAPI.CreateUsersWithArrayInput``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
} }
@@ -164,9 +164,9 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.UserApi.CreateUsersWithListInput(context.Background()).Body(body).Execute() r, err := apiClient.UserAPI.CreateUsersWithListInput(context.Background()).Body(body).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserApi.CreateUsersWithListInput``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `UserAPI.CreateUsersWithListInput``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
} }
@@ -228,9 +228,9 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.UserApi.DeleteUser(context.Background(), username).Execute() r, err := apiClient.UserAPI.DeleteUser(context.Background(), username).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserApi.DeleteUser``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `UserAPI.DeleteUser``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
} }
@@ -294,13 +294,13 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.UserApi.GetUserByName(context.Background(), username).Execute() resp, r, err := apiClient.UserAPI.GetUserByName(context.Background(), username).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserApi.GetUserByName``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `UserAPI.GetUserByName``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
// response from `GetUserByName`: User // response from `GetUserByName`: User
fmt.Fprintf(os.Stdout, "Response from `UserApi.GetUserByName`: %v\n", resp) fmt.Fprintf(os.Stdout, "Response from `UserAPI.GetUserByName`: %v\n", resp)
} }
``` ```
@@ -363,13 +363,13 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.UserApi.LoginUser(context.Background()).Username(username).Password(password).Execute() resp, r, err := apiClient.UserAPI.LoginUser(context.Background()).Username(username).Password(password).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserApi.LoginUser``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `UserAPI.LoginUser``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
// response from `LoginUser`: string // response from `LoginUser`: string
fmt.Fprintf(os.Stdout, "Response from `UserApi.LoginUser`: %v\n", resp) fmt.Fprintf(os.Stdout, "Response from `UserAPI.LoginUser`: %v\n", resp)
} }
``` ```
@@ -427,9 +427,9 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.UserApi.LogoutUser(context.Background()).Execute() r, err := apiClient.UserAPI.LogoutUser(context.Background()).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserApi.LogoutUser``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `UserAPI.LogoutUser``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
} }
@@ -488,9 +488,9 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.UserApi.UpdateUser(context.Background(), username).Body(body).Execute() r, err := apiClient.UserAPI.UpdateUser(context.Background(), username).Body(body).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserApi.UpdateUser``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `UserAPI.UpdateUser``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
} }

View File

@@ -5,7 +5,7 @@ api/openapi.yaml
api_usage.go api_usage.go
client.go client.go
configuration.go configuration.go
docs/UsageApi.md docs/UsageAPI.md
git_push.sh git_push.sh
go.mod go.mod
go.sum go.sum

View File

@@ -77,10 +77,10 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
Class | Method | HTTP request | Description Class | Method | HTTP request | Description
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
*UsageApi* | [**AnyKey**](docs/UsageApi.md#anykey) | **Get** /any | Use any API key *UsageAPI* | [**AnyKey**](docs/UsageAPI.md#anykey) | **Get** /any | Use any API key
*UsageApi* | [**BothKeys**](docs/UsageApi.md#bothkeys) | **Get** /both | Use both API keys *UsageAPI* | [**BothKeys**](docs/UsageAPI.md#bothkeys) | **Get** /both | Use both API keys
*UsageApi* | [**KeyInHeader**](docs/UsageApi.md#keyinheader) | **Get** /header | Use API key in header *UsageAPI* | [**KeyInHeader**](docs/UsageAPI.md#keyinheader) | **Get** /header | Use API key in header
*UsageApi* | [**KeyInQuery**](docs/UsageApi.md#keyinquery) | **Get** /query | Use API key in query *UsageAPI* | [**KeyInQuery**](docs/UsageAPI.md#keyinquery) | **Get** /query | Use API key in query
## Documentation For Models ## Documentation For Models

View File

@@ -19,12 +19,12 @@ import (
) )
// UsageApiService UsageApi service // UsageAPIService UsageAPI service
type UsageApiService service type UsageAPIService service
type ApiAnyKeyRequest struct { type ApiAnyKeyRequest struct {
ctx context.Context ctx context.Context
ApiService *UsageApiService ApiService *UsageAPIService
} }
func (r ApiAnyKeyRequest) Execute() (map[string]interface{}, *http.Response, error) { func (r ApiAnyKeyRequest) Execute() (map[string]interface{}, *http.Response, error) {
@@ -39,7 +39,7 @@ Use any API key
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiAnyKeyRequest @return ApiAnyKeyRequest
*/ */
func (a *UsageApiService) AnyKey(ctx context.Context) ApiAnyKeyRequest { func (a *UsageAPIService) AnyKey(ctx context.Context) ApiAnyKeyRequest {
return ApiAnyKeyRequest{ return ApiAnyKeyRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -48,7 +48,7 @@ func (a *UsageApiService) AnyKey(ctx context.Context) ApiAnyKeyRequest {
// Execute executes the request // Execute executes the request
// @return map[string]interface{} // @return map[string]interface{}
func (a *UsageApiService) AnyKeyExecute(r ApiAnyKeyRequest) (map[string]interface{}, *http.Response, error) { func (a *UsageAPIService) AnyKeyExecute(r ApiAnyKeyRequest) (map[string]interface{}, *http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodGet localVarHTTPMethod = http.MethodGet
localVarPostBody interface{} localVarPostBody interface{}
@@ -56,7 +56,7 @@ func (a *UsageApiService) AnyKeyExecute(r ApiAnyKeyRequest) (map[string]interfac
localVarReturnValue map[string]interface{} localVarReturnValue map[string]interface{}
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsageApiService.AnyKey") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsageAPIService.AnyKey")
if err != nil { if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
} }
@@ -151,7 +151,7 @@ func (a *UsageApiService) AnyKeyExecute(r ApiAnyKeyRequest) (map[string]interfac
type ApiBothKeysRequest struct { type ApiBothKeysRequest struct {
ctx context.Context ctx context.Context
ApiService *UsageApiService ApiService *UsageAPIService
} }
func (r ApiBothKeysRequest) Execute() (map[string]interface{}, *http.Response, error) { func (r ApiBothKeysRequest) Execute() (map[string]interface{}, *http.Response, error) {
@@ -166,7 +166,7 @@ Use both API keys
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiBothKeysRequest @return ApiBothKeysRequest
*/ */
func (a *UsageApiService) BothKeys(ctx context.Context) ApiBothKeysRequest { func (a *UsageAPIService) BothKeys(ctx context.Context) ApiBothKeysRequest {
return ApiBothKeysRequest{ return ApiBothKeysRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -175,7 +175,7 @@ func (a *UsageApiService) BothKeys(ctx context.Context) ApiBothKeysRequest {
// Execute executes the request // Execute executes the request
// @return map[string]interface{} // @return map[string]interface{}
func (a *UsageApiService) BothKeysExecute(r ApiBothKeysRequest) (map[string]interface{}, *http.Response, error) { func (a *UsageAPIService) BothKeysExecute(r ApiBothKeysRequest) (map[string]interface{}, *http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodGet localVarHTTPMethod = http.MethodGet
localVarPostBody interface{} localVarPostBody interface{}
@@ -183,7 +183,7 @@ func (a *UsageApiService) BothKeysExecute(r ApiBothKeysRequest) (map[string]inte
localVarReturnValue map[string]interface{} localVarReturnValue map[string]interface{}
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsageApiService.BothKeys") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsageAPIService.BothKeys")
if err != nil { if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
} }
@@ -278,7 +278,7 @@ func (a *UsageApiService) BothKeysExecute(r ApiBothKeysRequest) (map[string]inte
type ApiKeyInHeaderRequest struct { type ApiKeyInHeaderRequest struct {
ctx context.Context ctx context.Context
ApiService *UsageApiService ApiService *UsageAPIService
} }
func (r ApiKeyInHeaderRequest) Execute() (map[string]interface{}, *http.Response, error) { func (r ApiKeyInHeaderRequest) Execute() (map[string]interface{}, *http.Response, error) {
@@ -293,7 +293,7 @@ Use API key in header
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiKeyInHeaderRequest @return ApiKeyInHeaderRequest
*/ */
func (a *UsageApiService) KeyInHeader(ctx context.Context) ApiKeyInHeaderRequest { func (a *UsageAPIService) KeyInHeader(ctx context.Context) ApiKeyInHeaderRequest {
return ApiKeyInHeaderRequest{ return ApiKeyInHeaderRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -302,7 +302,7 @@ func (a *UsageApiService) KeyInHeader(ctx context.Context) ApiKeyInHeaderRequest
// Execute executes the request // Execute executes the request
// @return map[string]interface{} // @return map[string]interface{}
func (a *UsageApiService) KeyInHeaderExecute(r ApiKeyInHeaderRequest) (map[string]interface{}, *http.Response, error) { func (a *UsageAPIService) KeyInHeaderExecute(r ApiKeyInHeaderRequest) (map[string]interface{}, *http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodGet localVarHTTPMethod = http.MethodGet
localVarPostBody interface{} localVarPostBody interface{}
@@ -310,7 +310,7 @@ func (a *UsageApiService) KeyInHeaderExecute(r ApiKeyInHeaderRequest) (map[strin
localVarReturnValue map[string]interface{} localVarReturnValue map[string]interface{}
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsageApiService.KeyInHeader") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsageAPIService.KeyInHeader")
if err != nil { if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
} }
@@ -391,7 +391,7 @@ func (a *UsageApiService) KeyInHeaderExecute(r ApiKeyInHeaderRequest) (map[strin
type ApiKeyInQueryRequest struct { type ApiKeyInQueryRequest struct {
ctx context.Context ctx context.Context
ApiService *UsageApiService ApiService *UsageAPIService
} }
func (r ApiKeyInQueryRequest) Execute() (map[string]interface{}, *http.Response, error) { func (r ApiKeyInQueryRequest) Execute() (map[string]interface{}, *http.Response, error) {
@@ -406,7 +406,7 @@ Use API key in query
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiKeyInQueryRequest @return ApiKeyInQueryRequest
*/ */
func (a *UsageApiService) KeyInQuery(ctx context.Context) ApiKeyInQueryRequest { func (a *UsageAPIService) KeyInQuery(ctx context.Context) ApiKeyInQueryRequest {
return ApiKeyInQueryRequest{ return ApiKeyInQueryRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -415,7 +415,7 @@ func (a *UsageApiService) KeyInQuery(ctx context.Context) ApiKeyInQueryRequest {
// Execute executes the request // Execute executes the request
// @return map[string]interface{} // @return map[string]interface{}
func (a *UsageApiService) KeyInQueryExecute(r ApiKeyInQueryRequest) (map[string]interface{}, *http.Response, error) { func (a *UsageAPIService) KeyInQueryExecute(r ApiKeyInQueryRequest) (map[string]interface{}, *http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodGet localVarHTTPMethod = http.MethodGet
localVarPostBody interface{} localVarPostBody interface{}
@@ -423,7 +423,7 @@ func (a *UsageApiService) KeyInQueryExecute(r ApiKeyInQueryRequest) (map[string]
localVarReturnValue map[string]interface{} localVarReturnValue map[string]interface{}
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsageApiService.KeyInQuery") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsageAPIService.KeyInQuery")
if err != nil { if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
} }

View File

@@ -49,7 +49,7 @@ type APIClient struct {
// API Services // API Services
UsageApi *UsageApiService UsageAPI *UsageAPIService
} }
type service struct { type service struct {
@@ -68,7 +68,7 @@ func NewAPIClient(cfg *Configuration) *APIClient {
c.common.client = c c.common.client = c
// API Services // API Services
c.UsageApi = (*UsageApiService)(&c.common) c.UsageAPI = (*UsageAPIService)(&c.common)
return c return c
} }

View File

@@ -1,13 +1,13 @@
# \UsageApi # \UsageAPI
All URIs are relative to *http://petstore.swagger.io:80/v2* All URIs are relative to *http://petstore.swagger.io:80/v2*
Method | HTTP request | Description Method | HTTP request | Description
------------- | ------------- | ------------- ------------- | ------------- | -------------
[**AnyKey**](UsageApi.md#AnyKey) | **Get** /any | Use any API key [**AnyKey**](UsageAPI.md#AnyKey) | **Get** /any | Use any API key
[**BothKeys**](UsageApi.md#BothKeys) | **Get** /both | Use both API keys [**BothKeys**](UsageAPI.md#BothKeys) | **Get** /both | Use both API keys
[**KeyInHeader**](UsageApi.md#KeyInHeader) | **Get** /header | Use API key in header [**KeyInHeader**](UsageAPI.md#KeyInHeader) | **Get** /header | Use API key in header
[**KeyInQuery**](UsageApi.md#KeyInQuery) | **Get** /query | Use API key in query [**KeyInQuery**](UsageAPI.md#KeyInQuery) | **Get** /query | Use API key in query
@@ -35,13 +35,13 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.UsageApi.AnyKey(context.Background()).Execute() resp, r, err := apiClient.UsageAPI.AnyKey(context.Background()).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UsageApi.AnyKey``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `UsageAPI.AnyKey``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
// response from `AnyKey`: map[string]interface{} // response from `AnyKey`: map[string]interface{}
fmt.Fprintf(os.Stdout, "Response from `UsageApi.AnyKey`: %v\n", resp) fmt.Fprintf(os.Stdout, "Response from `UsageAPI.AnyKey`: %v\n", resp)
} }
``` ```
@@ -96,13 +96,13 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.UsageApi.BothKeys(context.Background()).Execute() resp, r, err := apiClient.UsageAPI.BothKeys(context.Background()).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UsageApi.BothKeys``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `UsageAPI.BothKeys``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
// response from `BothKeys`: map[string]interface{} // response from `BothKeys`: map[string]interface{}
fmt.Fprintf(os.Stdout, "Response from `UsageApi.BothKeys`: %v\n", resp) fmt.Fprintf(os.Stdout, "Response from `UsageAPI.BothKeys`: %v\n", resp)
} }
``` ```
@@ -157,13 +157,13 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.UsageApi.KeyInHeader(context.Background()).Execute() resp, r, err := apiClient.UsageAPI.KeyInHeader(context.Background()).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UsageApi.KeyInHeader``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `UsageAPI.KeyInHeader``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
// response from `KeyInHeader`: map[string]interface{} // response from `KeyInHeader`: map[string]interface{}
fmt.Fprintf(os.Stdout, "Response from `UsageApi.KeyInHeader`: %v\n", resp) fmt.Fprintf(os.Stdout, "Response from `UsageAPI.KeyInHeader`: %v\n", resp)
} }
``` ```
@@ -218,13 +218,13 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.UsageApi.KeyInQuery(context.Background()).Execute() resp, r, err := apiClient.UsageAPI.KeyInQuery(context.Background()).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UsageApi.KeyInQuery``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `UsageAPI.KeyInQuery``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
// response from `KeyInQuery`: map[string]interface{} // response from `KeyInQuery`: map[string]interface{}
fmt.Fprintf(os.Stdout, "Response from `UsageApi.KeyInQuery`: %v\n", resp) fmt.Fprintf(os.Stdout, "Response from `UsageAPI.KeyInQuery`: %v\n", resp)
} }
``` ```

View File

@@ -41,7 +41,7 @@ func TestOAuth2(t *testing.T) {
PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"),
Tags: []sw.Tag{{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) Tags: []sw.Tag{{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}})
r, err := client.PetApi.AddPet(context.Background()).Pet(newPet).Execute() r, err := client.PetAPI.AddPet(context.Background()).Pet(newPet).Execute()
if err != nil { if err != nil {
t.Fatalf("Error while adding pet: %v", err) t.Fatalf("Error while adding pet: %v", err)
@@ -50,7 +50,7 @@ func TestOAuth2(t *testing.T) {
t.Log(r) t.Log(r)
} }
r, err = client.PetApi.DeletePet(auth, 12992).Execute() r, err = client.PetAPI.DeletePet(auth, 12992).Execute()
if err != nil { if err != nil {
t.Fatalf("Error while deleting pet by id: %v", err) t.Fatalf("Error while deleting pet by id: %v", err)
@@ -76,7 +76,7 @@ func TestBasicAuth(t *testing.T) {
PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"),
Tags: []sw.Tag{{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) Tags: []sw.Tag{{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}})
r, err := client.PetApi.AddPet(auth).Pet(newPet).Execute() r, err := client.PetAPI.AddPet(auth).Pet(newPet).Execute()
if err != nil { if err != nil {
t.Fatalf("Error while adding pet: %v", err) t.Fatalf("Error while adding pet: %v", err)
@@ -85,7 +85,7 @@ func TestBasicAuth(t *testing.T) {
t.Log(r) t.Log(r)
} }
r, err = client.PetApi.DeletePet(auth, 12992).Execute() r, err = client.PetAPI.DeletePet(auth, 12992).Execute()
if err != nil { if err != nil {
t.Fatalf("Error while deleting pet by id: %v", err) t.Fatalf("Error while deleting pet by id: %v", err)
@@ -106,7 +106,7 @@ func TestAccessToken(t *testing.T) {
PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"),
Tags: []sw.Tag{{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) Tags: []sw.Tag{{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}})
r, err := client.PetApi.AddPet(nil).Pet(newPet).Execute() r, err := client.PetAPI.AddPet(nil).Pet(newPet).Execute()
if err != nil { if err != nil {
t.Fatalf("Error while adding pet: %v", err) t.Fatalf("Error while adding pet: %v", err)
@@ -115,7 +115,7 @@ func TestAccessToken(t *testing.T) {
t.Log(r) t.Log(r)
} }
r, err = client.PetApi.DeletePet(auth, 12992).Execute() r, err = client.PetAPI.DeletePet(auth, 12992).Execute()
if err != nil { if err != nil {
t.Fatalf("Error while deleting pet by id: %v", err) t.Fatalf("Error while deleting pet by id: %v", err)
@@ -136,7 +136,7 @@ func TestAPIKeyNoPrefix(t *testing.T) {
PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"),
Tags: []sw.Tag{{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) Tags: []sw.Tag{{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}})
r, err := client.PetApi.AddPet(context.Background()).Pet(newPet).Execute() r, err := client.PetAPI.AddPet(context.Background()).Pet(newPet).Execute()
if err != nil { if err != nil {
t.Fatalf("Error while adding pet: %v", err) t.Fatalf("Error while adding pet: %v", err)
@@ -145,7 +145,7 @@ func TestAPIKeyNoPrefix(t *testing.T) {
t.Log(r) t.Log(r)
} }
_, r, err = client.PetApi.GetPetById(auth, 12992).Execute() _, r, err = client.PetAPI.GetPetById(auth, 12992).Execute()
if err != nil { if err != nil {
t.Fatalf("Error while deleting pet by id: %v", err) t.Fatalf("Error while deleting pet by id: %v", err)
} }
@@ -155,7 +155,7 @@ func TestAPIKeyNoPrefix(t *testing.T) {
t.Errorf("APIKey Authentication is missing") t.Errorf("APIKey Authentication is missing")
} }
r, err = client.PetApi.DeletePet(auth, 12992).Execute() r, err = client.PetAPI.DeletePet(auth, 12992).Execute()
if err != nil { if err != nil {
t.Fatalf("Error while deleting pet by id: %v", err) t.Fatalf("Error while deleting pet by id: %v", err)
} }
@@ -171,7 +171,7 @@ func TestAPIKeyWithPrefix(t *testing.T) {
PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"),
Tags: []sw.Tag{{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) Tags: []sw.Tag{{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}})
r, err := client.PetApi.AddPet(nil).Pet(newPet).Execute() r, err := client.PetAPI.AddPet(nil).Pet(newPet).Execute()
if err != nil { if err != nil {
t.Fatalf("Error while adding pet: %v", err) t.Fatalf("Error while adding pet: %v", err)
@@ -180,7 +180,7 @@ func TestAPIKeyWithPrefix(t *testing.T) {
t.Log(r) t.Log(r)
} }
_, r, err = client.PetApi.GetPetById(auth, 12992).Execute() _, r, err = client.PetAPI.GetPetById(auth, 12992).Execute()
if err != nil { if err != nil {
t.Fatalf("Error while deleting pet by id: %v", err) t.Fatalf("Error while deleting pet by id: %v", err)
} }
@@ -190,7 +190,7 @@ func TestAPIKeyWithPrefix(t *testing.T) {
t.Errorf("APIKey Authentication is missing") t.Errorf("APIKey Authentication is missing")
} }
r, err = client.PetApi.DeletePet(auth, 12992).Execute() r, err = client.PetAPI.DeletePet(auth, 12992).Execute()
if err != nil { if err != nil {
t.Fatalf("Error while deleting pet by id: %v", err) t.Fatalf("Error while deleting pet by id: %v", err)
} }
@@ -204,7 +204,7 @@ func TestDefaultHeader(t *testing.T) {
PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"),
Tags: []sw.Tag{{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) Tags: []sw.Tag{{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}})
r, err := client.PetApi.AddPet(context.Background()).Pet(newPet).Execute() r, err := client.PetAPI.AddPet(context.Background()).Pet(newPet).Execute()
if err != nil { if err != nil {
t.Fatalf("Error while adding pet: %v", err) t.Fatalf("Error while adding pet: %v", err)
@@ -213,7 +213,7 @@ func TestDefaultHeader(t *testing.T) {
t.Log(r) t.Log(r)
} }
r, err = client.PetApi.DeletePet(context.Background(), 12992).Execute() r, err = client.PetAPI.DeletePet(context.Background(), 12992).Execute()
if err != nil { if err != nil {
t.Fatalf("Error while deleting pet by id: %v", err) t.Fatalf("Error while deleting pet by id: %v", err)
@@ -228,7 +228,7 @@ func TestDefaultHeader(t *testing.T) {
} }
func TestHostOverride(t *testing.T) { func TestHostOverride(t *testing.T) {
_, r, err := client.PetApi.FindPetsByStatus(context.Background()).Status(nil).Execute() _, r, err := client.PetAPI.FindPetsByStatus(context.Background()).Status(nil).Execute()
if err != nil { if err != nil {
t.Fatalf("Error while finding pets by status: %v", err) t.Fatalf("Error while finding pets by status: %v", err)
@@ -240,7 +240,7 @@ func TestHostOverride(t *testing.T) {
} }
func TestSchemeOverride(t *testing.T) { func TestSchemeOverride(t *testing.T) {
_, r, err := client.PetApi.FindPetsByStatus(context.Background()).Status(nil).Execute() _, r, err := client.PetAPI.FindPetsByStatus(context.Background()).Status(nil).Execute()
if err != nil { if err != nil {
t.Fatalf("Error while finding pets by status: %v", err) t.Fatalf("Error while finding pets by status: %v", err)

View File

@@ -22,7 +22,7 @@ func TestPutBodyWithFileSchema(t *testing.T) {
File: &sw.File{SourceURI: sw.PtrString("https://example.com/image.png")}, File: &sw.File{SourceURI: sw.PtrString("https://example.com/image.png")},
Files: []sw.File{{SourceURI: sw.PtrString("https://example.com/image.png")}}} Files: []sw.File{{SourceURI: sw.PtrString("https://example.com/image.png")}}}
r, err := client.FakeApi.TestBodyWithFileSchema(context.Background()).FileSchemaTestClass(schema).Execute() r, err := client.FakeAPI.TestBodyWithFileSchema(context.Background()).FileSchemaTestClass(schema).Execute()
if err != nil { if err != nil {
t.Fatalf("Error while adding pet: %v", err) t.Fatalf("Error while adding pet: %v", err)
@@ -33,7 +33,7 @@ func TestPutBodyWithFileSchema(t *testing.T) {
} }
func TestQueryDeepObject(t *testing.T) { func TestQueryDeepObject(t *testing.T) {
req := client.FakeApi.TestQueryDeepObject(context.Background()) req := client.FakeAPI.TestQueryDeepObject(context.Background())
var id = int64(1) var id = int64(1)
var idTag1 = int64(2) var idTag1 = int64(2)

View File

@@ -15,7 +15,7 @@ docs/AdditionalPropertiesClass.md
docs/AllOfPrimitiveTypes.md docs/AllOfPrimitiveTypes.md
docs/AllOfPrimitiveTypesAllOf.md docs/AllOfPrimitiveTypesAllOf.md
docs/Animal.md docs/Animal.md
docs/AnotherFakeApi.md docs/AnotherFakeAPI.md
docs/ApiResponse.md docs/ApiResponse.md
docs/Apple.md docs/Apple.md
docs/AppleReq.md docs/AppleReq.md
@@ -30,7 +30,7 @@ docs/CatAllOf.md
docs/Category.md docs/Category.md
docs/ClassModel.md docs/ClassModel.md
docs/Client.md docs/Client.md
docs/DefaultApi.md docs/DefaultAPI.md
docs/Dog.md docs/Dog.md
docs/DogAllOf.md docs/DogAllOf.md
docs/DuplicatedPropChild.md docs/DuplicatedPropChild.md
@@ -39,8 +39,8 @@ docs/DuplicatedPropParent.md
docs/EnumArrays.md docs/EnumArrays.md
docs/EnumClass.md docs/EnumClass.md
docs/EnumTest.md docs/EnumTest.md
docs/FakeApi.md docs/FakeAPI.md
docs/FakeClassnameTags123Api.md docs/FakeClassnameTags123API.md
docs/File.md docs/File.md
docs/FileSchemaTestClass.md docs/FileSchemaTestClass.md
docs/Foo.md docs/Foo.md
@@ -72,15 +72,15 @@ docs/OuterEnumDefaultValue.md
docs/OuterEnumInteger.md docs/OuterEnumInteger.md
docs/OuterEnumIntegerDefaultValue.md docs/OuterEnumIntegerDefaultValue.md
docs/Pet.md docs/Pet.md
docs/PetApi.md docs/PetAPI.md
docs/ReadOnlyFirst.md docs/ReadOnlyFirst.md
docs/ReadOnlyWithDefault.md docs/ReadOnlyWithDefault.md
docs/Return.md docs/Return.md
docs/SpecialModelName.md docs/SpecialModelName.md
docs/StoreApi.md docs/StoreAPI.md
docs/Tag.md docs/Tag.md
docs/User.md docs/User.md
docs/UserApi.md docs/UserAPI.md
docs/Whale.md docs/Whale.md
docs/Zebra.md docs/Zebra.md
git_push.sh git_push.sh

View File

@@ -78,46 +78,46 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
Class | Method | HTTP request | Description Class | Method | HTTP request | Description
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
*AnotherFakeApi* | [**Call123TestSpecialTags**](docs/AnotherFakeApi.md#call123testspecialtags) | **Patch** /another-fake/dummy | To test special tags *AnotherFakeAPI* | [**Call123TestSpecialTags**](docs/AnotherFakeAPI.md#call123testspecialtags) | **Patch** /another-fake/dummy | To test special tags
*DefaultApi* | [**FooGet**](docs/DefaultApi.md#fooget) | **Get** /foo | *DefaultAPI* | [**FooGet**](docs/DefaultAPI.md#fooget) | **Get** /foo |
*FakeApi* | [**FakeHealthGet**](docs/FakeApi.md#fakehealthget) | **Get** /fake/health | Health check endpoint *FakeAPI* | [**FakeHealthGet**](docs/FakeAPI.md#fakehealthget) | **Get** /fake/health | Health check endpoint
*FakeApi* | [**FakeOuterBooleanSerialize**](docs/FakeApi.md#fakeouterbooleanserialize) | **Post** /fake/outer/boolean | *FakeAPI* | [**FakeOuterBooleanSerialize**](docs/FakeAPI.md#fakeouterbooleanserialize) | **Post** /fake/outer/boolean |
*FakeApi* | [**FakeOuterCompositeSerialize**](docs/FakeApi.md#fakeoutercompositeserialize) | **Post** /fake/outer/composite | *FakeAPI* | [**FakeOuterCompositeSerialize**](docs/FakeAPI.md#fakeoutercompositeserialize) | **Post** /fake/outer/composite |
*FakeApi* | [**FakeOuterNumberSerialize**](docs/FakeApi.md#fakeouternumberserialize) | **Post** /fake/outer/number | *FakeAPI* | [**FakeOuterNumberSerialize**](docs/FakeAPI.md#fakeouternumberserialize) | **Post** /fake/outer/number |
*FakeApi* | [**FakeOuterStringSerialize**](docs/FakeApi.md#fakeouterstringserialize) | **Post** /fake/outer/string | *FakeAPI* | [**FakeOuterStringSerialize**](docs/FakeAPI.md#fakeouterstringserialize) | **Post** /fake/outer/string |
*FakeApi* | [**TestBodyWithFileSchema**](docs/FakeApi.md#testbodywithfileschema) | **Put** /fake/body-with-file-schema | *FakeAPI* | [**TestBodyWithFileSchema**](docs/FakeAPI.md#testbodywithfileschema) | **Put** /fake/body-with-file-schema |
*FakeApi* | [**TestBodyWithQueryParams**](docs/FakeApi.md#testbodywithqueryparams) | **Put** /fake/body-with-query-params | *FakeAPI* | [**TestBodyWithQueryParams**](docs/FakeAPI.md#testbodywithqueryparams) | **Put** /fake/body-with-query-params |
*FakeApi* | [**TestClientModel**](docs/FakeApi.md#testclientmodel) | **Patch** /fake | To test \&quot;client\&quot; model *FakeAPI* | [**TestClientModel**](docs/FakeAPI.md#testclientmodel) | **Patch** /fake | To test \&quot;client\&quot; model
*FakeApi* | [**TestEndpointParameters**](docs/FakeApi.md#testendpointparameters) | **Post** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 *FakeAPI* | [**TestEndpointParameters**](docs/FakeAPI.md#testendpointparameters) | **Post** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
*FakeApi* | [**TestEnumParameters**](docs/FakeApi.md#testenumparameters) | **Get** /fake | To test enum parameters *FakeAPI* | [**TestEnumParameters**](docs/FakeAPI.md#testenumparameters) | **Get** /fake | To test enum parameters
*FakeApi* | [**TestGroupParameters**](docs/FakeApi.md#testgroupparameters) | **Delete** /fake | Fake endpoint to test group parameters (optional) *FakeAPI* | [**TestGroupParameters**](docs/FakeAPI.md#testgroupparameters) | **Delete** /fake | Fake endpoint to test group parameters (optional)
*FakeApi* | [**TestInlineAdditionalProperties**](docs/FakeApi.md#testinlineadditionalproperties) | **Post** /fake/inline-additionalProperties | test inline additionalProperties *FakeAPI* | [**TestInlineAdditionalProperties**](docs/FakeAPI.md#testinlineadditionalproperties) | **Post** /fake/inline-additionalProperties | test inline additionalProperties
*FakeApi* | [**TestJsonFormData**](docs/FakeApi.md#testjsonformdata) | **Get** /fake/jsonFormData | test json serialization of form data *FakeAPI* | [**TestJsonFormData**](docs/FakeAPI.md#testjsonformdata) | **Get** /fake/jsonFormData | test json serialization of form data
*FakeApi* | [**TestQueryDeepObject**](docs/FakeApi.md#testquerydeepobject) | **Get** /fake/deep_object_test | *FakeAPI* | [**TestQueryDeepObject**](docs/FakeAPI.md#testquerydeepobject) | **Get** /fake/deep_object_test |
*FakeApi* | [**TestQueryParameterCollectionFormat**](docs/FakeApi.md#testqueryparametercollectionformat) | **Put** /fake/test-query-parameters | *FakeAPI* | [**TestQueryParameterCollectionFormat**](docs/FakeAPI.md#testqueryparametercollectionformat) | **Put** /fake/test-query-parameters |
*FakeApi* | [**TestUniqueItemsHeaderAndQueryParameterCollectionFormat**](docs/FakeApi.md#testuniqueitemsheaderandqueryparametercollectionformat) | **Put** /fake/test-unique-parameters | *FakeAPI* | [**TestUniqueItemsHeaderAndQueryParameterCollectionFormat**](docs/FakeAPI.md#testuniqueitemsheaderandqueryparametercollectionformat) | **Put** /fake/test-unique-parameters |
*FakeClassnameTags123Api* | [**TestClassname**](docs/FakeClassnameTags123Api.md#testclassname) | **Patch** /fake_classname_test | To test class name in snake case *FakeClassnameTags123API* | [**TestClassname**](docs/FakeClassnameTags123API.md#testclassname) | **Patch** /fake_classname_test | To test class name in snake case
*PetApi* | [**AddPet**](docs/PetApi.md#addpet) | **Post** /pet | Add a new pet to the store *PetAPI* | [**AddPet**](docs/PetAPI.md#addpet) | **Post** /pet | Add a new pet to the store
*PetApi* | [**DeletePet**](docs/PetApi.md#deletepet) | **Delete** /pet/{petId} | Deletes a pet *PetAPI* | [**DeletePet**](docs/PetAPI.md#deletepet) | **Delete** /pet/{petId} | Deletes a pet
*PetApi* | [**FindPetsByStatus**](docs/PetApi.md#findpetsbystatus) | **Get** /pet/findByStatus | Finds Pets by status *PetAPI* | [**FindPetsByStatus**](docs/PetAPI.md#findpetsbystatus) | **Get** /pet/findByStatus | Finds Pets by status
*PetApi* | [**FindPetsByTags**](docs/PetApi.md#findpetsbytags) | **Get** /pet/findByTags | Finds Pets by tags *PetAPI* | [**FindPetsByTags**](docs/PetAPI.md#findpetsbytags) | **Get** /pet/findByTags | Finds Pets by tags
*PetApi* | [**GetPetById**](docs/PetApi.md#getpetbyid) | **Get** /pet/{petId} | Find pet by ID *PetAPI* | [**GetPetById**](docs/PetAPI.md#getpetbyid) | **Get** /pet/{petId} | Find pet by ID
*PetApi* | [**UpdatePet**](docs/PetApi.md#updatepet) | **Put** /pet | Update an existing pet *PetAPI* | [**UpdatePet**](docs/PetAPI.md#updatepet) | **Put** /pet | Update an existing pet
*PetApi* | [**UpdatePetWithForm**](docs/PetApi.md#updatepetwithform) | **Post** /pet/{petId} | Updates a pet in the store with form data *PetAPI* | [**UpdatePetWithForm**](docs/PetAPI.md#updatepetwithform) | **Post** /pet/{petId} | Updates a pet in the store with form data
*PetApi* | [**UploadFile**](docs/PetApi.md#uploadfile) | **Post** /pet/{petId}/uploadImage | uploads an image *PetAPI* | [**UploadFile**](docs/PetAPI.md#uploadfile) | **Post** /pet/{petId}/uploadImage | uploads an image
*PetApi* | [**UploadFileWithRequiredFile**](docs/PetApi.md#uploadfilewithrequiredfile) | **Post** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) *PetAPI* | [**UploadFileWithRequiredFile**](docs/PetAPI.md#uploadfilewithrequiredfile) | **Post** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
*StoreApi* | [**DeleteOrder**](docs/StoreApi.md#deleteorder) | **Delete** /store/order/{order_id} | Delete purchase order by ID *StoreAPI* | [**DeleteOrder**](docs/StoreAPI.md#deleteorder) | **Delete** /store/order/{order_id} | Delete purchase order by ID
*StoreApi* | [**GetInventory**](docs/StoreApi.md#getinventory) | **Get** /store/inventory | Returns pet inventories by status *StoreAPI* | [**GetInventory**](docs/StoreAPI.md#getinventory) | **Get** /store/inventory | Returns pet inventories by status
*StoreApi* | [**GetOrderById**](docs/StoreApi.md#getorderbyid) | **Get** /store/order/{order_id} | Find purchase order by ID *StoreAPI* | [**GetOrderById**](docs/StoreAPI.md#getorderbyid) | **Get** /store/order/{order_id} | Find purchase order by ID
*StoreApi* | [**PlaceOrder**](docs/StoreApi.md#placeorder) | **Post** /store/order | Place an order for a pet *StoreAPI* | [**PlaceOrder**](docs/StoreAPI.md#placeorder) | **Post** /store/order | Place an order for a pet
*UserApi* | [**CreateUser**](docs/UserApi.md#createuser) | **Post** /user | Create user *UserAPI* | [**CreateUser**](docs/UserAPI.md#createuser) | **Post** /user | Create user
*UserApi* | [**CreateUsersWithArrayInput**](docs/UserApi.md#createuserswitharrayinput) | **Post** /user/createWithArray | Creates list of users with given input array *UserAPI* | [**CreateUsersWithArrayInput**](docs/UserAPI.md#createuserswitharrayinput) | **Post** /user/createWithArray | Creates list of users with given input array
*UserApi* | [**CreateUsersWithListInput**](docs/UserApi.md#createuserswithlistinput) | **Post** /user/createWithList | Creates list of users with given input array *UserAPI* | [**CreateUsersWithListInput**](docs/UserAPI.md#createuserswithlistinput) | **Post** /user/createWithList | Creates list of users with given input array
*UserApi* | [**DeleteUser**](docs/UserApi.md#deleteuser) | **Delete** /user/{username} | Delete user *UserAPI* | [**DeleteUser**](docs/UserAPI.md#deleteuser) | **Delete** /user/{username} | Delete user
*UserApi* | [**GetUserByName**](docs/UserApi.md#getuserbyname) | **Get** /user/{username} | Get user by user name *UserAPI* | [**GetUserByName**](docs/UserAPI.md#getuserbyname) | **Get** /user/{username} | Get user by user name
*UserApi* | [**LoginUser**](docs/UserApi.md#loginuser) | **Get** /user/login | Logs user into the system *UserAPI* | [**LoginUser**](docs/UserAPI.md#loginuser) | **Get** /user/login | Logs user into the system
*UserApi* | [**LogoutUser**](docs/UserApi.md#logoutuser) | **Get** /user/logout | Logs out current logged in user session *UserAPI* | [**LogoutUser**](docs/UserAPI.md#logoutuser) | **Get** /user/logout | Logs out current logged in user session
*UserApi* | [**UpdateUser**](docs/UserApi.md#updateuser) | **Put** /user/{username} | Updated user *UserAPI* | [**UpdateUser**](docs/UserAPI.md#updateuser) | **Put** /user/{username} | Updated user
## Documentation For Models ## Documentation For Models

View File

@@ -19,7 +19,7 @@ import (
) )
type AnotherFakeApi interface { type AnotherFakeAPI interface {
/* /*
Call123TestSpecialTags To test special tags Call123TestSpecialTags To test special tags
@@ -36,12 +36,12 @@ type AnotherFakeApi interface {
Call123TestSpecialTagsExecute(r ApiCall123TestSpecialTagsRequest) (*Client, *http.Response, error) Call123TestSpecialTagsExecute(r ApiCall123TestSpecialTagsRequest) (*Client, *http.Response, error)
} }
// AnotherFakeApiService AnotherFakeApi service // AnotherFakeAPIService AnotherFakeAPI service
type AnotherFakeApiService service type AnotherFakeAPIService service
type ApiCall123TestSpecialTagsRequest struct { type ApiCall123TestSpecialTagsRequest struct {
ctx context.Context ctx context.Context
ApiService AnotherFakeApi ApiService AnotherFakeAPI
client *Client client *Client
} }
@@ -63,7 +63,7 @@ To test special tags and operation ID starting with number
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiCall123TestSpecialTagsRequest @return ApiCall123TestSpecialTagsRequest
*/ */
func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx context.Context) ApiCall123TestSpecialTagsRequest { func (a *AnotherFakeAPIService) Call123TestSpecialTags(ctx context.Context) ApiCall123TestSpecialTagsRequest {
return ApiCall123TestSpecialTagsRequest{ return ApiCall123TestSpecialTagsRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -72,7 +72,7 @@ func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx context.Context) ApiC
// Execute executes the request // Execute executes the request
// @return Client // @return Client
func (a *AnotherFakeApiService) Call123TestSpecialTagsExecute(r ApiCall123TestSpecialTagsRequest) (*Client, *http.Response, error) { func (a *AnotherFakeAPIService) Call123TestSpecialTagsExecute(r ApiCall123TestSpecialTagsRequest) (*Client, *http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodPatch localVarHTTPMethod = http.MethodPatch
localVarPostBody interface{} localVarPostBody interface{}
@@ -80,7 +80,7 @@ func (a *AnotherFakeApiService) Call123TestSpecialTagsExecute(r ApiCall123TestSp
localVarReturnValue *Client localVarReturnValue *Client
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AnotherFakeApiService.Call123TestSpecialTags") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AnotherFakeAPIService.Call123TestSpecialTags")
if err != nil { if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
} }

View File

@@ -19,7 +19,7 @@ import (
) )
type DefaultApi interface { type DefaultAPI interface {
/* /*
FooGet Method for FooGet FooGet Method for FooGet
@@ -34,12 +34,12 @@ type DefaultApi interface {
FooGetExecute(r ApiFooGetRequest) (*FooGetDefaultResponse, *http.Response, error) FooGetExecute(r ApiFooGetRequest) (*FooGetDefaultResponse, *http.Response, error)
} }
// DefaultApiService DefaultApi service // DefaultAPIService DefaultAPI service
type DefaultApiService service type DefaultAPIService service
type ApiFooGetRequest struct { type ApiFooGetRequest struct {
ctx context.Context ctx context.Context
ApiService DefaultApi ApiService DefaultAPI
} }
func (r ApiFooGetRequest) Execute() (*FooGetDefaultResponse, *http.Response, error) { func (r ApiFooGetRequest) Execute() (*FooGetDefaultResponse, *http.Response, error) {
@@ -52,7 +52,7 @@ FooGet Method for FooGet
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiFooGetRequest @return ApiFooGetRequest
*/ */
func (a *DefaultApiService) FooGet(ctx context.Context) ApiFooGetRequest { func (a *DefaultAPIService) FooGet(ctx context.Context) ApiFooGetRequest {
return ApiFooGetRequest{ return ApiFooGetRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -61,7 +61,7 @@ func (a *DefaultApiService) FooGet(ctx context.Context) ApiFooGetRequest {
// Execute executes the request // Execute executes the request
// @return FooGetDefaultResponse // @return FooGetDefaultResponse
func (a *DefaultApiService) FooGetExecute(r ApiFooGetRequest) (*FooGetDefaultResponse, *http.Response, error) { func (a *DefaultAPIService) FooGetExecute(r ApiFooGetRequest) (*FooGetDefaultResponse, *http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodGet localVarHTTPMethod = http.MethodGet
localVarPostBody interface{} localVarPostBody interface{}
@@ -69,7 +69,7 @@ func (a *DefaultApiService) FooGetExecute(r ApiFooGetRequest) (*FooGetDefaultRes
localVarReturnValue *FooGetDefaultResponse localVarReturnValue *FooGetDefaultResponse
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.FooGet") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.FooGet")
if err != nil { if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
} }

View File

@@ -22,7 +22,7 @@ import (
) )
type FakeApi interface { type FakeAPI interface {
/* /*
FakeHealthGet Health check endpoint FakeHealthGet Health check endpoint
@@ -238,12 +238,12 @@ type FakeApi interface {
TestUniqueItemsHeaderAndQueryParameterCollectionFormatExecute(r ApiTestUniqueItemsHeaderAndQueryParameterCollectionFormatRequest) ([]Pet, *http.Response, error) TestUniqueItemsHeaderAndQueryParameterCollectionFormatExecute(r ApiTestUniqueItemsHeaderAndQueryParameterCollectionFormatRequest) ([]Pet, *http.Response, error)
} }
// FakeApiService FakeApi service // FakeAPIService FakeAPI service
type FakeApiService service type FakeAPIService service
type ApiFakeHealthGetRequest struct { type ApiFakeHealthGetRequest struct {
ctx context.Context ctx context.Context
ApiService FakeApi ApiService FakeAPI
} }
func (r ApiFakeHealthGetRequest) Execute() (*HealthCheckResult, *http.Response, error) { func (r ApiFakeHealthGetRequest) Execute() (*HealthCheckResult, *http.Response, error) {
@@ -256,7 +256,7 @@ FakeHealthGet Health check endpoint
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiFakeHealthGetRequest @return ApiFakeHealthGetRequest
*/ */
func (a *FakeApiService) FakeHealthGet(ctx context.Context) ApiFakeHealthGetRequest { func (a *FakeAPIService) FakeHealthGet(ctx context.Context) ApiFakeHealthGetRequest {
return ApiFakeHealthGetRequest{ return ApiFakeHealthGetRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -265,7 +265,7 @@ func (a *FakeApiService) FakeHealthGet(ctx context.Context) ApiFakeHealthGetRequ
// Execute executes the request // Execute executes the request
// @return HealthCheckResult // @return HealthCheckResult
func (a *FakeApiService) FakeHealthGetExecute(r ApiFakeHealthGetRequest) (*HealthCheckResult, *http.Response, error) { func (a *FakeAPIService) FakeHealthGetExecute(r ApiFakeHealthGetRequest) (*HealthCheckResult, *http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodGet localVarHTTPMethod = http.MethodGet
localVarPostBody interface{} localVarPostBody interface{}
@@ -273,7 +273,7 @@ func (a *FakeApiService) FakeHealthGetExecute(r ApiFakeHealthGetRequest) (*Healt
localVarReturnValue *HealthCheckResult localVarReturnValue *HealthCheckResult
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.FakeHealthGet") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeAPIService.FakeHealthGet")
if err != nil { if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
} }
@@ -340,7 +340,7 @@ func (a *FakeApiService) FakeHealthGetExecute(r ApiFakeHealthGetRequest) (*Healt
type ApiFakeOuterBooleanSerializeRequest struct { type ApiFakeOuterBooleanSerializeRequest struct {
ctx context.Context ctx context.Context
ApiService FakeApi ApiService FakeAPI
body *bool body *bool
} }
@@ -362,7 +362,7 @@ Test serialization of outer boolean types
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiFakeOuterBooleanSerializeRequest @return ApiFakeOuterBooleanSerializeRequest
*/ */
func (a *FakeApiService) FakeOuterBooleanSerialize(ctx context.Context) ApiFakeOuterBooleanSerializeRequest { func (a *FakeAPIService) FakeOuterBooleanSerialize(ctx context.Context) ApiFakeOuterBooleanSerializeRequest {
return ApiFakeOuterBooleanSerializeRequest{ return ApiFakeOuterBooleanSerializeRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -371,7 +371,7 @@ func (a *FakeApiService) FakeOuterBooleanSerialize(ctx context.Context) ApiFakeO
// Execute executes the request // Execute executes the request
// @return bool // @return bool
func (a *FakeApiService) FakeOuterBooleanSerializeExecute(r ApiFakeOuterBooleanSerializeRequest) (bool, *http.Response, error) { func (a *FakeAPIService) FakeOuterBooleanSerializeExecute(r ApiFakeOuterBooleanSerializeRequest) (bool, *http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodPost localVarHTTPMethod = http.MethodPost
localVarPostBody interface{} localVarPostBody interface{}
@@ -379,7 +379,7 @@ func (a *FakeApiService) FakeOuterBooleanSerializeExecute(r ApiFakeOuterBooleanS
localVarReturnValue bool localVarReturnValue bool
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.FakeOuterBooleanSerialize") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeAPIService.FakeOuterBooleanSerialize")
if err != nil { if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
} }
@@ -448,7 +448,7 @@ func (a *FakeApiService) FakeOuterBooleanSerializeExecute(r ApiFakeOuterBooleanS
type ApiFakeOuterCompositeSerializeRequest struct { type ApiFakeOuterCompositeSerializeRequest struct {
ctx context.Context ctx context.Context
ApiService FakeApi ApiService FakeAPI
outerComposite *OuterComposite outerComposite *OuterComposite
} }
@@ -470,7 +470,7 @@ Test serialization of object with outer number type
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiFakeOuterCompositeSerializeRequest @return ApiFakeOuterCompositeSerializeRequest
*/ */
func (a *FakeApiService) FakeOuterCompositeSerialize(ctx context.Context) ApiFakeOuterCompositeSerializeRequest { func (a *FakeAPIService) FakeOuterCompositeSerialize(ctx context.Context) ApiFakeOuterCompositeSerializeRequest {
return ApiFakeOuterCompositeSerializeRequest{ return ApiFakeOuterCompositeSerializeRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -479,7 +479,7 @@ func (a *FakeApiService) FakeOuterCompositeSerialize(ctx context.Context) ApiFak
// Execute executes the request // Execute executes the request
// @return OuterComposite // @return OuterComposite
func (a *FakeApiService) FakeOuterCompositeSerializeExecute(r ApiFakeOuterCompositeSerializeRequest) (*OuterComposite, *http.Response, error) { func (a *FakeAPIService) FakeOuterCompositeSerializeExecute(r ApiFakeOuterCompositeSerializeRequest) (*OuterComposite, *http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodPost localVarHTTPMethod = http.MethodPost
localVarPostBody interface{} localVarPostBody interface{}
@@ -487,7 +487,7 @@ func (a *FakeApiService) FakeOuterCompositeSerializeExecute(r ApiFakeOuterCompos
localVarReturnValue *OuterComposite localVarReturnValue *OuterComposite
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.FakeOuterCompositeSerialize") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeAPIService.FakeOuterCompositeSerialize")
if err != nil { if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
} }
@@ -556,7 +556,7 @@ func (a *FakeApiService) FakeOuterCompositeSerializeExecute(r ApiFakeOuterCompos
type ApiFakeOuterNumberSerializeRequest struct { type ApiFakeOuterNumberSerializeRequest struct {
ctx context.Context ctx context.Context
ApiService FakeApi ApiService FakeAPI
body *float32 body *float32
} }
@@ -578,7 +578,7 @@ Test serialization of outer number types
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiFakeOuterNumberSerializeRequest @return ApiFakeOuterNumberSerializeRequest
*/ */
func (a *FakeApiService) FakeOuterNumberSerialize(ctx context.Context) ApiFakeOuterNumberSerializeRequest { func (a *FakeAPIService) FakeOuterNumberSerialize(ctx context.Context) ApiFakeOuterNumberSerializeRequest {
return ApiFakeOuterNumberSerializeRequest{ return ApiFakeOuterNumberSerializeRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -587,7 +587,7 @@ func (a *FakeApiService) FakeOuterNumberSerialize(ctx context.Context) ApiFakeOu
// Execute executes the request // Execute executes the request
// @return float32 // @return float32
func (a *FakeApiService) FakeOuterNumberSerializeExecute(r ApiFakeOuterNumberSerializeRequest) (float32, *http.Response, error) { func (a *FakeAPIService) FakeOuterNumberSerializeExecute(r ApiFakeOuterNumberSerializeRequest) (float32, *http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodPost localVarHTTPMethod = http.MethodPost
localVarPostBody interface{} localVarPostBody interface{}
@@ -595,7 +595,7 @@ func (a *FakeApiService) FakeOuterNumberSerializeExecute(r ApiFakeOuterNumberSer
localVarReturnValue float32 localVarReturnValue float32
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.FakeOuterNumberSerialize") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeAPIService.FakeOuterNumberSerialize")
if err != nil { if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
} }
@@ -664,7 +664,7 @@ func (a *FakeApiService) FakeOuterNumberSerializeExecute(r ApiFakeOuterNumberSer
type ApiFakeOuterStringSerializeRequest struct { type ApiFakeOuterStringSerializeRequest struct {
ctx context.Context ctx context.Context
ApiService FakeApi ApiService FakeAPI
body *string body *string
} }
@@ -686,7 +686,7 @@ Test serialization of outer string types
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiFakeOuterStringSerializeRequest @return ApiFakeOuterStringSerializeRequest
*/ */
func (a *FakeApiService) FakeOuterStringSerialize(ctx context.Context) ApiFakeOuterStringSerializeRequest { func (a *FakeAPIService) FakeOuterStringSerialize(ctx context.Context) ApiFakeOuterStringSerializeRequest {
return ApiFakeOuterStringSerializeRequest{ return ApiFakeOuterStringSerializeRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -695,7 +695,7 @@ func (a *FakeApiService) FakeOuterStringSerialize(ctx context.Context) ApiFakeOu
// Execute executes the request // Execute executes the request
// @return string // @return string
func (a *FakeApiService) FakeOuterStringSerializeExecute(r ApiFakeOuterStringSerializeRequest) (string, *http.Response, error) { func (a *FakeAPIService) FakeOuterStringSerializeExecute(r ApiFakeOuterStringSerializeRequest) (string, *http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodPost localVarHTTPMethod = http.MethodPost
localVarPostBody interface{} localVarPostBody interface{}
@@ -703,7 +703,7 @@ func (a *FakeApiService) FakeOuterStringSerializeExecute(r ApiFakeOuterStringSer
localVarReturnValue string localVarReturnValue string
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.FakeOuterStringSerialize") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeAPIService.FakeOuterStringSerialize")
if err != nil { if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
} }
@@ -772,7 +772,7 @@ func (a *FakeApiService) FakeOuterStringSerializeExecute(r ApiFakeOuterStringSer
type ApiTestBodyWithFileSchemaRequest struct { type ApiTestBodyWithFileSchemaRequest struct {
ctx context.Context ctx context.Context
ApiService FakeApi ApiService FakeAPI
fileSchemaTestClass *FileSchemaTestClass fileSchemaTestClass *FileSchemaTestClass
} }
@@ -793,7 +793,7 @@ For this test, the body for this request much reference a schema named `File`.
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiTestBodyWithFileSchemaRequest @return ApiTestBodyWithFileSchemaRequest
*/ */
func (a *FakeApiService) TestBodyWithFileSchema(ctx context.Context) ApiTestBodyWithFileSchemaRequest { func (a *FakeAPIService) TestBodyWithFileSchema(ctx context.Context) ApiTestBodyWithFileSchemaRequest {
return ApiTestBodyWithFileSchemaRequest{ return ApiTestBodyWithFileSchemaRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -801,14 +801,14 @@ func (a *FakeApiService) TestBodyWithFileSchema(ctx context.Context) ApiTestBody
} }
// Execute executes the request // Execute executes the request
func (a *FakeApiService) TestBodyWithFileSchemaExecute(r ApiTestBodyWithFileSchemaRequest) (*http.Response, error) { func (a *FakeAPIService) TestBodyWithFileSchemaExecute(r ApiTestBodyWithFileSchemaRequest) (*http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodPut localVarHTTPMethod = http.MethodPut
localVarPostBody interface{} localVarPostBody interface{}
formFiles []formFile formFiles []formFile
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestBodyWithFileSchema") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeAPIService.TestBodyWithFileSchema")
if err != nil { if err != nil {
return nil, &GenericOpenAPIError{error: err.Error()} return nil, &GenericOpenAPIError{error: err.Error()}
} }
@@ -871,7 +871,7 @@ func (a *FakeApiService) TestBodyWithFileSchemaExecute(r ApiTestBodyWithFileSche
type ApiTestBodyWithQueryParamsRequest struct { type ApiTestBodyWithQueryParamsRequest struct {
ctx context.Context ctx context.Context
ApiService FakeApi ApiService FakeAPI
query *string query *string
user *User user *User
} }
@@ -896,7 +896,7 @@ TestBodyWithQueryParams Method for TestBodyWithQueryParams
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiTestBodyWithQueryParamsRequest @return ApiTestBodyWithQueryParamsRequest
*/ */
func (a *FakeApiService) TestBodyWithQueryParams(ctx context.Context) ApiTestBodyWithQueryParamsRequest { func (a *FakeAPIService) TestBodyWithQueryParams(ctx context.Context) ApiTestBodyWithQueryParamsRequest {
return ApiTestBodyWithQueryParamsRequest{ return ApiTestBodyWithQueryParamsRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -904,14 +904,14 @@ func (a *FakeApiService) TestBodyWithQueryParams(ctx context.Context) ApiTestBod
} }
// Execute executes the request // Execute executes the request
func (a *FakeApiService) TestBodyWithQueryParamsExecute(r ApiTestBodyWithQueryParamsRequest) (*http.Response, error) { func (a *FakeAPIService) TestBodyWithQueryParamsExecute(r ApiTestBodyWithQueryParamsRequest) (*http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodPut localVarHTTPMethod = http.MethodPut
localVarPostBody interface{} localVarPostBody interface{}
formFiles []formFile formFiles []formFile
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestBodyWithQueryParams") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeAPIService.TestBodyWithQueryParams")
if err != nil { if err != nil {
return nil, &GenericOpenAPIError{error: err.Error()} return nil, &GenericOpenAPIError{error: err.Error()}
} }
@@ -978,7 +978,7 @@ func (a *FakeApiService) TestBodyWithQueryParamsExecute(r ApiTestBodyWithQueryPa
type ApiTestClientModelRequest struct { type ApiTestClientModelRequest struct {
ctx context.Context ctx context.Context
ApiService FakeApi ApiService FakeAPI
client *Client client *Client
} }
@@ -1000,7 +1000,7 @@ To test "client" model
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiTestClientModelRequest @return ApiTestClientModelRequest
*/ */
func (a *FakeApiService) TestClientModel(ctx context.Context) ApiTestClientModelRequest { func (a *FakeAPIService) TestClientModel(ctx context.Context) ApiTestClientModelRequest {
return ApiTestClientModelRequest{ return ApiTestClientModelRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -1009,7 +1009,7 @@ func (a *FakeApiService) TestClientModel(ctx context.Context) ApiTestClientModel
// Execute executes the request // Execute executes the request
// @return Client // @return Client
func (a *FakeApiService) TestClientModelExecute(r ApiTestClientModelRequest) (*Client, *http.Response, error) { func (a *FakeAPIService) TestClientModelExecute(r ApiTestClientModelRequest) (*Client, *http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodPatch localVarHTTPMethod = http.MethodPatch
localVarPostBody interface{} localVarPostBody interface{}
@@ -1017,7 +1017,7 @@ func (a *FakeApiService) TestClientModelExecute(r ApiTestClientModelRequest) (*C
localVarReturnValue *Client localVarReturnValue *Client
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestClientModel") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeAPIService.TestClientModel")
if err != nil { if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
} }
@@ -1089,7 +1089,7 @@ func (a *FakeApiService) TestClientModelExecute(r ApiTestClientModelRequest) (*C
type ApiTestEndpointParametersRequest struct { type ApiTestEndpointParametersRequest struct {
ctx context.Context ctx context.Context
ApiService FakeApi ApiService FakeAPI
number *float32 number *float32
double *float64 double *float64
patternWithoutDelimiter *string patternWithoutDelimiter *string
@@ -1206,7 +1206,7 @@ Fake endpoint for testing various parameters
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiTestEndpointParametersRequest @return ApiTestEndpointParametersRequest
*/ */
func (a *FakeApiService) TestEndpointParameters(ctx context.Context) ApiTestEndpointParametersRequest { func (a *FakeAPIService) TestEndpointParameters(ctx context.Context) ApiTestEndpointParametersRequest {
return ApiTestEndpointParametersRequest{ return ApiTestEndpointParametersRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -1214,14 +1214,14 @@ func (a *FakeApiService) TestEndpointParameters(ctx context.Context) ApiTestEndp
} }
// Execute executes the request // Execute executes the request
func (a *FakeApiService) TestEndpointParametersExecute(r ApiTestEndpointParametersRequest) (*http.Response, error) { func (a *FakeAPIService) TestEndpointParametersExecute(r ApiTestEndpointParametersRequest) (*http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodPost localVarHTTPMethod = http.MethodPost
localVarPostBody interface{} localVarPostBody interface{}
formFiles []formFile formFiles []formFile
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestEndpointParameters") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeAPIService.TestEndpointParameters")
if err != nil { if err != nil {
return nil, &GenericOpenAPIError{error: err.Error()} return nil, &GenericOpenAPIError{error: err.Error()}
} }
@@ -1351,7 +1351,7 @@ func (a *FakeApiService) TestEndpointParametersExecute(r ApiTestEndpointParamete
type ApiTestEnumParametersRequest struct { type ApiTestEnumParametersRequest struct {
ctx context.Context ctx context.Context
ApiService FakeApi ApiService FakeAPI
enumHeaderStringArray *[]string enumHeaderStringArray *[]string
enumHeaderString *string enumHeaderString *string
enumQueryStringArray *[]string enumQueryStringArray *[]string
@@ -1422,7 +1422,7 @@ To test enum parameters
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiTestEnumParametersRequest @return ApiTestEnumParametersRequest
*/ */
func (a *FakeApiService) TestEnumParameters(ctx context.Context) ApiTestEnumParametersRequest { func (a *FakeAPIService) TestEnumParameters(ctx context.Context) ApiTestEnumParametersRequest {
return ApiTestEnumParametersRequest{ return ApiTestEnumParametersRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -1430,14 +1430,14 @@ func (a *FakeApiService) TestEnumParameters(ctx context.Context) ApiTestEnumPara
} }
// Execute executes the request // Execute executes the request
func (a *FakeApiService) TestEnumParametersExecute(r ApiTestEnumParametersRequest) (*http.Response, error) { func (a *FakeAPIService) TestEnumParametersExecute(r ApiTestEnumParametersRequest) (*http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodGet localVarHTTPMethod = http.MethodGet
localVarPostBody interface{} localVarPostBody interface{}
formFiles []formFile formFiles []formFile
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestEnumParameters") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeAPIService.TestEnumParameters")
if err != nil { if err != nil {
return nil, &GenericOpenAPIError{error: err.Error()} return nil, &GenericOpenAPIError{error: err.Error()}
} }
@@ -1527,7 +1527,7 @@ func (a *FakeApiService) TestEnumParametersExecute(r ApiTestEnumParametersReques
type ApiTestGroupParametersRequest struct { type ApiTestGroupParametersRequest struct {
ctx context.Context ctx context.Context
ApiService FakeApi ApiService FakeAPI
requiredStringGroup *int32 requiredStringGroup *int32
requiredBooleanGroup *bool requiredBooleanGroup *bool
requiredInt64Group *int64 requiredInt64Group *int64
@@ -1584,7 +1584,7 @@ Fake endpoint to test group parameters (optional)
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiTestGroupParametersRequest @return ApiTestGroupParametersRequest
*/ */
func (a *FakeApiService) TestGroupParameters(ctx context.Context) ApiTestGroupParametersRequest { func (a *FakeAPIService) TestGroupParameters(ctx context.Context) ApiTestGroupParametersRequest {
return ApiTestGroupParametersRequest{ return ApiTestGroupParametersRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -1592,14 +1592,14 @@ func (a *FakeApiService) TestGroupParameters(ctx context.Context) ApiTestGroupPa
} }
// Execute executes the request // Execute executes the request
func (a *FakeApiService) TestGroupParametersExecute(r ApiTestGroupParametersRequest) (*http.Response, error) { func (a *FakeAPIService) TestGroupParametersExecute(r ApiTestGroupParametersRequest) (*http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodDelete localVarHTTPMethod = http.MethodDelete
localVarPostBody interface{} localVarPostBody interface{}
formFiles []formFile formFiles []formFile
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestGroupParameters") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeAPIService.TestGroupParameters")
if err != nil { if err != nil {
return nil, &GenericOpenAPIError{error: err.Error()} return nil, &GenericOpenAPIError{error: err.Error()}
} }
@@ -1688,7 +1688,7 @@ func (a *FakeApiService) TestGroupParametersExecute(r ApiTestGroupParametersRequ
type ApiTestInlineAdditionalPropertiesRequest struct { type ApiTestInlineAdditionalPropertiesRequest struct {
ctx context.Context ctx context.Context
ApiService FakeApi ApiService FakeAPI
requestBody *map[string]string requestBody *map[string]string
} }
@@ -1710,7 +1710,7 @@ TestInlineAdditionalProperties test inline additionalProperties
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiTestInlineAdditionalPropertiesRequest @return ApiTestInlineAdditionalPropertiesRequest
*/ */
func (a *FakeApiService) TestInlineAdditionalProperties(ctx context.Context) ApiTestInlineAdditionalPropertiesRequest { func (a *FakeAPIService) TestInlineAdditionalProperties(ctx context.Context) ApiTestInlineAdditionalPropertiesRequest {
return ApiTestInlineAdditionalPropertiesRequest{ return ApiTestInlineAdditionalPropertiesRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -1718,14 +1718,14 @@ func (a *FakeApiService) TestInlineAdditionalProperties(ctx context.Context) Api
} }
// Execute executes the request // Execute executes the request
func (a *FakeApiService) TestInlineAdditionalPropertiesExecute(r ApiTestInlineAdditionalPropertiesRequest) (*http.Response, error) { func (a *FakeAPIService) TestInlineAdditionalPropertiesExecute(r ApiTestInlineAdditionalPropertiesRequest) (*http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodPost localVarHTTPMethod = http.MethodPost
localVarPostBody interface{} localVarPostBody interface{}
formFiles []formFile formFiles []formFile
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestInlineAdditionalProperties") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeAPIService.TestInlineAdditionalProperties")
if err != nil { if err != nil {
return nil, &GenericOpenAPIError{error: err.Error()} return nil, &GenericOpenAPIError{error: err.Error()}
} }
@@ -1788,7 +1788,7 @@ func (a *FakeApiService) TestInlineAdditionalPropertiesExecute(r ApiTestInlineAd
type ApiTestJsonFormDataRequest struct { type ApiTestJsonFormDataRequest struct {
ctx context.Context ctx context.Context
ApiService FakeApi ApiService FakeAPI
param *string param *string
param2 *string param2 *string
} }
@@ -1817,7 +1817,7 @@ TestJsonFormData test json serialization of form data
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiTestJsonFormDataRequest @return ApiTestJsonFormDataRequest
*/ */
func (a *FakeApiService) TestJsonFormData(ctx context.Context) ApiTestJsonFormDataRequest { func (a *FakeAPIService) TestJsonFormData(ctx context.Context) ApiTestJsonFormDataRequest {
return ApiTestJsonFormDataRequest{ return ApiTestJsonFormDataRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -1825,14 +1825,14 @@ func (a *FakeApiService) TestJsonFormData(ctx context.Context) ApiTestJsonFormDa
} }
// Execute executes the request // Execute executes the request
func (a *FakeApiService) TestJsonFormDataExecute(r ApiTestJsonFormDataRequest) (*http.Response, error) { func (a *FakeAPIService) TestJsonFormDataExecute(r ApiTestJsonFormDataRequest) (*http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodGet localVarHTTPMethod = http.MethodGet
localVarPostBody interface{} localVarPostBody interface{}
formFiles []formFile formFiles []formFile
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestJsonFormData") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeAPIService.TestJsonFormData")
if err != nil { if err != nil {
return nil, &GenericOpenAPIError{error: err.Error()} return nil, &GenericOpenAPIError{error: err.Error()}
} }
@@ -1898,7 +1898,7 @@ func (a *FakeApiService) TestJsonFormDataExecute(r ApiTestJsonFormDataRequest) (
type ApiTestQueryDeepObjectRequest struct { type ApiTestQueryDeepObjectRequest struct {
ctx context.Context ctx context.Context
ApiService FakeApi ApiService FakeAPI
testPet *Pet testPet *Pet
inputOptions *Category inputOptions *Category
} }
@@ -1923,7 +1923,7 @@ TestQueryDeepObject Method for TestQueryDeepObject
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiTestQueryDeepObjectRequest @return ApiTestQueryDeepObjectRequest
*/ */
func (a *FakeApiService) TestQueryDeepObject(ctx context.Context) ApiTestQueryDeepObjectRequest { func (a *FakeAPIService) TestQueryDeepObject(ctx context.Context) ApiTestQueryDeepObjectRequest {
return ApiTestQueryDeepObjectRequest{ return ApiTestQueryDeepObjectRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -1931,14 +1931,14 @@ func (a *FakeApiService) TestQueryDeepObject(ctx context.Context) ApiTestQueryDe
} }
// Execute executes the request // Execute executes the request
func (a *FakeApiService) TestQueryDeepObjectExecute(r ApiTestQueryDeepObjectRequest) (*http.Response, error) { func (a *FakeAPIService) TestQueryDeepObjectExecute(r ApiTestQueryDeepObjectRequest) (*http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodGet localVarHTTPMethod = http.MethodGet
localVarPostBody interface{} localVarPostBody interface{}
formFiles []formFile formFiles []formFile
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestQueryDeepObject") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeAPIService.TestQueryDeepObject")
if err != nil { if err != nil {
return nil, &GenericOpenAPIError{error: err.Error()} return nil, &GenericOpenAPIError{error: err.Error()}
} }
@@ -2002,7 +2002,7 @@ func (a *FakeApiService) TestQueryDeepObjectExecute(r ApiTestQueryDeepObjectRequ
type ApiTestQueryParameterCollectionFormatRequest struct { type ApiTestQueryParameterCollectionFormatRequest struct {
ctx context.Context ctx context.Context
ApiService FakeApi ApiService FakeAPI
pipe *[]string pipe *[]string
ioutil *[]string ioutil *[]string
http *[]string http *[]string
@@ -2047,7 +2047,7 @@ To test the collection format in query parameters
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiTestQueryParameterCollectionFormatRequest @return ApiTestQueryParameterCollectionFormatRequest
*/ */
func (a *FakeApiService) TestQueryParameterCollectionFormat(ctx context.Context) ApiTestQueryParameterCollectionFormatRequest { func (a *FakeAPIService) TestQueryParameterCollectionFormat(ctx context.Context) ApiTestQueryParameterCollectionFormatRequest {
return ApiTestQueryParameterCollectionFormatRequest{ return ApiTestQueryParameterCollectionFormatRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -2055,14 +2055,14 @@ func (a *FakeApiService) TestQueryParameterCollectionFormat(ctx context.Context)
} }
// Execute executes the request // Execute executes the request
func (a *FakeApiService) TestQueryParameterCollectionFormatExecute(r ApiTestQueryParameterCollectionFormatRequest) (*http.Response, error) { func (a *FakeAPIService) TestQueryParameterCollectionFormatExecute(r ApiTestQueryParameterCollectionFormatRequest) (*http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodPut localVarHTTPMethod = http.MethodPut
localVarPostBody interface{} localVarPostBody interface{}
formFiles []formFile formFiles []formFile
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestQueryParameterCollectionFormat") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeAPIService.TestQueryParameterCollectionFormat")
if err != nil { if err != nil {
return nil, &GenericOpenAPIError{error: err.Error()} return nil, &GenericOpenAPIError{error: err.Error()}
} }
@@ -2160,7 +2160,7 @@ func (a *FakeApiService) TestQueryParameterCollectionFormatExecute(r ApiTestQuer
type ApiTestUniqueItemsHeaderAndQueryParameterCollectionFormatRequest struct { type ApiTestUniqueItemsHeaderAndQueryParameterCollectionFormatRequest struct {
ctx context.Context ctx context.Context
ApiService FakeApi ApiService FakeAPI
queryUnique *[]string queryUnique *[]string
headerUnique *[]string headerUnique *[]string
} }
@@ -2187,7 +2187,7 @@ To test unique items in header and query parameters
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiTestUniqueItemsHeaderAndQueryParameterCollectionFormatRequest @return ApiTestUniqueItemsHeaderAndQueryParameterCollectionFormatRequest
*/ */
func (a *FakeApiService) TestUniqueItemsHeaderAndQueryParameterCollectionFormat(ctx context.Context) ApiTestUniqueItemsHeaderAndQueryParameterCollectionFormatRequest { func (a *FakeAPIService) TestUniqueItemsHeaderAndQueryParameterCollectionFormat(ctx context.Context) ApiTestUniqueItemsHeaderAndQueryParameterCollectionFormatRequest {
return ApiTestUniqueItemsHeaderAndQueryParameterCollectionFormatRequest{ return ApiTestUniqueItemsHeaderAndQueryParameterCollectionFormatRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -2196,7 +2196,7 @@ func (a *FakeApiService) TestUniqueItemsHeaderAndQueryParameterCollectionFormat(
// Execute executes the request // Execute executes the request
// @return []Pet // @return []Pet
func (a *FakeApiService) TestUniqueItemsHeaderAndQueryParameterCollectionFormatExecute(r ApiTestUniqueItemsHeaderAndQueryParameterCollectionFormatRequest) ([]Pet, *http.Response, error) { func (a *FakeAPIService) TestUniqueItemsHeaderAndQueryParameterCollectionFormatExecute(r ApiTestUniqueItemsHeaderAndQueryParameterCollectionFormatRequest) ([]Pet, *http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodPut localVarHTTPMethod = http.MethodPut
localVarPostBody interface{} localVarPostBody interface{}
@@ -2204,7 +2204,7 @@ func (a *FakeApiService) TestUniqueItemsHeaderAndQueryParameterCollectionFormatE
localVarReturnValue []Pet localVarReturnValue []Pet
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestUniqueItemsHeaderAndQueryParameterCollectionFormat") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeAPIService.TestUniqueItemsHeaderAndQueryParameterCollectionFormat")
if err != nil { if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
} }

View File

@@ -19,7 +19,7 @@ import (
) )
type FakeClassnameTags123Api interface { type FakeClassnameTags123API interface {
/* /*
TestClassname To test class name in snake case TestClassname To test class name in snake case
@@ -36,12 +36,12 @@ type FakeClassnameTags123Api interface {
TestClassnameExecute(r ApiTestClassnameRequest) (*Client, *http.Response, error) TestClassnameExecute(r ApiTestClassnameRequest) (*Client, *http.Response, error)
} }
// FakeClassnameTags123ApiService FakeClassnameTags123Api service // FakeClassnameTags123APIService FakeClassnameTags123API service
type FakeClassnameTags123ApiService service type FakeClassnameTags123APIService service
type ApiTestClassnameRequest struct { type ApiTestClassnameRequest struct {
ctx context.Context ctx context.Context
ApiService FakeClassnameTags123Api ApiService FakeClassnameTags123API
client *Client client *Client
} }
@@ -63,7 +63,7 @@ To test class name in snake case
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiTestClassnameRequest @return ApiTestClassnameRequest
*/ */
func (a *FakeClassnameTags123ApiService) TestClassname(ctx context.Context) ApiTestClassnameRequest { func (a *FakeClassnameTags123APIService) TestClassname(ctx context.Context) ApiTestClassnameRequest {
return ApiTestClassnameRequest{ return ApiTestClassnameRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -72,7 +72,7 @@ func (a *FakeClassnameTags123ApiService) TestClassname(ctx context.Context) ApiT
// Execute executes the request // Execute executes the request
// @return Client // @return Client
func (a *FakeClassnameTags123ApiService) TestClassnameExecute(r ApiTestClassnameRequest) (*Client, *http.Response, error) { func (a *FakeClassnameTags123APIService) TestClassnameExecute(r ApiTestClassnameRequest) (*Client, *http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodPatch localVarHTTPMethod = http.MethodPatch
localVarPostBody interface{} localVarPostBody interface{}
@@ -80,7 +80,7 @@ func (a *FakeClassnameTags123ApiService) TestClassnameExecute(r ApiTestClassname
localVarReturnValue *Client localVarReturnValue *Client
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeClassnameTags123ApiService.TestClassname") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeClassnameTags123APIService.TestClassname")
if err != nil { if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
} }

View File

@@ -21,7 +21,7 @@ import (
) )
type PetApi interface { type PetAPI interface {
/* /*
AddPet Add a new pet to the store AddPet Add a new pet to the store
@@ -154,12 +154,12 @@ type PetApi interface {
UploadFileWithRequiredFileExecute(r ApiUploadFileWithRequiredFileRequest) (*ApiResponse, *http.Response, error) UploadFileWithRequiredFileExecute(r ApiUploadFileWithRequiredFileRequest) (*ApiResponse, *http.Response, error)
} }
// PetApiService PetApi service // PetAPIService PetAPI service
type PetApiService service type PetAPIService service
type ApiAddPetRequest struct { type ApiAddPetRequest struct {
ctx context.Context ctx context.Context
ApiService PetApi ApiService PetAPI
pet *Pet pet *Pet
} }
@@ -181,7 +181,7 @@ AddPet Add a new pet to the store
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiAddPetRequest @return ApiAddPetRequest
*/ */
func (a *PetApiService) AddPet(ctx context.Context) ApiAddPetRequest { func (a *PetAPIService) AddPet(ctx context.Context) ApiAddPetRequest {
return ApiAddPetRequest{ return ApiAddPetRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -189,14 +189,14 @@ func (a *PetApiService) AddPet(ctx context.Context) ApiAddPetRequest {
} }
// Execute executes the request // Execute executes the request
func (a *PetApiService) AddPetExecute(r ApiAddPetRequest) (*http.Response, error) { func (a *PetAPIService) AddPetExecute(r ApiAddPetRequest) (*http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodPost localVarHTTPMethod = http.MethodPost
localVarPostBody interface{} localVarPostBody interface{}
formFiles []formFile formFiles []formFile
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.AddPet") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetAPIService.AddPet")
if err != nil { if err != nil {
return nil, &GenericOpenAPIError{error: err.Error()} return nil, &GenericOpenAPIError{error: err.Error()}
} }
@@ -259,7 +259,7 @@ func (a *PetApiService) AddPetExecute(r ApiAddPetRequest) (*http.Response, error
type ApiDeletePetRequest struct { type ApiDeletePetRequest struct {
ctx context.Context ctx context.Context
ApiService PetApi ApiService PetAPI
petId int64 petId int64
apiKey *string apiKey *string
} }
@@ -282,7 +282,7 @@ DeletePet Deletes a pet
@param petId Pet id to delete @param petId Pet id to delete
@return ApiDeletePetRequest @return ApiDeletePetRequest
*/ */
func (a *PetApiService) DeletePet(ctx context.Context, petId int64) ApiDeletePetRequest { func (a *PetAPIService) DeletePet(ctx context.Context, petId int64) ApiDeletePetRequest {
return ApiDeletePetRequest{ return ApiDeletePetRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -291,14 +291,14 @@ func (a *PetApiService) DeletePet(ctx context.Context, petId int64) ApiDeletePet
} }
// Execute executes the request // Execute executes the request
func (a *PetApiService) DeletePetExecute(r ApiDeletePetRequest) (*http.Response, error) { func (a *PetAPIService) DeletePetExecute(r ApiDeletePetRequest) (*http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodDelete localVarHTTPMethod = http.MethodDelete
localVarPostBody interface{} localVarPostBody interface{}
formFiles []formFile formFiles []formFile
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.DeletePet") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetAPIService.DeletePet")
if err != nil { if err != nil {
return nil, &GenericOpenAPIError{error: err.Error()} return nil, &GenericOpenAPIError{error: err.Error()}
} }
@@ -360,7 +360,7 @@ func (a *PetApiService) DeletePetExecute(r ApiDeletePetRequest) (*http.Response,
type ApiFindPetsByStatusRequest struct { type ApiFindPetsByStatusRequest struct {
ctx context.Context ctx context.Context
ApiService PetApi ApiService PetAPI
status *[]string status *[]string
} }
@@ -383,7 +383,7 @@ Multiple status values can be provided with comma separated strings
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiFindPetsByStatusRequest @return ApiFindPetsByStatusRequest
*/ */
func (a *PetApiService) FindPetsByStatus(ctx context.Context) ApiFindPetsByStatusRequest { func (a *PetAPIService) FindPetsByStatus(ctx context.Context) ApiFindPetsByStatusRequest {
return ApiFindPetsByStatusRequest{ return ApiFindPetsByStatusRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -392,7 +392,7 @@ func (a *PetApiService) FindPetsByStatus(ctx context.Context) ApiFindPetsByStatu
// Execute executes the request // Execute executes the request
// @return []Pet // @return []Pet
func (a *PetApiService) FindPetsByStatusExecute(r ApiFindPetsByStatusRequest) ([]Pet, *http.Response, error) { func (a *PetAPIService) FindPetsByStatusExecute(r ApiFindPetsByStatusRequest) ([]Pet, *http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodGet localVarHTTPMethod = http.MethodGet
localVarPostBody interface{} localVarPostBody interface{}
@@ -400,7 +400,7 @@ func (a *PetApiService) FindPetsByStatusExecute(r ApiFindPetsByStatusRequest) ([
localVarReturnValue []Pet localVarReturnValue []Pet
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.FindPetsByStatus") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetAPIService.FindPetsByStatus")
if err != nil { if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
} }
@@ -471,7 +471,7 @@ func (a *PetApiService) FindPetsByStatusExecute(r ApiFindPetsByStatusRequest) ([
type ApiFindPetsByTagsRequest struct { type ApiFindPetsByTagsRequest struct {
ctx context.Context ctx context.Context
ApiService PetApi ApiService PetAPI
tags *[]string tags *[]string
} }
@@ -495,7 +495,7 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3
Deprecated Deprecated
*/ */
func (a *PetApiService) FindPetsByTags(ctx context.Context) ApiFindPetsByTagsRequest { func (a *PetAPIService) FindPetsByTags(ctx context.Context) ApiFindPetsByTagsRequest {
return ApiFindPetsByTagsRequest{ return ApiFindPetsByTagsRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -505,7 +505,7 @@ func (a *PetApiService) FindPetsByTags(ctx context.Context) ApiFindPetsByTagsReq
// Execute executes the request // Execute executes the request
// @return []Pet // @return []Pet
// Deprecated // Deprecated
func (a *PetApiService) FindPetsByTagsExecute(r ApiFindPetsByTagsRequest) ([]Pet, *http.Response, error) { func (a *PetAPIService) FindPetsByTagsExecute(r ApiFindPetsByTagsRequest) ([]Pet, *http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodGet localVarHTTPMethod = http.MethodGet
localVarPostBody interface{} localVarPostBody interface{}
@@ -513,7 +513,7 @@ func (a *PetApiService) FindPetsByTagsExecute(r ApiFindPetsByTagsRequest) ([]Pet
localVarReturnValue []Pet localVarReturnValue []Pet
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.FindPetsByTags") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetAPIService.FindPetsByTags")
if err != nil { if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
} }
@@ -584,7 +584,7 @@ func (a *PetApiService) FindPetsByTagsExecute(r ApiFindPetsByTagsRequest) ([]Pet
type ApiGetPetByIdRequest struct { type ApiGetPetByIdRequest struct {
ctx context.Context ctx context.Context
ApiService PetApi ApiService PetAPI
petId int64 petId int64
} }
@@ -601,7 +601,7 @@ Returns a single pet
@param petId ID of pet to return @param petId ID of pet to return
@return ApiGetPetByIdRequest @return ApiGetPetByIdRequest
*/ */
func (a *PetApiService) GetPetById(ctx context.Context, petId int64) ApiGetPetByIdRequest { func (a *PetAPIService) GetPetById(ctx context.Context, petId int64) ApiGetPetByIdRequest {
return ApiGetPetByIdRequest{ return ApiGetPetByIdRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -611,7 +611,7 @@ func (a *PetApiService) GetPetById(ctx context.Context, petId int64) ApiGetPetBy
// Execute executes the request // Execute executes the request
// @return Pet // @return Pet
func (a *PetApiService) GetPetByIdExecute(r ApiGetPetByIdRequest) (*Pet, *http.Response, error) { func (a *PetAPIService) GetPetByIdExecute(r ApiGetPetByIdRequest) (*Pet, *http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodGet localVarHTTPMethod = http.MethodGet
localVarPostBody interface{} localVarPostBody interface{}
@@ -619,7 +619,7 @@ func (a *PetApiService) GetPetByIdExecute(r ApiGetPetByIdRequest) (*Pet, *http.R
localVarReturnValue *Pet localVarReturnValue *Pet
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.GetPetById") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetAPIService.GetPetById")
if err != nil { if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
} }
@@ -701,7 +701,7 @@ func (a *PetApiService) GetPetByIdExecute(r ApiGetPetByIdRequest) (*Pet, *http.R
type ApiUpdatePetRequest struct { type ApiUpdatePetRequest struct {
ctx context.Context ctx context.Context
ApiService PetApi ApiService PetAPI
pet *Pet pet *Pet
} }
@@ -723,7 +723,7 @@ UpdatePet Update an existing pet
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiUpdatePetRequest @return ApiUpdatePetRequest
*/ */
func (a *PetApiService) UpdatePet(ctx context.Context) ApiUpdatePetRequest { func (a *PetAPIService) UpdatePet(ctx context.Context) ApiUpdatePetRequest {
return ApiUpdatePetRequest{ return ApiUpdatePetRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -731,14 +731,14 @@ func (a *PetApiService) UpdatePet(ctx context.Context) ApiUpdatePetRequest {
} }
// Execute executes the request // Execute executes the request
func (a *PetApiService) UpdatePetExecute(r ApiUpdatePetRequest) (*http.Response, error) { func (a *PetAPIService) UpdatePetExecute(r ApiUpdatePetRequest) (*http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodPut localVarHTTPMethod = http.MethodPut
localVarPostBody interface{} localVarPostBody interface{}
formFiles []formFile formFiles []formFile
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.UpdatePet") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetAPIService.UpdatePet")
if err != nil { if err != nil {
return nil, &GenericOpenAPIError{error: err.Error()} return nil, &GenericOpenAPIError{error: err.Error()}
} }
@@ -801,7 +801,7 @@ func (a *PetApiService) UpdatePetExecute(r ApiUpdatePetRequest) (*http.Response,
type ApiUpdatePetWithFormRequest struct { type ApiUpdatePetWithFormRequest struct {
ctx context.Context ctx context.Context
ApiService PetApi ApiService PetAPI
petId int64 petId int64
name *string name *string
status *string status *string
@@ -832,7 +832,7 @@ UpdatePetWithForm Updates a pet in the store with form data
@param petId ID of pet that needs to be updated @param petId ID of pet that needs to be updated
@return ApiUpdatePetWithFormRequest @return ApiUpdatePetWithFormRequest
*/ */
func (a *PetApiService) UpdatePetWithForm(ctx context.Context, petId int64) ApiUpdatePetWithFormRequest { func (a *PetAPIService) UpdatePetWithForm(ctx context.Context, petId int64) ApiUpdatePetWithFormRequest {
return ApiUpdatePetWithFormRequest{ return ApiUpdatePetWithFormRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -841,14 +841,14 @@ func (a *PetApiService) UpdatePetWithForm(ctx context.Context, petId int64) ApiU
} }
// Execute executes the request // Execute executes the request
func (a *PetApiService) UpdatePetWithFormExecute(r ApiUpdatePetWithFormRequest) (*http.Response, error) { func (a *PetAPIService) UpdatePetWithFormExecute(r ApiUpdatePetWithFormRequest) (*http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodPost localVarHTTPMethod = http.MethodPost
localVarPostBody interface{} localVarPostBody interface{}
formFiles []formFile formFiles []formFile
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.UpdatePetWithForm") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetAPIService.UpdatePetWithForm")
if err != nil { if err != nil {
return nil, &GenericOpenAPIError{error: err.Error()} return nil, &GenericOpenAPIError{error: err.Error()}
} }
@@ -913,7 +913,7 @@ func (a *PetApiService) UpdatePetWithFormExecute(r ApiUpdatePetWithFormRequest)
type ApiUploadFileRequest struct { type ApiUploadFileRequest struct {
ctx context.Context ctx context.Context
ApiService PetApi ApiService PetAPI
petId int64 petId int64
additionalMetadata *string additionalMetadata *string
file *os.File file *os.File
@@ -944,7 +944,7 @@ UploadFile uploads an image
@param petId ID of pet to update @param petId ID of pet to update
@return ApiUploadFileRequest @return ApiUploadFileRequest
*/ */
func (a *PetApiService) UploadFile(ctx context.Context, petId int64) ApiUploadFileRequest { func (a *PetAPIService) UploadFile(ctx context.Context, petId int64) ApiUploadFileRequest {
return ApiUploadFileRequest{ return ApiUploadFileRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -954,7 +954,7 @@ func (a *PetApiService) UploadFile(ctx context.Context, petId int64) ApiUploadFi
// Execute executes the request // Execute executes the request
// @return ApiResponse // @return ApiResponse
func (a *PetApiService) UploadFileExecute(r ApiUploadFileRequest) (*ApiResponse, *http.Response, error) { func (a *PetAPIService) UploadFileExecute(r ApiUploadFileRequest) (*ApiResponse, *http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodPost localVarHTTPMethod = http.MethodPost
localVarPostBody interface{} localVarPostBody interface{}
@@ -962,7 +962,7 @@ func (a *PetApiService) UploadFileExecute(r ApiUploadFileRequest) (*ApiResponse,
localVarReturnValue *ApiResponse localVarReturnValue *ApiResponse
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.UploadFile") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetAPIService.UploadFile")
if err != nil { if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
} }
@@ -1050,7 +1050,7 @@ func (a *PetApiService) UploadFileExecute(r ApiUploadFileRequest) (*ApiResponse,
type ApiUploadFileWithRequiredFileRequest struct { type ApiUploadFileWithRequiredFileRequest struct {
ctx context.Context ctx context.Context
ApiService PetApi ApiService PetAPI
petId int64 petId int64
requiredFile *os.File requiredFile *os.File
additionalMetadata *string additionalMetadata *string
@@ -1081,7 +1081,7 @@ UploadFileWithRequiredFile uploads an image (required)
@param petId ID of pet to update @param petId ID of pet to update
@return ApiUploadFileWithRequiredFileRequest @return ApiUploadFileWithRequiredFileRequest
*/ */
func (a *PetApiService) UploadFileWithRequiredFile(ctx context.Context, petId int64) ApiUploadFileWithRequiredFileRequest { func (a *PetAPIService) UploadFileWithRequiredFile(ctx context.Context, petId int64) ApiUploadFileWithRequiredFileRequest {
return ApiUploadFileWithRequiredFileRequest{ return ApiUploadFileWithRequiredFileRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -1091,7 +1091,7 @@ func (a *PetApiService) UploadFileWithRequiredFile(ctx context.Context, petId in
// Execute executes the request // Execute executes the request
// @return ApiResponse // @return ApiResponse
func (a *PetApiService) UploadFileWithRequiredFileExecute(r ApiUploadFileWithRequiredFileRequest) (*ApiResponse, *http.Response, error) { func (a *PetAPIService) UploadFileWithRequiredFileExecute(r ApiUploadFileWithRequiredFileRequest) (*ApiResponse, *http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodPost localVarHTTPMethod = http.MethodPost
localVarPostBody interface{} localVarPostBody interface{}
@@ -1099,7 +1099,7 @@ func (a *PetApiService) UploadFileWithRequiredFileExecute(r ApiUploadFileWithReq
localVarReturnValue *ApiResponse localVarReturnValue *ApiResponse
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.UploadFileWithRequiredFile") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetAPIService.UploadFileWithRequiredFile")
if err != nil { if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
} }

View File

@@ -20,7 +20,7 @@ import (
) )
type StoreApi interface { type StoreAPI interface {
/* /*
DeleteOrder Delete purchase order by ID DeleteOrder Delete purchase order by ID
@@ -80,12 +80,12 @@ type StoreApi interface {
PlaceOrderExecute(r ApiPlaceOrderRequest) (*Order, *http.Response, error) PlaceOrderExecute(r ApiPlaceOrderRequest) (*Order, *http.Response, error)
} }
// StoreApiService StoreApi service // StoreAPIService StoreAPI service
type StoreApiService service type StoreAPIService service
type ApiDeleteOrderRequest struct { type ApiDeleteOrderRequest struct {
ctx context.Context ctx context.Context
ApiService StoreApi ApiService StoreAPI
orderId string orderId string
} }
@@ -102,7 +102,7 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or non
@param orderId ID of the order that needs to be deleted @param orderId ID of the order that needs to be deleted
@return ApiDeleteOrderRequest @return ApiDeleteOrderRequest
*/ */
func (a *StoreApiService) DeleteOrder(ctx context.Context, orderId string) ApiDeleteOrderRequest { func (a *StoreAPIService) DeleteOrder(ctx context.Context, orderId string) ApiDeleteOrderRequest {
return ApiDeleteOrderRequest{ return ApiDeleteOrderRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -111,14 +111,14 @@ func (a *StoreApiService) DeleteOrder(ctx context.Context, orderId string) ApiDe
} }
// Execute executes the request // Execute executes the request
func (a *StoreApiService) DeleteOrderExecute(r ApiDeleteOrderRequest) (*http.Response, error) { func (a *StoreAPIService) DeleteOrderExecute(r ApiDeleteOrderRequest) (*http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodDelete localVarHTTPMethod = http.MethodDelete
localVarPostBody interface{} localVarPostBody interface{}
formFiles []formFile formFiles []formFile
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StoreApiService.DeleteOrder") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StoreAPIService.DeleteOrder")
if err != nil { if err != nil {
return nil, &GenericOpenAPIError{error: err.Error()} return nil, &GenericOpenAPIError{error: err.Error()}
} }
@@ -177,7 +177,7 @@ func (a *StoreApiService) DeleteOrderExecute(r ApiDeleteOrderRequest) (*http.Res
type ApiGetInventoryRequest struct { type ApiGetInventoryRequest struct {
ctx context.Context ctx context.Context
ApiService StoreApi ApiService StoreAPI
} }
func (r ApiGetInventoryRequest) Execute() (map[string]int32, *http.Response, error) { func (r ApiGetInventoryRequest) Execute() (map[string]int32, *http.Response, error) {
@@ -192,7 +192,7 @@ Returns a map of status codes to quantities
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiGetInventoryRequest @return ApiGetInventoryRequest
*/ */
func (a *StoreApiService) GetInventory(ctx context.Context) ApiGetInventoryRequest { func (a *StoreAPIService) GetInventory(ctx context.Context) ApiGetInventoryRequest {
return ApiGetInventoryRequest{ return ApiGetInventoryRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -201,7 +201,7 @@ func (a *StoreApiService) GetInventory(ctx context.Context) ApiGetInventoryReque
// Execute executes the request // Execute executes the request
// @return map[string]int32 // @return map[string]int32
func (a *StoreApiService) GetInventoryExecute(r ApiGetInventoryRequest) (map[string]int32, *http.Response, error) { func (a *StoreAPIService) GetInventoryExecute(r ApiGetInventoryRequest) (map[string]int32, *http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodGet localVarHTTPMethod = http.MethodGet
localVarPostBody interface{} localVarPostBody interface{}
@@ -209,7 +209,7 @@ func (a *StoreApiService) GetInventoryExecute(r ApiGetInventoryRequest) (map[str
localVarReturnValue map[string]int32 localVarReturnValue map[string]int32
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StoreApiService.GetInventory") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StoreAPIService.GetInventory")
if err != nil { if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
} }
@@ -290,7 +290,7 @@ func (a *StoreApiService) GetInventoryExecute(r ApiGetInventoryRequest) (map[str
type ApiGetOrderByIdRequest struct { type ApiGetOrderByIdRequest struct {
ctx context.Context ctx context.Context
ApiService StoreApi ApiService StoreAPI
orderId int64 orderId int64
} }
@@ -307,7 +307,7 @@ For valid response try integer IDs with value <= 5 or > 10. Other values will ge
@param orderId ID of pet that needs to be fetched @param orderId ID of pet that needs to be fetched
@return ApiGetOrderByIdRequest @return ApiGetOrderByIdRequest
*/ */
func (a *StoreApiService) GetOrderById(ctx context.Context, orderId int64) ApiGetOrderByIdRequest { func (a *StoreAPIService) GetOrderById(ctx context.Context, orderId int64) ApiGetOrderByIdRequest {
return ApiGetOrderByIdRequest{ return ApiGetOrderByIdRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -317,7 +317,7 @@ func (a *StoreApiService) GetOrderById(ctx context.Context, orderId int64) ApiGe
// Execute executes the request // Execute executes the request
// @return Order // @return Order
func (a *StoreApiService) GetOrderByIdExecute(r ApiGetOrderByIdRequest) (*Order, *http.Response, error) { func (a *StoreAPIService) GetOrderByIdExecute(r ApiGetOrderByIdRequest) (*Order, *http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodGet localVarHTTPMethod = http.MethodGet
localVarPostBody interface{} localVarPostBody interface{}
@@ -325,7 +325,7 @@ func (a *StoreApiService) GetOrderByIdExecute(r ApiGetOrderByIdRequest) (*Order,
localVarReturnValue *Order localVarReturnValue *Order
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StoreApiService.GetOrderById") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StoreAPIService.GetOrderById")
if err != nil { if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
} }
@@ -399,7 +399,7 @@ func (a *StoreApiService) GetOrderByIdExecute(r ApiGetOrderByIdRequest) (*Order,
type ApiPlaceOrderRequest struct { type ApiPlaceOrderRequest struct {
ctx context.Context ctx context.Context
ApiService StoreApi ApiService StoreAPI
order *Order order *Order
} }
@@ -421,7 +421,7 @@ PlaceOrder Place an order for a pet
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiPlaceOrderRequest @return ApiPlaceOrderRequest
*/ */
func (a *StoreApiService) PlaceOrder(ctx context.Context) ApiPlaceOrderRequest { func (a *StoreAPIService) PlaceOrder(ctx context.Context) ApiPlaceOrderRequest {
return ApiPlaceOrderRequest{ return ApiPlaceOrderRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -430,7 +430,7 @@ func (a *StoreApiService) PlaceOrder(ctx context.Context) ApiPlaceOrderRequest {
// Execute executes the request // Execute executes the request
// @return Order // @return Order
func (a *StoreApiService) PlaceOrderExecute(r ApiPlaceOrderRequest) (*Order, *http.Response, error) { func (a *StoreAPIService) PlaceOrderExecute(r ApiPlaceOrderRequest) (*Order, *http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodPost localVarHTTPMethod = http.MethodPost
localVarPostBody interface{} localVarPostBody interface{}
@@ -438,7 +438,7 @@ func (a *StoreApiService) PlaceOrderExecute(r ApiPlaceOrderRequest) (*Order, *ht
localVarReturnValue *Order localVarReturnValue *Order
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StoreApiService.PlaceOrder") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StoreAPIService.PlaceOrder")
if err != nil { if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
} }

View File

@@ -20,7 +20,7 @@ import (
) )
type UserApi interface { type UserAPI interface {
/* /*
CreateUser Create user CreateUser Create user
@@ -132,12 +132,12 @@ type UserApi interface {
UpdateUserExecute(r ApiUpdateUserRequest) (*http.Response, error) UpdateUserExecute(r ApiUpdateUserRequest) (*http.Response, error)
} }
// UserApiService UserApi service // UserAPIService UserAPI service
type UserApiService service type UserAPIService service
type ApiCreateUserRequest struct { type ApiCreateUserRequest struct {
ctx context.Context ctx context.Context
ApiService UserApi ApiService UserAPI
user *User user *User
} }
@@ -159,7 +159,7 @@ This can only be done by the logged in user.
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiCreateUserRequest @return ApiCreateUserRequest
*/ */
func (a *UserApiService) CreateUser(ctx context.Context) ApiCreateUserRequest { func (a *UserAPIService) CreateUser(ctx context.Context) ApiCreateUserRequest {
return ApiCreateUserRequest{ return ApiCreateUserRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -167,14 +167,14 @@ func (a *UserApiService) CreateUser(ctx context.Context) ApiCreateUserRequest {
} }
// Execute executes the request // Execute executes the request
func (a *UserApiService) CreateUserExecute(r ApiCreateUserRequest) (*http.Response, error) { func (a *UserAPIService) CreateUserExecute(r ApiCreateUserRequest) (*http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodPost localVarHTTPMethod = http.MethodPost
localVarPostBody interface{} localVarPostBody interface{}
formFiles []formFile formFiles []formFile
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.CreateUser") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserAPIService.CreateUser")
if err != nil { if err != nil {
return nil, &GenericOpenAPIError{error: err.Error()} return nil, &GenericOpenAPIError{error: err.Error()}
} }
@@ -237,7 +237,7 @@ func (a *UserApiService) CreateUserExecute(r ApiCreateUserRequest) (*http.Respon
type ApiCreateUsersWithArrayInputRequest struct { type ApiCreateUsersWithArrayInputRequest struct {
ctx context.Context ctx context.Context
ApiService UserApi ApiService UserAPI
user *[]User user *[]User
} }
@@ -259,7 +259,7 @@ CreateUsersWithArrayInput Creates list of users with given input array
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiCreateUsersWithArrayInputRequest @return ApiCreateUsersWithArrayInputRequest
*/ */
func (a *UserApiService) CreateUsersWithArrayInput(ctx context.Context) ApiCreateUsersWithArrayInputRequest { func (a *UserAPIService) CreateUsersWithArrayInput(ctx context.Context) ApiCreateUsersWithArrayInputRequest {
return ApiCreateUsersWithArrayInputRequest{ return ApiCreateUsersWithArrayInputRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -267,14 +267,14 @@ func (a *UserApiService) CreateUsersWithArrayInput(ctx context.Context) ApiCreat
} }
// Execute executes the request // Execute executes the request
func (a *UserApiService) CreateUsersWithArrayInputExecute(r ApiCreateUsersWithArrayInputRequest) (*http.Response, error) { func (a *UserAPIService) CreateUsersWithArrayInputExecute(r ApiCreateUsersWithArrayInputRequest) (*http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodPost localVarHTTPMethod = http.MethodPost
localVarPostBody interface{} localVarPostBody interface{}
formFiles []formFile formFiles []formFile
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.CreateUsersWithArrayInput") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserAPIService.CreateUsersWithArrayInput")
if err != nil { if err != nil {
return nil, &GenericOpenAPIError{error: err.Error()} return nil, &GenericOpenAPIError{error: err.Error()}
} }
@@ -337,7 +337,7 @@ func (a *UserApiService) CreateUsersWithArrayInputExecute(r ApiCreateUsersWithAr
type ApiCreateUsersWithListInputRequest struct { type ApiCreateUsersWithListInputRequest struct {
ctx context.Context ctx context.Context
ApiService UserApi ApiService UserAPI
user *[]User user *[]User
} }
@@ -359,7 +359,7 @@ CreateUsersWithListInput Creates list of users with given input array
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiCreateUsersWithListInputRequest @return ApiCreateUsersWithListInputRequest
*/ */
func (a *UserApiService) CreateUsersWithListInput(ctx context.Context) ApiCreateUsersWithListInputRequest { func (a *UserAPIService) CreateUsersWithListInput(ctx context.Context) ApiCreateUsersWithListInputRequest {
return ApiCreateUsersWithListInputRequest{ return ApiCreateUsersWithListInputRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -367,14 +367,14 @@ func (a *UserApiService) CreateUsersWithListInput(ctx context.Context) ApiCreate
} }
// Execute executes the request // Execute executes the request
func (a *UserApiService) CreateUsersWithListInputExecute(r ApiCreateUsersWithListInputRequest) (*http.Response, error) { func (a *UserAPIService) CreateUsersWithListInputExecute(r ApiCreateUsersWithListInputRequest) (*http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodPost localVarHTTPMethod = http.MethodPost
localVarPostBody interface{} localVarPostBody interface{}
formFiles []formFile formFiles []formFile
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.CreateUsersWithListInput") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserAPIService.CreateUsersWithListInput")
if err != nil { if err != nil {
return nil, &GenericOpenAPIError{error: err.Error()} return nil, &GenericOpenAPIError{error: err.Error()}
} }
@@ -437,7 +437,7 @@ func (a *UserApiService) CreateUsersWithListInputExecute(r ApiCreateUsersWithLis
type ApiDeleteUserRequest struct { type ApiDeleteUserRequest struct {
ctx context.Context ctx context.Context
ApiService UserApi ApiService UserAPI
username string username string
} }
@@ -454,7 +454,7 @@ This can only be done by the logged in user.
@param username The name that needs to be deleted @param username The name that needs to be deleted
@return ApiDeleteUserRequest @return ApiDeleteUserRequest
*/ */
func (a *UserApiService) DeleteUser(ctx context.Context, username string) ApiDeleteUserRequest { func (a *UserAPIService) DeleteUser(ctx context.Context, username string) ApiDeleteUserRequest {
return ApiDeleteUserRequest{ return ApiDeleteUserRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -463,14 +463,14 @@ func (a *UserApiService) DeleteUser(ctx context.Context, username string) ApiDel
} }
// Execute executes the request // Execute executes the request
func (a *UserApiService) DeleteUserExecute(r ApiDeleteUserRequest) (*http.Response, error) { func (a *UserAPIService) DeleteUserExecute(r ApiDeleteUserRequest) (*http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodDelete localVarHTTPMethod = http.MethodDelete
localVarPostBody interface{} localVarPostBody interface{}
formFiles []formFile formFiles []formFile
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.DeleteUser") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserAPIService.DeleteUser")
if err != nil { if err != nil {
return nil, &GenericOpenAPIError{error: err.Error()} return nil, &GenericOpenAPIError{error: err.Error()}
} }
@@ -529,7 +529,7 @@ func (a *UserApiService) DeleteUserExecute(r ApiDeleteUserRequest) (*http.Respon
type ApiGetUserByNameRequest struct { type ApiGetUserByNameRequest struct {
ctx context.Context ctx context.Context
ApiService UserApi ApiService UserAPI
username string username string
} }
@@ -546,7 +546,7 @@ GetUserByName Get user by user name
@param username The name that needs to be fetched. Use user1 for testing. @param username The name that needs to be fetched. Use user1 for testing.
@return ApiGetUserByNameRequest @return ApiGetUserByNameRequest
*/ */
func (a *UserApiService) GetUserByName(ctx context.Context, username string) ApiGetUserByNameRequest { func (a *UserAPIService) GetUserByName(ctx context.Context, username string) ApiGetUserByNameRequest {
return ApiGetUserByNameRequest{ return ApiGetUserByNameRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -556,7 +556,7 @@ func (a *UserApiService) GetUserByName(ctx context.Context, username string) Api
// Execute executes the request // Execute executes the request
// @return User // @return User
func (a *UserApiService) GetUserByNameExecute(r ApiGetUserByNameRequest) (*User, *http.Response, error) { func (a *UserAPIService) GetUserByNameExecute(r ApiGetUserByNameRequest) (*User, *http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodGet localVarHTTPMethod = http.MethodGet
localVarPostBody interface{} localVarPostBody interface{}
@@ -564,7 +564,7 @@ func (a *UserApiService) GetUserByNameExecute(r ApiGetUserByNameRequest) (*User,
localVarReturnValue *User localVarReturnValue *User
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.GetUserByName") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserAPIService.GetUserByName")
if err != nil { if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
} }
@@ -632,7 +632,7 @@ func (a *UserApiService) GetUserByNameExecute(r ApiGetUserByNameRequest) (*User,
type ApiLoginUserRequest struct { type ApiLoginUserRequest struct {
ctx context.Context ctx context.Context
ApiService UserApi ApiService UserAPI
username *string username *string
password *string password *string
} }
@@ -661,7 +661,7 @@ LoginUser Logs user into the system
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiLoginUserRequest @return ApiLoginUserRequest
*/ */
func (a *UserApiService) LoginUser(ctx context.Context) ApiLoginUserRequest { func (a *UserAPIService) LoginUser(ctx context.Context) ApiLoginUserRequest {
return ApiLoginUserRequest{ return ApiLoginUserRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -670,7 +670,7 @@ func (a *UserApiService) LoginUser(ctx context.Context) ApiLoginUserRequest {
// Execute executes the request // Execute executes the request
// @return string // @return string
func (a *UserApiService) LoginUserExecute(r ApiLoginUserRequest) (string, *http.Response, error) { func (a *UserAPIService) LoginUserExecute(r ApiLoginUserRequest) (string, *http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodGet localVarHTTPMethod = http.MethodGet
localVarPostBody interface{} localVarPostBody interface{}
@@ -678,7 +678,7 @@ func (a *UserApiService) LoginUserExecute(r ApiLoginUserRequest) (string, *http.
localVarReturnValue string localVarReturnValue string
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.LoginUser") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserAPIService.LoginUser")
if err != nil { if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
} }
@@ -753,7 +753,7 @@ func (a *UserApiService) LoginUserExecute(r ApiLoginUserRequest) (string, *http.
type ApiLogoutUserRequest struct { type ApiLogoutUserRequest struct {
ctx context.Context ctx context.Context
ApiService UserApi ApiService UserAPI
} }
func (r ApiLogoutUserRequest) Execute() (*http.Response, error) { func (r ApiLogoutUserRequest) Execute() (*http.Response, error) {
@@ -768,7 +768,7 @@ LogoutUser Logs out current logged in user session
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiLogoutUserRequest @return ApiLogoutUserRequest
*/ */
func (a *UserApiService) LogoutUser(ctx context.Context) ApiLogoutUserRequest { func (a *UserAPIService) LogoutUser(ctx context.Context) ApiLogoutUserRequest {
return ApiLogoutUserRequest{ return ApiLogoutUserRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -776,14 +776,14 @@ func (a *UserApiService) LogoutUser(ctx context.Context) ApiLogoutUserRequest {
} }
// Execute executes the request // Execute executes the request
func (a *UserApiService) LogoutUserExecute(r ApiLogoutUserRequest) (*http.Response, error) { func (a *UserAPIService) LogoutUserExecute(r ApiLogoutUserRequest) (*http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodGet localVarHTTPMethod = http.MethodGet
localVarPostBody interface{} localVarPostBody interface{}
formFiles []formFile formFiles []formFile
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.LogoutUser") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserAPIService.LogoutUser")
if err != nil { if err != nil {
return nil, &GenericOpenAPIError{error: err.Error()} return nil, &GenericOpenAPIError{error: err.Error()}
} }
@@ -841,7 +841,7 @@ func (a *UserApiService) LogoutUserExecute(r ApiLogoutUserRequest) (*http.Respon
type ApiUpdateUserRequest struct { type ApiUpdateUserRequest struct {
ctx context.Context ctx context.Context
ApiService UserApi ApiService UserAPI
username string username string
user *User user *User
} }
@@ -865,7 +865,7 @@ This can only be done by the logged in user.
@param username name that need to be deleted @param username name that need to be deleted
@return ApiUpdateUserRequest @return ApiUpdateUserRequest
*/ */
func (a *UserApiService) UpdateUser(ctx context.Context, username string) ApiUpdateUserRequest { func (a *UserAPIService) UpdateUser(ctx context.Context, username string) ApiUpdateUserRequest {
return ApiUpdateUserRequest{ return ApiUpdateUserRequest{
ApiService: a, ApiService: a,
ctx: ctx, ctx: ctx,
@@ -874,14 +874,14 @@ func (a *UserApiService) UpdateUser(ctx context.Context, username string) ApiUpd
} }
// Execute executes the request // Execute executes the request
func (a *UserApiService) UpdateUserExecute(r ApiUpdateUserRequest) (*http.Response, error) { func (a *UserAPIService) UpdateUserExecute(r ApiUpdateUserRequest) (*http.Response, error) {
var ( var (
localVarHTTPMethod = http.MethodPut localVarHTTPMethod = http.MethodPut
localVarPostBody interface{} localVarPostBody interface{}
formFiles []formFile formFiles []formFile
) )
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.UpdateUser") localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserAPIService.UpdateUser")
if err != nil { if err != nil {
return nil, &GenericOpenAPIError{error: err.Error()} return nil, &GenericOpenAPIError{error: err.Error()}
} }

View File

@@ -50,19 +50,19 @@ type APIClient struct {
// API Services // API Services
AnotherFakeApi AnotherFakeApi AnotherFakeAPI AnotherFakeAPI
DefaultApi DefaultApi DefaultAPI DefaultAPI
FakeApi FakeApi FakeAPI FakeAPI
FakeClassnameTags123Api FakeClassnameTags123Api FakeClassnameTags123API FakeClassnameTags123API
PetApi PetApi PetAPI PetAPI
StoreApi StoreApi StoreAPI StoreAPI
UserApi UserApi UserAPI UserAPI
} }
type service struct { type service struct {
@@ -81,13 +81,13 @@ func NewAPIClient(cfg *Configuration) *APIClient {
c.common.client = c c.common.client = c
// API Services // API Services
c.AnotherFakeApi = (*AnotherFakeApiService)(&c.common) c.AnotherFakeAPI = (*AnotherFakeAPIService)(&c.common)
c.DefaultApi = (*DefaultApiService)(&c.common) c.DefaultAPI = (*DefaultAPIService)(&c.common)
c.FakeApi = (*FakeApiService)(&c.common) c.FakeAPI = (*FakeAPIService)(&c.common)
c.FakeClassnameTags123Api = (*FakeClassnameTags123ApiService)(&c.common) c.FakeClassnameTags123API = (*FakeClassnameTags123APIService)(&c.common)
c.PetApi = (*PetApiService)(&c.common) c.PetAPI = (*PetAPIService)(&c.common)
c.StoreApi = (*StoreApiService)(&c.common) c.StoreAPI = (*StoreAPIService)(&c.common)
c.UserApi = (*UserApiService)(&c.common) c.UserAPI = (*UserAPIService)(&c.common)
return c return c
} }

View File

@@ -147,7 +147,7 @@ func NewConfiguration() *Configuration {
}, },
}, },
OperationServers: map[string]ServerConfigurations{ OperationServers: map[string]ServerConfigurations{
"PetApiService.AddPet": { "PetAPIService.AddPet": {
{ {
URL: "http://petstore.swagger.io/v2", URL: "http://petstore.swagger.io/v2",
Description: "No description provided", Description: "No description provided",
@@ -157,7 +157,7 @@ func NewConfiguration() *Configuration {
Description: "No description provided", Description: "No description provided",
}, },
}, },
"PetApiService.UpdatePet": { "PetAPIService.UpdatePet": {
{ {
URL: "http://petstore.swagger.io/v2", URL: "http://petstore.swagger.io/v2",
Description: "No description provided", Description: "No description provided",

View File

@@ -1,10 +1,10 @@
# \AnotherFakeApi # \AnotherFakeAPI
All URIs are relative to *http://petstore.swagger.io:80/v2* All URIs are relative to *http://petstore.swagger.io:80/v2*
Method | HTTP request | Description Method | HTTP request | Description
------------- | ------------- | ------------- ------------- | ------------- | -------------
[**Call123TestSpecialTags**](AnotherFakeApi.md#Call123TestSpecialTags) | **Patch** /another-fake/dummy | To test special tags [**Call123TestSpecialTags**](AnotherFakeAPI.md#Call123TestSpecialTags) | **Patch** /another-fake/dummy | To test special tags
@@ -33,13 +33,13 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AnotherFakeApi.Call123TestSpecialTags(context.Background()).Client(client).Execute() resp, r, err := apiClient.AnotherFakeAPI.Call123TestSpecialTags(context.Background()).Client(client).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AnotherFakeApi.Call123TestSpecialTags``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `AnotherFakeAPI.Call123TestSpecialTags``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
// response from `Call123TestSpecialTags`: Client // response from `Call123TestSpecialTags`: Client
fmt.Fprintf(os.Stdout, "Response from `AnotherFakeApi.Call123TestSpecialTags`: %v\n", resp) fmt.Fprintf(os.Stdout, "Response from `AnotherFakeAPI.Call123TestSpecialTags`: %v\n", resp)
} }
``` ```

View File

@@ -1,10 +1,10 @@
# \DefaultApi # \DefaultAPI
All URIs are relative to *http://petstore.swagger.io:80/v2* All URIs are relative to *http://petstore.swagger.io:80/v2*
Method | HTTP request | Description Method | HTTP request | Description
------------- | ------------- | ------------- ------------- | ------------- | -------------
[**FooGet**](DefaultApi.md#FooGet) | **Get** /foo | [**FooGet**](DefaultAPI.md#FooGet) | **Get** /foo |
@@ -30,13 +30,13 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DefaultApi.FooGet(context.Background()).Execute() resp, r, err := apiClient.DefaultAPI.FooGet(context.Background()).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.FooGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.FooGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
// response from `FooGet`: FooGetDefaultResponse // response from `FooGet`: FooGetDefaultResponse
fmt.Fprintf(os.Stdout, "Response from `DefaultApi.FooGet`: %v\n", resp) fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.FooGet`: %v\n", resp)
} }
``` ```

View File

@@ -1,25 +1,25 @@
# \FakeApi # \FakeAPI
All URIs are relative to *http://petstore.swagger.io:80/v2* All URIs are relative to *http://petstore.swagger.io:80/v2*
Method | HTTP request | Description Method | HTTP request | Description
------------- | ------------- | ------------- ------------- | ------------- | -------------
[**FakeHealthGet**](FakeApi.md#FakeHealthGet) | **Get** /fake/health | Health check endpoint [**FakeHealthGet**](FakeAPI.md#FakeHealthGet) | **Get** /fake/health | Health check endpoint
[**FakeOuterBooleanSerialize**](FakeApi.md#FakeOuterBooleanSerialize) | **Post** /fake/outer/boolean | [**FakeOuterBooleanSerialize**](FakeAPI.md#FakeOuterBooleanSerialize) | **Post** /fake/outer/boolean |
[**FakeOuterCompositeSerialize**](FakeApi.md#FakeOuterCompositeSerialize) | **Post** /fake/outer/composite | [**FakeOuterCompositeSerialize**](FakeAPI.md#FakeOuterCompositeSerialize) | **Post** /fake/outer/composite |
[**FakeOuterNumberSerialize**](FakeApi.md#FakeOuterNumberSerialize) | **Post** /fake/outer/number | [**FakeOuterNumberSerialize**](FakeAPI.md#FakeOuterNumberSerialize) | **Post** /fake/outer/number |
[**FakeOuterStringSerialize**](FakeApi.md#FakeOuterStringSerialize) | **Post** /fake/outer/string | [**FakeOuterStringSerialize**](FakeAPI.md#FakeOuterStringSerialize) | **Post** /fake/outer/string |
[**TestBodyWithFileSchema**](FakeApi.md#TestBodyWithFileSchema) | **Put** /fake/body-with-file-schema | [**TestBodyWithFileSchema**](FakeAPI.md#TestBodyWithFileSchema) | **Put** /fake/body-with-file-schema |
[**TestBodyWithQueryParams**](FakeApi.md#TestBodyWithQueryParams) | **Put** /fake/body-with-query-params | [**TestBodyWithQueryParams**](FakeAPI.md#TestBodyWithQueryParams) | **Put** /fake/body-with-query-params |
[**TestClientModel**](FakeApi.md#TestClientModel) | **Patch** /fake | To test \&quot;client\&quot; model [**TestClientModel**](FakeAPI.md#TestClientModel) | **Patch** /fake | To test \&quot;client\&quot; model
[**TestEndpointParameters**](FakeApi.md#TestEndpointParameters) | **Post** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 [**TestEndpointParameters**](FakeAPI.md#TestEndpointParameters) | **Post** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
[**TestEnumParameters**](FakeApi.md#TestEnumParameters) | **Get** /fake | To test enum parameters [**TestEnumParameters**](FakeAPI.md#TestEnumParameters) | **Get** /fake | To test enum parameters
[**TestGroupParameters**](FakeApi.md#TestGroupParameters) | **Delete** /fake | Fake endpoint to test group parameters (optional) [**TestGroupParameters**](FakeAPI.md#TestGroupParameters) | **Delete** /fake | Fake endpoint to test group parameters (optional)
[**TestInlineAdditionalProperties**](FakeApi.md#TestInlineAdditionalProperties) | **Post** /fake/inline-additionalProperties | test inline additionalProperties [**TestInlineAdditionalProperties**](FakeAPI.md#TestInlineAdditionalProperties) | **Post** /fake/inline-additionalProperties | test inline additionalProperties
[**TestJsonFormData**](FakeApi.md#TestJsonFormData) | **Get** /fake/jsonFormData | test json serialization of form data [**TestJsonFormData**](FakeAPI.md#TestJsonFormData) | **Get** /fake/jsonFormData | test json serialization of form data
[**TestQueryDeepObject**](FakeApi.md#TestQueryDeepObject) | **Get** /fake/deep_object_test | [**TestQueryDeepObject**](FakeAPI.md#TestQueryDeepObject) | **Get** /fake/deep_object_test |
[**TestQueryParameterCollectionFormat**](FakeApi.md#TestQueryParameterCollectionFormat) | **Put** /fake/test-query-parameters | [**TestQueryParameterCollectionFormat**](FakeAPI.md#TestQueryParameterCollectionFormat) | **Put** /fake/test-query-parameters |
[**TestUniqueItemsHeaderAndQueryParameterCollectionFormat**](FakeApi.md#TestUniqueItemsHeaderAndQueryParameterCollectionFormat) | **Put** /fake/test-unique-parameters | [**TestUniqueItemsHeaderAndQueryParameterCollectionFormat**](FakeAPI.md#TestUniqueItemsHeaderAndQueryParameterCollectionFormat) | **Put** /fake/test-unique-parameters |
@@ -45,13 +45,13 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FakeApi.FakeHealthGet(context.Background()).Execute() resp, r, err := apiClient.FakeAPI.FakeHealthGet(context.Background()).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.FakeHealthGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `FakeAPI.FakeHealthGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
// response from `FakeHealthGet`: HealthCheckResult // response from `FakeHealthGet`: HealthCheckResult
fmt.Fprintf(os.Stdout, "Response from `FakeApi.FakeHealthGet`: %v\n", resp) fmt.Fprintf(os.Stdout, "Response from `FakeAPI.FakeHealthGet`: %v\n", resp)
} }
``` ```
@@ -107,13 +107,13 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FakeApi.FakeOuterBooleanSerialize(context.Background()).Body(body).Execute() resp, r, err := apiClient.FakeAPI.FakeOuterBooleanSerialize(context.Background()).Body(body).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.FakeOuterBooleanSerialize``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `FakeAPI.FakeOuterBooleanSerialize``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
// response from `FakeOuterBooleanSerialize`: bool // response from `FakeOuterBooleanSerialize`: bool
fmt.Fprintf(os.Stdout, "Response from `FakeApi.FakeOuterBooleanSerialize`: %v\n", resp) fmt.Fprintf(os.Stdout, "Response from `FakeAPI.FakeOuterBooleanSerialize`: %v\n", resp)
} }
``` ```
@@ -173,13 +173,13 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FakeApi.FakeOuterCompositeSerialize(context.Background()).OuterComposite(outerComposite).Execute() resp, r, err := apiClient.FakeAPI.FakeOuterCompositeSerialize(context.Background()).OuterComposite(outerComposite).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.FakeOuterCompositeSerialize``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `FakeAPI.FakeOuterCompositeSerialize``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
// response from `FakeOuterCompositeSerialize`: OuterComposite // response from `FakeOuterCompositeSerialize`: OuterComposite
fmt.Fprintf(os.Stdout, "Response from `FakeApi.FakeOuterCompositeSerialize`: %v\n", resp) fmt.Fprintf(os.Stdout, "Response from `FakeAPI.FakeOuterCompositeSerialize`: %v\n", resp)
} }
``` ```
@@ -239,13 +239,13 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FakeApi.FakeOuterNumberSerialize(context.Background()).Body(body).Execute() resp, r, err := apiClient.FakeAPI.FakeOuterNumberSerialize(context.Background()).Body(body).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.FakeOuterNumberSerialize``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `FakeAPI.FakeOuterNumberSerialize``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
// response from `FakeOuterNumberSerialize`: float32 // response from `FakeOuterNumberSerialize`: float32
fmt.Fprintf(os.Stdout, "Response from `FakeApi.FakeOuterNumberSerialize`: %v\n", resp) fmt.Fprintf(os.Stdout, "Response from `FakeAPI.FakeOuterNumberSerialize`: %v\n", resp)
} }
``` ```
@@ -305,13 +305,13 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FakeApi.FakeOuterStringSerialize(context.Background()).Body(body).Execute() resp, r, err := apiClient.FakeAPI.FakeOuterStringSerialize(context.Background()).Body(body).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.FakeOuterStringSerialize``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `FakeAPI.FakeOuterStringSerialize``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
// response from `FakeOuterStringSerialize`: string // response from `FakeOuterStringSerialize`: string
fmt.Fprintf(os.Stdout, "Response from `FakeApi.FakeOuterStringSerialize`: %v\n", resp) fmt.Fprintf(os.Stdout, "Response from `FakeAPI.FakeOuterStringSerialize`: %v\n", resp)
} }
``` ```
@@ -371,9 +371,9 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.FakeApi.TestBodyWithFileSchema(context.Background()).FileSchemaTestClass(fileSchemaTestClass).Execute() r, err := apiClient.FakeAPI.TestBodyWithFileSchema(context.Background()).FileSchemaTestClass(fileSchemaTestClass).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestBodyWithFileSchema``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `FakeAPI.TestBodyWithFileSchema``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
} }
@@ -434,9 +434,9 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.FakeApi.TestBodyWithQueryParams(context.Background()).Query(query).User(user).Execute() r, err := apiClient.FakeAPI.TestBodyWithQueryParams(context.Background()).Query(query).User(user).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestBodyWithQueryParams``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `FakeAPI.TestBodyWithQueryParams``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
} }
@@ -499,13 +499,13 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FakeApi.TestClientModel(context.Background()).Client(client).Execute() resp, r, err := apiClient.FakeAPI.TestClientModel(context.Background()).Client(client).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestClientModel``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `FakeAPI.TestClientModel``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
// response from `TestClientModel`: Client // response from `TestClientModel`: Client
fmt.Fprintf(os.Stdout, "Response from `FakeApi.TestClientModel`: %v\n", resp) fmt.Fprintf(os.Stdout, "Response from `FakeAPI.TestClientModel`: %v\n", resp)
} }
``` ```
@@ -579,9 +579,9 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.FakeApi.TestEndpointParameters(context.Background()).Number(number).Double(double).PatternWithoutDelimiter(patternWithoutDelimiter).Byte_(byte_).Integer(integer).Int32_(int32_).Int64_(int64_).Float(float).String_(string_).Binary(binary).Date(date).DateTime(dateTime).Password(password).Callback(callback).Execute() r, err := apiClient.FakeAPI.TestEndpointParameters(context.Background()).Number(number).Double(double).PatternWithoutDelimiter(patternWithoutDelimiter).Byte_(byte_).Integer(integer).Int32_(int32_).Int64_(int64_).Float(float).String_(string_).Binary(binary).Date(date).DateTime(dateTime).Password(password).Callback(callback).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestEndpointParameters``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `FakeAPI.TestEndpointParameters``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
} }
@@ -663,9 +663,9 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.FakeApi.TestEnumParameters(context.Background()).EnumHeaderStringArray(enumHeaderStringArray).EnumHeaderString(enumHeaderString).EnumQueryStringArray(enumQueryStringArray).EnumQueryString(enumQueryString).EnumQueryInteger(enumQueryInteger).EnumQueryDouble(enumQueryDouble).EnumFormStringArray(enumFormStringArray).EnumFormString(enumFormString).Execute() r, err := apiClient.FakeAPI.TestEnumParameters(context.Background()).EnumHeaderStringArray(enumHeaderStringArray).EnumHeaderString(enumHeaderString).EnumQueryStringArray(enumQueryStringArray).EnumQueryString(enumQueryString).EnumQueryInteger(enumQueryInteger).EnumQueryDouble(enumQueryDouble).EnumFormStringArray(enumFormStringArray).EnumFormString(enumFormString).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestEnumParameters``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `FakeAPI.TestEnumParameters``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
} }
@@ -739,9 +739,9 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.FakeApi.TestGroupParameters(context.Background()).RequiredStringGroup(requiredStringGroup).RequiredBooleanGroup(requiredBooleanGroup).RequiredInt64Group(requiredInt64Group).StringGroup(stringGroup).BooleanGroup(booleanGroup).Int64Group(int64Group).Execute() r, err := apiClient.FakeAPI.TestGroupParameters(context.Background()).RequiredStringGroup(requiredStringGroup).RequiredBooleanGroup(requiredBooleanGroup).RequiredInt64Group(requiredInt64Group).StringGroup(stringGroup).BooleanGroup(booleanGroup).Int64Group(int64Group).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestGroupParameters``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `FakeAPI.TestGroupParameters``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
} }
@@ -808,9 +808,9 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.FakeApi.TestInlineAdditionalProperties(context.Background()).RequestBody(requestBody).Execute() r, err := apiClient.FakeAPI.TestInlineAdditionalProperties(context.Background()).RequestBody(requestBody).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestInlineAdditionalProperties``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `FakeAPI.TestInlineAdditionalProperties``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
} }
@@ -873,9 +873,9 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.FakeApi.TestJsonFormData(context.Background()).Param(param).Param2(param2).Execute() r, err := apiClient.FakeAPI.TestJsonFormData(context.Background()).Param(param).Param2(param2).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestJsonFormData``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `FakeAPI.TestJsonFormData``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
} }
@@ -937,9 +937,9 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.FakeApi.TestQueryDeepObject(context.Background()).TestPet(testPet).InputOptions(inputOptions).Execute() r, err := apiClient.FakeAPI.TestQueryDeepObject(context.Background()).TestPet(testPet).InputOptions(inputOptions).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestQueryDeepObject``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `FakeAPI.TestQueryDeepObject``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
} }
@@ -1006,9 +1006,9 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.FakeApi.TestQueryParameterCollectionFormat(context.Background()).Pipe(pipe).Ioutil(ioutil).Http(http).Url(url).Context(context).Execute() r, err := apiClient.FakeAPI.TestQueryParameterCollectionFormat(context.Background()).Pipe(pipe).Ioutil(ioutil).Http(http).Url(url).Context(context).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestQueryParameterCollectionFormat``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `FakeAPI.TestQueryParameterCollectionFormat``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
} }
@@ -1075,13 +1075,13 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FakeApi.TestUniqueItemsHeaderAndQueryParameterCollectionFormat(context.Background()).QueryUnique(queryUnique).HeaderUnique(headerUnique).Execute() resp, r, err := apiClient.FakeAPI.TestUniqueItemsHeaderAndQueryParameterCollectionFormat(context.Background()).QueryUnique(queryUnique).HeaderUnique(headerUnique).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestUniqueItemsHeaderAndQueryParameterCollectionFormat``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `FakeAPI.TestUniqueItemsHeaderAndQueryParameterCollectionFormat``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
// response from `TestUniqueItemsHeaderAndQueryParameterCollectionFormat`: []Pet // response from `TestUniqueItemsHeaderAndQueryParameterCollectionFormat`: []Pet
fmt.Fprintf(os.Stdout, "Response from `FakeApi.TestUniqueItemsHeaderAndQueryParameterCollectionFormat`: %v\n", resp) fmt.Fprintf(os.Stdout, "Response from `FakeAPI.TestUniqueItemsHeaderAndQueryParameterCollectionFormat`: %v\n", resp)
} }
``` ```

View File

@@ -1,10 +1,10 @@
# \FakeClassnameTags123Api # \FakeClassnameTags123API
All URIs are relative to *http://petstore.swagger.io:80/v2* All URIs are relative to *http://petstore.swagger.io:80/v2*
Method | HTTP request | Description Method | HTTP request | Description
------------- | ------------- | ------------- ------------- | ------------- | -------------
[**TestClassname**](FakeClassnameTags123Api.md#TestClassname) | **Patch** /fake_classname_test | To test class name in snake case [**TestClassname**](FakeClassnameTags123API.md#TestClassname) | **Patch** /fake_classname_test | To test class name in snake case
@@ -33,13 +33,13 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FakeClassnameTags123Api.TestClassname(context.Background()).Client(client).Execute() resp, r, err := apiClient.FakeClassnameTags123API.TestClassname(context.Background()).Client(client).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FakeClassnameTags123Api.TestClassname``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `FakeClassnameTags123API.TestClassname``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
// response from `TestClassname`: Client // response from `TestClassname`: Client
fmt.Fprintf(os.Stdout, "Response from `FakeClassnameTags123Api.TestClassname`: %v\n", resp) fmt.Fprintf(os.Stdout, "Response from `FakeClassnameTags123API.TestClassname`: %v\n", resp)
} }
``` ```

View File

@@ -1,82 +0,0 @@
# InlineObject
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Name** | Pointer to **string** | Updated name of the pet | [optional]
**Status** | Pointer to **string** | Updated status of the pet | [optional]
## Methods
### NewInlineObject
`func NewInlineObject() *InlineObject`
NewInlineObject instantiates a new InlineObject object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewInlineObjectWithDefaults
`func NewInlineObjectWithDefaults() *InlineObject`
NewInlineObjectWithDefaults instantiates a new InlineObject object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetName
`func (o *InlineObject) GetName() string`
GetName returns the Name field if non-nil, zero value otherwise.
### GetNameOk
`func (o *InlineObject) GetNameOk() (*string, bool)`
GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetName
`func (o *InlineObject) SetName(v string)`
SetName sets Name field to given value.
### HasName
`func (o *InlineObject) HasName() bool`
HasName returns a boolean if a field has been set.
### GetStatus
`func (o *InlineObject) GetStatus() string`
GetStatus returns the Status field if non-nil, zero value otherwise.
### GetStatusOk
`func (o *InlineObject) GetStatusOk() (*string, bool)`
GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetStatus
`func (o *InlineObject) SetStatus(v string)`
SetStatus sets Status field to given value.
### HasStatus
`func (o *InlineObject) HasStatus() bool`
HasStatus returns a boolean if a field has been set.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -1,82 +0,0 @@
# InlineObject1
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**AdditionalMetadata** | Pointer to **string** | Additional data to pass to server | [optional]
**File** | Pointer to ***os.File** | file to upload | [optional]
## Methods
### NewInlineObject1
`func NewInlineObject1() *InlineObject1`
NewInlineObject1 instantiates a new InlineObject1 object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewInlineObject1WithDefaults
`func NewInlineObject1WithDefaults() *InlineObject1`
NewInlineObject1WithDefaults instantiates a new InlineObject1 object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetAdditionalMetadata
`func (o *InlineObject1) GetAdditionalMetadata() string`
GetAdditionalMetadata returns the AdditionalMetadata field if non-nil, zero value otherwise.
### GetAdditionalMetadataOk
`func (o *InlineObject1) GetAdditionalMetadataOk() (*string, bool)`
GetAdditionalMetadataOk returns a tuple with the AdditionalMetadata field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetAdditionalMetadata
`func (o *InlineObject1) SetAdditionalMetadata(v string)`
SetAdditionalMetadata sets AdditionalMetadata field to given value.
### HasAdditionalMetadata
`func (o *InlineObject1) HasAdditionalMetadata() bool`
HasAdditionalMetadata returns a boolean if a field has been set.
### GetFile
`func (o *InlineObject1) GetFile() *os.File`
GetFile returns the File field if non-nil, zero value otherwise.
### GetFileOk
`func (o *InlineObject1) GetFileOk() (**os.File, bool)`
GetFileOk returns a tuple with the File field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetFile
`func (o *InlineObject1) SetFile(v *os.File)`
SetFile sets File field to given value.
### HasFile
`func (o *InlineObject1) HasFile() bool`
HasFile returns a boolean if a field has been set.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -1,82 +0,0 @@
# InlineObject2
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**EnumFormStringArray** | Pointer to **[]string** | Form parameter enum test (string array) | [optional]
**EnumFormString** | Pointer to **string** | Form parameter enum test (string) | [optional] [default to "-efg"]
## Methods
### NewInlineObject2
`func NewInlineObject2() *InlineObject2`
NewInlineObject2 instantiates a new InlineObject2 object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewInlineObject2WithDefaults
`func NewInlineObject2WithDefaults() *InlineObject2`
NewInlineObject2WithDefaults instantiates a new InlineObject2 object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetEnumFormStringArray
`func (o *InlineObject2) GetEnumFormStringArray() []string`
GetEnumFormStringArray returns the EnumFormStringArray field if non-nil, zero value otherwise.
### GetEnumFormStringArrayOk
`func (o *InlineObject2) GetEnumFormStringArrayOk() (*[]string, bool)`
GetEnumFormStringArrayOk returns a tuple with the EnumFormStringArray field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetEnumFormStringArray
`func (o *InlineObject2) SetEnumFormStringArray(v []string)`
SetEnumFormStringArray sets EnumFormStringArray field to given value.
### HasEnumFormStringArray
`func (o *InlineObject2) HasEnumFormStringArray() bool`
HasEnumFormStringArray returns a boolean if a field has been set.
### GetEnumFormString
`func (o *InlineObject2) GetEnumFormString() string`
GetEnumFormString returns the EnumFormString field if non-nil, zero value otherwise.
### GetEnumFormStringOk
`func (o *InlineObject2) GetEnumFormStringOk() (*string, bool)`
GetEnumFormStringOk returns a tuple with the EnumFormString field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetEnumFormString
`func (o *InlineObject2) SetEnumFormString(v string)`
SetEnumFormString sets EnumFormString field to given value.
### HasEnumFormString
`func (o *InlineObject2) HasEnumFormString() bool`
HasEnumFormString returns a boolean if a field has been set.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -1,374 +0,0 @@
# InlineObject3
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Integer** | Pointer to **int32** | None | [optional]
**Int32** | Pointer to **int32** | None | [optional]
**Int64** | Pointer to **int64** | None | [optional]
**Number** | **float32** | None |
**Float** | Pointer to **float32** | None | [optional]
**Double** | **float64** | None |
**String** | Pointer to **string** | None | [optional]
**PatternWithoutDelimiter** | **string** | None |
**Byte** | **string** | None |
**Binary** | Pointer to ***os.File** | None | [optional]
**Date** | Pointer to **string** | None | [optional]
**DateTime** | Pointer to **time.Time** | None | [optional]
**Password** | Pointer to **string** | None | [optional]
**Callback** | Pointer to **string** | None | [optional]
## Methods
### NewInlineObject3
`func NewInlineObject3(number float32, double float64, patternWithoutDelimiter string, byte_ string, ) *InlineObject3`
NewInlineObject3 instantiates a new InlineObject3 object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewInlineObject3WithDefaults
`func NewInlineObject3WithDefaults() *InlineObject3`
NewInlineObject3WithDefaults instantiates a new InlineObject3 object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetInteger
`func (o *InlineObject3) GetInteger() int32`
GetInteger returns the Integer field if non-nil, zero value otherwise.
### GetIntegerOk
`func (o *InlineObject3) GetIntegerOk() (*int32, bool)`
GetIntegerOk returns a tuple with the Integer field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetInteger
`func (o *InlineObject3) SetInteger(v int32)`
SetInteger sets Integer field to given value.
### HasInteger
`func (o *InlineObject3) HasInteger() bool`
HasInteger returns a boolean if a field has been set.
### GetInt32
`func (o *InlineObject3) GetInt32() int32`
GetInt32 returns the Int32 field if non-nil, zero value otherwise.
### GetInt32Ok
`func (o *InlineObject3) GetInt32Ok() (*int32, bool)`
GetInt32Ok returns a tuple with the Int32 field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetInt32
`func (o *InlineObject3) SetInt32(v int32)`
SetInt32 sets Int32 field to given value.
### HasInt32
`func (o *InlineObject3) HasInt32() bool`
HasInt32 returns a boolean if a field has been set.
### GetInt64
`func (o *InlineObject3) GetInt64() int64`
GetInt64 returns the Int64 field if non-nil, zero value otherwise.
### GetInt64Ok
`func (o *InlineObject3) GetInt64Ok() (*int64, bool)`
GetInt64Ok returns a tuple with the Int64 field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetInt64
`func (o *InlineObject3) SetInt64(v int64)`
SetInt64 sets Int64 field to given value.
### HasInt64
`func (o *InlineObject3) HasInt64() bool`
HasInt64 returns a boolean if a field has been set.
### GetNumber
`func (o *InlineObject3) GetNumber() float32`
GetNumber returns the Number field if non-nil, zero value otherwise.
### GetNumberOk
`func (o *InlineObject3) GetNumberOk() (*float32, bool)`
GetNumberOk returns a tuple with the Number field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetNumber
`func (o *InlineObject3) SetNumber(v float32)`
SetNumber sets Number field to given value.
### GetFloat
`func (o *InlineObject3) GetFloat() float32`
GetFloat returns the Float field if non-nil, zero value otherwise.
### GetFloatOk
`func (o *InlineObject3) GetFloatOk() (*float32, bool)`
GetFloatOk returns a tuple with the Float field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetFloat
`func (o *InlineObject3) SetFloat(v float32)`
SetFloat sets Float field to given value.
### HasFloat
`func (o *InlineObject3) HasFloat() bool`
HasFloat returns a boolean if a field has been set.
### GetDouble
`func (o *InlineObject3) GetDouble() float64`
GetDouble returns the Double field if non-nil, zero value otherwise.
### GetDoubleOk
`func (o *InlineObject3) GetDoubleOk() (*float64, bool)`
GetDoubleOk returns a tuple with the Double field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetDouble
`func (o *InlineObject3) SetDouble(v float64)`
SetDouble sets Double field to given value.
### GetString
`func (o *InlineObject3) GetString() string`
GetString returns the String field if non-nil, zero value otherwise.
### GetStringOk
`func (o *InlineObject3) GetStringOk() (*string, bool)`
GetStringOk returns a tuple with the String field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetString
`func (o *InlineObject3) SetString(v string)`
SetString sets String field to given value.
### HasString
`func (o *InlineObject3) HasString() bool`
HasString returns a boolean if a field has been set.
### GetPatternWithoutDelimiter
`func (o *InlineObject3) GetPatternWithoutDelimiter() string`
GetPatternWithoutDelimiter returns the PatternWithoutDelimiter field if non-nil, zero value otherwise.
### GetPatternWithoutDelimiterOk
`func (o *InlineObject3) GetPatternWithoutDelimiterOk() (*string, bool)`
GetPatternWithoutDelimiterOk returns a tuple with the PatternWithoutDelimiter field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetPatternWithoutDelimiter
`func (o *InlineObject3) SetPatternWithoutDelimiter(v string)`
SetPatternWithoutDelimiter sets PatternWithoutDelimiter field to given value.
### GetByte
`func (o *InlineObject3) GetByte() string`
GetByte returns the Byte field if non-nil, zero value otherwise.
### GetByteOk
`func (o *InlineObject3) GetByteOk() (*string, bool)`
GetByteOk returns a tuple with the Byte field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetByte
`func (o *InlineObject3) SetByte(v string)`
SetByte sets Byte field to given value.
### GetBinary
`func (o *InlineObject3) GetBinary() *os.File`
GetBinary returns the Binary field if non-nil, zero value otherwise.
### GetBinaryOk
`func (o *InlineObject3) GetBinaryOk() (**os.File, bool)`
GetBinaryOk returns a tuple with the Binary field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetBinary
`func (o *InlineObject3) SetBinary(v *os.File)`
SetBinary sets Binary field to given value.
### HasBinary
`func (o *InlineObject3) HasBinary() bool`
HasBinary returns a boolean if a field has been set.
### GetDate
`func (o *InlineObject3) GetDate() string`
GetDate returns the Date field if non-nil, zero value otherwise.
### GetDateOk
`func (o *InlineObject3) GetDateOk() (*string, bool)`
GetDateOk returns a tuple with the Date field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetDate
`func (o *InlineObject3) SetDate(v string)`
SetDate sets Date field to given value.
### HasDate
`func (o *InlineObject3) HasDate() bool`
HasDate returns a boolean if a field has been set.
### GetDateTime
`func (o *InlineObject3) GetDateTime() time.Time`
GetDateTime returns the DateTime field if non-nil, zero value otherwise.
### GetDateTimeOk
`func (o *InlineObject3) GetDateTimeOk() (*time.Time, bool)`
GetDateTimeOk returns a tuple with the DateTime field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetDateTime
`func (o *InlineObject3) SetDateTime(v time.Time)`
SetDateTime sets DateTime field to given value.
### HasDateTime
`func (o *InlineObject3) HasDateTime() bool`
HasDateTime returns a boolean if a field has been set.
### GetPassword
`func (o *InlineObject3) GetPassword() string`
GetPassword returns the Password field if non-nil, zero value otherwise.
### GetPasswordOk
`func (o *InlineObject3) GetPasswordOk() (*string, bool)`
GetPasswordOk returns a tuple with the Password field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetPassword
`func (o *InlineObject3) SetPassword(v string)`
SetPassword sets Password field to given value.
### HasPassword
`func (o *InlineObject3) HasPassword() bool`
HasPassword returns a boolean if a field has been set.
### GetCallback
`func (o *InlineObject3) GetCallback() string`
GetCallback returns the Callback field if non-nil, zero value otherwise.
### GetCallbackOk
`func (o *InlineObject3) GetCallbackOk() (*string, bool)`
GetCallbackOk returns a tuple with the Callback field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetCallback
`func (o *InlineObject3) SetCallback(v string)`
SetCallback sets Callback field to given value.
### HasCallback
`func (o *InlineObject3) HasCallback() bool`
HasCallback returns a boolean if a field has been set.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -1,72 +0,0 @@
# InlineObject4
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Param** | **string** | field1 |
**Param2** | **string** | field2 |
## Methods
### NewInlineObject4
`func NewInlineObject4(param string, param2 string, ) *InlineObject4`
NewInlineObject4 instantiates a new InlineObject4 object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewInlineObject4WithDefaults
`func NewInlineObject4WithDefaults() *InlineObject4`
NewInlineObject4WithDefaults instantiates a new InlineObject4 object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetParam
`func (o *InlineObject4) GetParam() string`
GetParam returns the Param field if non-nil, zero value otherwise.
### GetParamOk
`func (o *InlineObject4) GetParamOk() (*string, bool)`
GetParamOk returns a tuple with the Param field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetParam
`func (o *InlineObject4) SetParam(v string)`
SetParam sets Param field to given value.
### GetParam2
`func (o *InlineObject4) GetParam2() string`
GetParam2 returns the Param2 field if non-nil, zero value otherwise.
### GetParam2Ok
`func (o *InlineObject4) GetParam2Ok() (*string, bool)`
GetParam2Ok returns a tuple with the Param2 field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetParam2
`func (o *InlineObject4) SetParam2(v string)`
SetParam2 sets Param2 field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -1,77 +0,0 @@
# InlineObject5
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**AdditionalMetadata** | Pointer to **string** | Additional data to pass to server | [optional]
**RequiredFile** | ***os.File** | file to upload |
## Methods
### NewInlineObject5
`func NewInlineObject5(requiredFile *os.File, ) *InlineObject5`
NewInlineObject5 instantiates a new InlineObject5 object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewInlineObject5WithDefaults
`func NewInlineObject5WithDefaults() *InlineObject5`
NewInlineObject5WithDefaults instantiates a new InlineObject5 object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetAdditionalMetadata
`func (o *InlineObject5) GetAdditionalMetadata() string`
GetAdditionalMetadata returns the AdditionalMetadata field if non-nil, zero value otherwise.
### GetAdditionalMetadataOk
`func (o *InlineObject5) GetAdditionalMetadataOk() (*string, bool)`
GetAdditionalMetadataOk returns a tuple with the AdditionalMetadata field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetAdditionalMetadata
`func (o *InlineObject5) SetAdditionalMetadata(v string)`
SetAdditionalMetadata sets AdditionalMetadata field to given value.
### HasAdditionalMetadata
`func (o *InlineObject5) HasAdditionalMetadata() bool`
HasAdditionalMetadata returns a boolean if a field has been set.
### GetRequiredFile
`func (o *InlineObject5) GetRequiredFile() *os.File`
GetRequiredFile returns the RequiredFile field if non-nil, zero value otherwise.
### GetRequiredFileOk
`func (o *InlineObject5) GetRequiredFileOk() (**os.File, bool)`
GetRequiredFileOk returns a tuple with the RequiredFile field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetRequiredFile
`func (o *InlineObject5) SetRequiredFile(v *os.File)`
SetRequiredFile sets RequiredFile field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -1,56 +0,0 @@
# InlineResponseDefault
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**String** | Pointer to [**Foo**](Foo.md) | | [optional]
## Methods
### NewInlineResponseDefault
`func NewInlineResponseDefault() *InlineResponseDefault`
NewInlineResponseDefault instantiates a new InlineResponseDefault object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewInlineResponseDefaultWithDefaults
`func NewInlineResponseDefaultWithDefaults() *InlineResponseDefault`
NewInlineResponseDefaultWithDefaults instantiates a new InlineResponseDefault object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetString
`func (o *InlineResponseDefault) GetString() Foo`
GetString returns the String field if non-nil, zero value otherwise.
### GetStringOk
`func (o *InlineResponseDefault) GetStringOk() (*Foo, bool)`
GetStringOk returns a tuple with the String field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetString
`func (o *InlineResponseDefault) SetString(v Foo)`
SetString sets String field to given value.
### HasString
`func (o *InlineResponseDefault) HasString() bool`
HasString returns a boolean if a field has been set.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -1,51 +0,0 @@
# OuterObjectWithEnumProperty
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Value** | [**OuterEnumInteger**](OuterEnumInteger.md) | |
## Methods
### NewOuterObjectWithEnumProperty
`func NewOuterObjectWithEnumProperty(value OuterEnumInteger, ) *OuterObjectWithEnumProperty`
NewOuterObjectWithEnumProperty instantiates a new OuterObjectWithEnumProperty object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewOuterObjectWithEnumPropertyWithDefaults
`func NewOuterObjectWithEnumPropertyWithDefaults() *OuterObjectWithEnumProperty`
NewOuterObjectWithEnumPropertyWithDefaults instantiates a new OuterObjectWithEnumProperty object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetValue
`func (o *OuterObjectWithEnumProperty) GetValue() OuterEnumInteger`
GetValue returns the Value field if non-nil, zero value otherwise.
### GetValueOk
`func (o *OuterObjectWithEnumProperty) GetValueOk() (*OuterEnumInteger, bool)`
GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetValue
`func (o *OuterObjectWithEnumProperty) SetValue(v OuterEnumInteger)`
SetValue sets Value field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -1,18 +1,18 @@
# \PetApi # \PetAPI
All URIs are relative to *http://petstore.swagger.io:80/v2* All URIs are relative to *http://petstore.swagger.io:80/v2*
Method | HTTP request | Description Method | HTTP request | Description
------------- | ------------- | ------------- ------------- | ------------- | -------------
[**AddPet**](PetApi.md#AddPet) | **Post** /pet | Add a new pet to the store [**AddPet**](PetAPI.md#AddPet) | **Post** /pet | Add a new pet to the store
[**DeletePet**](PetApi.md#DeletePet) | **Delete** /pet/{petId} | Deletes a pet [**DeletePet**](PetAPI.md#DeletePet) | **Delete** /pet/{petId} | Deletes a pet
[**FindPetsByStatus**](PetApi.md#FindPetsByStatus) | **Get** /pet/findByStatus | Finds Pets by status [**FindPetsByStatus**](PetAPI.md#FindPetsByStatus) | **Get** /pet/findByStatus | Finds Pets by status
[**FindPetsByTags**](PetApi.md#FindPetsByTags) | **Get** /pet/findByTags | Finds Pets by tags [**FindPetsByTags**](PetAPI.md#FindPetsByTags) | **Get** /pet/findByTags | Finds Pets by tags
[**GetPetById**](PetApi.md#GetPetById) | **Get** /pet/{petId} | Find pet by ID [**GetPetById**](PetAPI.md#GetPetById) | **Get** /pet/{petId} | Find pet by ID
[**UpdatePet**](PetApi.md#UpdatePet) | **Put** /pet | Update an existing pet [**UpdatePet**](PetAPI.md#UpdatePet) | **Put** /pet | Update an existing pet
[**UpdatePetWithForm**](PetApi.md#UpdatePetWithForm) | **Post** /pet/{petId} | Updates a pet in the store with form data [**UpdatePetWithForm**](PetAPI.md#UpdatePetWithForm) | **Post** /pet/{petId} | Updates a pet in the store with form data
[**UploadFile**](PetApi.md#UploadFile) | **Post** /pet/{petId}/uploadImage | uploads an image [**UploadFile**](PetAPI.md#UploadFile) | **Post** /pet/{petId}/uploadImage | uploads an image
[**UploadFileWithRequiredFile**](PetApi.md#UploadFileWithRequiredFile) | **Post** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) [**UploadFileWithRequiredFile**](PetAPI.md#UploadFileWithRequiredFile) | **Post** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
@@ -41,9 +41,9 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.PetApi.AddPet(context.Background()).Pet(pet).Execute() r, err := apiClient.PetAPI.AddPet(context.Background()).Pet(pet).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PetApi.AddPet``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `PetAPI.AddPet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
} }
@@ -106,9 +106,9 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.PetApi.DeletePet(context.Background(), petId).ApiKey(apiKey).Execute() r, err := apiClient.PetAPI.DeletePet(context.Background(), petId).ApiKey(apiKey).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PetApi.DeletePet``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `PetAPI.DeletePet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
} }
@@ -175,13 +175,13 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PetApi.FindPetsByStatus(context.Background()).Status(status).Execute() resp, r, err := apiClient.PetAPI.FindPetsByStatus(context.Background()).Status(status).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PetApi.FindPetsByStatus``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `PetAPI.FindPetsByStatus``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
// response from `FindPetsByStatus`: []Pet // response from `FindPetsByStatus`: []Pet
fmt.Fprintf(os.Stdout, "Response from `PetApi.FindPetsByStatus`: %v\n", resp) fmt.Fprintf(os.Stdout, "Response from `PetAPI.FindPetsByStatus`: %v\n", resp)
} }
``` ```
@@ -241,13 +241,13 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PetApi.FindPetsByTags(context.Background()).Tags(tags).Execute() resp, r, err := apiClient.PetAPI.FindPetsByTags(context.Background()).Tags(tags).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PetApi.FindPetsByTags``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `PetAPI.FindPetsByTags``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
// response from `FindPetsByTags`: []Pet // response from `FindPetsByTags`: []Pet
fmt.Fprintf(os.Stdout, "Response from `PetApi.FindPetsByTags`: %v\n", resp) fmt.Fprintf(os.Stdout, "Response from `PetAPI.FindPetsByTags`: %v\n", resp)
} }
``` ```
@@ -307,13 +307,13 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PetApi.GetPetById(context.Background(), petId).Execute() resp, r, err := apiClient.PetAPI.GetPetById(context.Background(), petId).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PetApi.GetPetById``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `PetAPI.GetPetById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
// response from `GetPetById`: Pet // response from `GetPetById`: Pet
fmt.Fprintf(os.Stdout, "Response from `PetApi.GetPetById`: %v\n", resp) fmt.Fprintf(os.Stdout, "Response from `PetAPI.GetPetById`: %v\n", resp)
} }
``` ```
@@ -377,9 +377,9 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.PetApi.UpdatePet(context.Background()).Pet(pet).Execute() r, err := apiClient.PetAPI.UpdatePet(context.Background()).Pet(pet).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PetApi.UpdatePet``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `PetAPI.UpdatePet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
} }
@@ -443,9 +443,9 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.PetApi.UpdatePetWithForm(context.Background(), petId).Name(name).Status(status).Execute() r, err := apiClient.PetAPI.UpdatePetWithForm(context.Background(), petId).Name(name).Status(status).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PetApi.UpdatePetWithForm``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `PetAPI.UpdatePetWithForm``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
} }
@@ -515,13 +515,13 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PetApi.UploadFile(context.Background(), petId).AdditionalMetadata(additionalMetadata).File(file).Execute() resp, r, err := apiClient.PetAPI.UploadFile(context.Background(), petId).AdditionalMetadata(additionalMetadata).File(file).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PetApi.UploadFile``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `PetAPI.UploadFile``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
// response from `UploadFile`: ApiResponse // response from `UploadFile`: ApiResponse
fmt.Fprintf(os.Stdout, "Response from `PetApi.UploadFile`: %v\n", resp) fmt.Fprintf(os.Stdout, "Response from `PetAPI.UploadFile`: %v\n", resp)
} }
``` ```
@@ -589,13 +589,13 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PetApi.UploadFileWithRequiredFile(context.Background(), petId).RequiredFile(requiredFile).AdditionalMetadata(additionalMetadata).Execute() resp, r, err := apiClient.PetAPI.UploadFileWithRequiredFile(context.Background(), petId).RequiredFile(requiredFile).AdditionalMetadata(additionalMetadata).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PetApi.UploadFileWithRequiredFile``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `PetAPI.UploadFileWithRequiredFile``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
// response from `UploadFileWithRequiredFile`: ApiResponse // response from `UploadFileWithRequiredFile`: ApiResponse
fmt.Fprintf(os.Stdout, "Response from `PetApi.UploadFileWithRequiredFile`: %v\n", resp) fmt.Fprintf(os.Stdout, "Response from `PetAPI.UploadFileWithRequiredFile`: %v\n", resp)
} }
``` ```

View File

@@ -1,13 +1,13 @@
# \StoreApi # \StoreAPI
All URIs are relative to *http://petstore.swagger.io:80/v2* All URIs are relative to *http://petstore.swagger.io:80/v2*
Method | HTTP request | Description Method | HTTP request | Description
------------- | ------------- | ------------- ------------- | ------------- | -------------
[**DeleteOrder**](StoreApi.md#DeleteOrder) | **Delete** /store/order/{order_id} | Delete purchase order by ID [**DeleteOrder**](StoreAPI.md#DeleteOrder) | **Delete** /store/order/{order_id} | Delete purchase order by ID
[**GetInventory**](StoreApi.md#GetInventory) | **Get** /store/inventory | Returns pet inventories by status [**GetInventory**](StoreAPI.md#GetInventory) | **Get** /store/inventory | Returns pet inventories by status
[**GetOrderById**](StoreApi.md#GetOrderById) | **Get** /store/order/{order_id} | Find purchase order by ID [**GetOrderById**](StoreAPI.md#GetOrderById) | **Get** /store/order/{order_id} | Find purchase order by ID
[**PlaceOrder**](StoreApi.md#PlaceOrder) | **Post** /store/order | Place an order for a pet [**PlaceOrder**](StoreAPI.md#PlaceOrder) | **Post** /store/order | Place an order for a pet
@@ -36,9 +36,9 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.StoreApi.DeleteOrder(context.Background(), orderId).Execute() r, err := apiClient.StoreAPI.DeleteOrder(context.Background(), orderId).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `StoreApi.DeleteOrder``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `StoreAPI.DeleteOrder``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
} }
@@ -103,13 +103,13 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.StoreApi.GetInventory(context.Background()).Execute() resp, r, err := apiClient.StoreAPI.GetInventory(context.Background()).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `StoreApi.GetInventory``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `StoreAPI.GetInventory``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
// response from `GetInventory`: map[string]int32 // response from `GetInventory`: map[string]int32
fmt.Fprintf(os.Stdout, "Response from `StoreApi.GetInventory`: %v\n", resp) fmt.Fprintf(os.Stdout, "Response from `StoreAPI.GetInventory`: %v\n", resp)
} }
``` ```
@@ -165,13 +165,13 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.StoreApi.GetOrderById(context.Background(), orderId).Execute() resp, r, err := apiClient.StoreAPI.GetOrderById(context.Background(), orderId).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `StoreApi.GetOrderById``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `StoreAPI.GetOrderById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
// response from `GetOrderById`: Order // response from `GetOrderById`: Order
fmt.Fprintf(os.Stdout, "Response from `StoreApi.GetOrderById`: %v\n", resp) fmt.Fprintf(os.Stdout, "Response from `StoreAPI.GetOrderById`: %v\n", resp)
} }
``` ```
@@ -235,13 +235,13 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.StoreApi.PlaceOrder(context.Background()).Order(order).Execute() resp, r, err := apiClient.StoreAPI.PlaceOrder(context.Background()).Order(order).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `StoreApi.PlaceOrder``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `StoreAPI.PlaceOrder``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
// response from `PlaceOrder`: Order // response from `PlaceOrder`: Order
fmt.Fprintf(os.Stdout, "Response from `StoreApi.PlaceOrder`: %v\n", resp) fmt.Fprintf(os.Stdout, "Response from `StoreAPI.PlaceOrder`: %v\n", resp)
} }
``` ```

View File

@@ -1,17 +1,17 @@
# \UserApi # \UserAPI
All URIs are relative to *http://petstore.swagger.io:80/v2* All URIs are relative to *http://petstore.swagger.io:80/v2*
Method | HTTP request | Description Method | HTTP request | Description
------------- | ------------- | ------------- ------------- | ------------- | -------------
[**CreateUser**](UserApi.md#CreateUser) | **Post** /user | Create user [**CreateUser**](UserAPI.md#CreateUser) | **Post** /user | Create user
[**CreateUsersWithArrayInput**](UserApi.md#CreateUsersWithArrayInput) | **Post** /user/createWithArray | Creates list of users with given input array [**CreateUsersWithArrayInput**](UserAPI.md#CreateUsersWithArrayInput) | **Post** /user/createWithArray | Creates list of users with given input array
[**CreateUsersWithListInput**](UserApi.md#CreateUsersWithListInput) | **Post** /user/createWithList | Creates list of users with given input array [**CreateUsersWithListInput**](UserAPI.md#CreateUsersWithListInput) | **Post** /user/createWithList | Creates list of users with given input array
[**DeleteUser**](UserApi.md#DeleteUser) | **Delete** /user/{username} | Delete user [**DeleteUser**](UserAPI.md#DeleteUser) | **Delete** /user/{username} | Delete user
[**GetUserByName**](UserApi.md#GetUserByName) | **Get** /user/{username} | Get user by user name [**GetUserByName**](UserAPI.md#GetUserByName) | **Get** /user/{username} | Get user by user name
[**LoginUser**](UserApi.md#LoginUser) | **Get** /user/login | Logs user into the system [**LoginUser**](UserAPI.md#LoginUser) | **Get** /user/login | Logs user into the system
[**LogoutUser**](UserApi.md#LogoutUser) | **Get** /user/logout | Logs out current logged in user session [**LogoutUser**](UserAPI.md#LogoutUser) | **Get** /user/logout | Logs out current logged in user session
[**UpdateUser**](UserApi.md#UpdateUser) | **Put** /user/{username} | Updated user [**UpdateUser**](UserAPI.md#UpdateUser) | **Put** /user/{username} | Updated user
@@ -40,9 +40,9 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.UserApi.CreateUser(context.Background()).User(user).Execute() r, err := apiClient.UserAPI.CreateUser(context.Background()).User(user).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserApi.CreateUser``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `UserAPI.CreateUser``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
} }
@@ -104,9 +104,9 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.UserApi.CreateUsersWithArrayInput(context.Background()).User(user).Execute() r, err := apiClient.UserAPI.CreateUsersWithArrayInput(context.Background()).User(user).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserApi.CreateUsersWithArrayInput``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `UserAPI.CreateUsersWithArrayInput``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
} }
@@ -168,9 +168,9 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.UserApi.CreateUsersWithListInput(context.Background()).User(user).Execute() r, err := apiClient.UserAPI.CreateUsersWithListInput(context.Background()).User(user).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserApi.CreateUsersWithListInput``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `UserAPI.CreateUsersWithListInput``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
} }
@@ -232,9 +232,9 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.UserApi.DeleteUser(context.Background(), username).Execute() r, err := apiClient.UserAPI.DeleteUser(context.Background(), username).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserApi.DeleteUser``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `UserAPI.DeleteUser``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
} }
@@ -300,13 +300,13 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.UserApi.GetUserByName(context.Background(), username).Execute() resp, r, err := apiClient.UserAPI.GetUserByName(context.Background(), username).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserApi.GetUserByName``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `UserAPI.GetUserByName``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
// response from `GetUserByName`: User // response from `GetUserByName`: User
fmt.Fprintf(os.Stdout, "Response from `UserApi.GetUserByName`: %v\n", resp) fmt.Fprintf(os.Stdout, "Response from `UserAPI.GetUserByName`: %v\n", resp)
} }
``` ```
@@ -371,13 +371,13 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.UserApi.LoginUser(context.Background()).Username(username).Password(password).Execute() resp, r, err := apiClient.UserAPI.LoginUser(context.Background()).Username(username).Password(password).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserApi.LoginUser``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `UserAPI.LoginUser``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
// response from `LoginUser`: string // response from `LoginUser`: string
fmt.Fprintf(os.Stdout, "Response from `UserApi.LoginUser`: %v\n", resp) fmt.Fprintf(os.Stdout, "Response from `UserAPI.LoginUser`: %v\n", resp)
} }
``` ```
@@ -437,9 +437,9 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.UserApi.LogoutUser(context.Background()).Execute() r, err := apiClient.UserAPI.LogoutUser(context.Background()).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserApi.LogoutUser``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `UserAPI.LogoutUser``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
} }
@@ -498,9 +498,9 @@ func main() {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.UserApi.UpdateUser(context.Background(), username).User(user).Execute() r, err := apiClient.UserAPI.UpdateUser(context.Background(), username).User(user).Execute()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserApi.UpdateUser``: %v\n", err) fmt.Fprintf(os.Stderr, "Error when calling `UserAPI.UpdateUser``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
} }
} }

View File

@@ -1,177 +0,0 @@
/*
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* API version: 1.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package petstore
import (
"encoding/json"
)
// InlineObject struct for InlineObject
type InlineObject struct {
// Updated name of the pet
Name *string `json:"name,omitempty"`
// Updated status of the pet
Status *string `json:"status,omitempty"`
AdditionalProperties map[string]interface{}
}
type _InlineObject InlineObject
// NewInlineObject instantiates a new InlineObject object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewInlineObject() *InlineObject {
this := InlineObject{}
return &this
}
// NewInlineObjectWithDefaults instantiates a new InlineObject object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewInlineObjectWithDefaults() *InlineObject {
this := InlineObject{}
return &this
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *InlineObject) GetName() string {
if o == nil || o.Name == nil {
var ret string
return ret
}
return *o.Name
}
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InlineObject) GetNameOk() (*string, bool) {
if o == nil || o.Name == nil {
return nil, false
}
return o.Name, true
}
// HasName returns a boolean if a field has been set.
func (o *InlineObject) HasName() bool {
if o != nil && o.Name != nil {
return true
}
return false
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *InlineObject) SetName(v string) {
o.Name = &v
}
// GetStatus returns the Status field value if set, zero value otherwise.
func (o *InlineObject) GetStatus() string {
if o == nil || o.Status == nil {
var ret string
return ret
}
return *o.Status
}
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InlineObject) GetStatusOk() (*string, bool) {
if o == nil || o.Status == nil {
return nil, false
}
return o.Status, true
}
// HasStatus returns a boolean if a field has been set.
func (o *InlineObject) HasStatus() bool {
if o != nil && o.Status != nil {
return true
}
return false
}
// SetStatus gets a reference to the given string and assigns it to the Status field.
func (o *InlineObject) SetStatus(v string) {
o.Status = &v
}
func (o InlineObject) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.Name != nil {
toSerialize["name"] = o.Name
}
if o.Status != nil {
toSerialize["status"] = o.Status
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return json.Marshal(toSerialize)
}
func (o *InlineObject) UnmarshalJSON(bytes []byte) (err error) {
varInlineObject := _InlineObject{}
if err = json.Unmarshal(bytes, &varInlineObject); err == nil {
*o = InlineObject(varInlineObject)
}
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(bytes, &additionalProperties); err == nil {
delete(additionalProperties, "name")
delete(additionalProperties, "status")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableInlineObject struct {
value *InlineObject
isSet bool
}
func (v NullableInlineObject) Get() *InlineObject {
return v.value
}
func (v *NullableInlineObject) Set(val *InlineObject) {
v.value = val
v.isSet = true
}
func (v NullableInlineObject) IsSet() bool {
return v.isSet
}
func (v *NullableInlineObject) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableInlineObject(val *InlineObject) *NullableInlineObject {
return &NullableInlineObject{value: val, isSet: true}
}
func (v NullableInlineObject) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableInlineObject) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View File

@@ -1,178 +0,0 @@
/*
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* API version: 1.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package petstore
import (
"encoding/json"
"os"
)
// InlineObject1 struct for InlineObject1
type InlineObject1 struct {
// Additional data to pass to server
AdditionalMetadata *string `json:"additionalMetadata,omitempty"`
// file to upload
File **os.File `json:"file,omitempty"`
AdditionalProperties map[string]interface{}
}
type _InlineObject1 InlineObject1
// NewInlineObject1 instantiates a new InlineObject1 object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewInlineObject1() *InlineObject1 {
this := InlineObject1{}
return &this
}
// NewInlineObject1WithDefaults instantiates a new InlineObject1 object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewInlineObject1WithDefaults() *InlineObject1 {
this := InlineObject1{}
return &this
}
// GetAdditionalMetadata returns the AdditionalMetadata field value if set, zero value otherwise.
func (o *InlineObject1) GetAdditionalMetadata() string {
if o == nil || o.AdditionalMetadata == nil {
var ret string
return ret
}
return *o.AdditionalMetadata
}
// GetAdditionalMetadataOk returns a tuple with the AdditionalMetadata field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InlineObject1) GetAdditionalMetadataOk() (*string, bool) {
if o == nil || o.AdditionalMetadata == nil {
return nil, false
}
return o.AdditionalMetadata, true
}
// HasAdditionalMetadata returns a boolean if a field has been set.
func (o *InlineObject1) HasAdditionalMetadata() bool {
if o != nil && o.AdditionalMetadata != nil {
return true
}
return false
}
// SetAdditionalMetadata gets a reference to the given string and assigns it to the AdditionalMetadata field.
func (o *InlineObject1) SetAdditionalMetadata(v string) {
o.AdditionalMetadata = &v
}
// GetFile returns the File field value if set, zero value otherwise.
func (o *InlineObject1) GetFile() *os.File {
if o == nil || o.File == nil {
var ret *os.File
return ret
}
return *o.File
}
// GetFileOk returns a tuple with the File field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InlineObject1) GetFileOk() (**os.File, bool) {
if o == nil || o.File == nil {
return nil, false
}
return o.File, true
}
// HasFile returns a boolean if a field has been set.
func (o *InlineObject1) HasFile() bool {
if o != nil && o.File != nil {
return true
}
return false
}
// SetFile gets a reference to the given *os.File and assigns it to the File field.
func (o *InlineObject1) SetFile(v *os.File) {
o.File = &v
}
func (o InlineObject1) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.AdditionalMetadata != nil {
toSerialize["additionalMetadata"] = o.AdditionalMetadata
}
if o.File != nil {
toSerialize["file"] = o.File
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return json.Marshal(toSerialize)
}
func (o *InlineObject1) UnmarshalJSON(bytes []byte) (err error) {
varInlineObject1 := _InlineObject1{}
if err = json.Unmarshal(bytes, &varInlineObject1); err == nil {
*o = InlineObject1(varInlineObject1)
}
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(bytes, &additionalProperties); err == nil {
delete(additionalProperties, "additionalMetadata")
delete(additionalProperties, "file")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableInlineObject1 struct {
value *InlineObject1
isSet bool
}
func (v NullableInlineObject1) Get() *InlineObject1 {
return v.value
}
func (v *NullableInlineObject1) Set(val *InlineObject1) {
v.value = val
v.isSet = true
}
func (v NullableInlineObject1) IsSet() bool {
return v.isSet
}
func (v *NullableInlineObject1) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableInlineObject1(val *InlineObject1) *NullableInlineObject1 {
return &NullableInlineObject1{value: val, isSet: true}
}
func (v NullableInlineObject1) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableInlineObject1) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View File

@@ -1,181 +0,0 @@
/*
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* API version: 1.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package petstore
import (
"encoding/json"
)
// InlineObject2 struct for InlineObject2
type InlineObject2 struct {
// Form parameter enum test (string array)
EnumFormStringArray *[]string `json:"enum_form_string_array,omitempty"`
// Form parameter enum test (string)
EnumFormString *string `json:"enum_form_string,omitempty"`
AdditionalProperties map[string]interface{}
}
type _InlineObject2 InlineObject2
// NewInlineObject2 instantiates a new InlineObject2 object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewInlineObject2() *InlineObject2 {
this := InlineObject2{}
var enumFormString string = "-efg"
this.EnumFormString = &enumFormString
return &this
}
// NewInlineObject2WithDefaults instantiates a new InlineObject2 object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewInlineObject2WithDefaults() *InlineObject2 {
this := InlineObject2{}
var enumFormString string = "-efg"
this.EnumFormString = &enumFormString
return &this
}
// GetEnumFormStringArray returns the EnumFormStringArray field value if set, zero value otherwise.
func (o *InlineObject2) GetEnumFormStringArray() []string {
if o == nil || o.EnumFormStringArray == nil {
var ret []string
return ret
}
return *o.EnumFormStringArray
}
// GetEnumFormStringArrayOk returns a tuple with the EnumFormStringArray field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InlineObject2) GetEnumFormStringArrayOk() (*[]string, bool) {
if o == nil || o.EnumFormStringArray == nil {
return nil, false
}
return o.EnumFormStringArray, true
}
// HasEnumFormStringArray returns a boolean if a field has been set.
func (o *InlineObject2) HasEnumFormStringArray() bool {
if o != nil && o.EnumFormStringArray != nil {
return true
}
return false
}
// SetEnumFormStringArray gets a reference to the given []string and assigns it to the EnumFormStringArray field.
func (o *InlineObject2) SetEnumFormStringArray(v []string) {
o.EnumFormStringArray = &v
}
// GetEnumFormString returns the EnumFormString field value if set, zero value otherwise.
func (o *InlineObject2) GetEnumFormString() string {
if o == nil || o.EnumFormString == nil {
var ret string
return ret
}
return *o.EnumFormString
}
// GetEnumFormStringOk returns a tuple with the EnumFormString field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InlineObject2) GetEnumFormStringOk() (*string, bool) {
if o == nil || o.EnumFormString == nil {
return nil, false
}
return o.EnumFormString, true
}
// HasEnumFormString returns a boolean if a field has been set.
func (o *InlineObject2) HasEnumFormString() bool {
if o != nil && o.EnumFormString != nil {
return true
}
return false
}
// SetEnumFormString gets a reference to the given string and assigns it to the EnumFormString field.
func (o *InlineObject2) SetEnumFormString(v string) {
o.EnumFormString = &v
}
func (o InlineObject2) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.EnumFormStringArray != nil {
toSerialize["enum_form_string_array"] = o.EnumFormStringArray
}
if o.EnumFormString != nil {
toSerialize["enum_form_string"] = o.EnumFormString
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return json.Marshal(toSerialize)
}
func (o *InlineObject2) UnmarshalJSON(bytes []byte) (err error) {
varInlineObject2 := _InlineObject2{}
if err = json.Unmarshal(bytes, &varInlineObject2); err == nil {
*o = InlineObject2(varInlineObject2)
}
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(bytes, &additionalProperties); err == nil {
delete(additionalProperties, "enum_form_string_array")
delete(additionalProperties, "enum_form_string")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableInlineObject2 struct {
value *InlineObject2
isSet bool
}
func (v NullableInlineObject2) Get() *InlineObject2 {
return v.value
}
func (v *NullableInlineObject2) Set(val *InlineObject2) {
v.value = val
v.isSet = true
}
func (v NullableInlineObject2) IsSet() bool {
return v.isSet
}
func (v *NullableInlineObject2) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableInlineObject2(val *InlineObject2) *NullableInlineObject2 {
return &NullableInlineObject2{value: val, isSet: true}
}
func (v NullableInlineObject2) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableInlineObject2) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View File

@@ -1,607 +0,0 @@
/*
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* API version: 1.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package petstore
import (
"encoding/json"
"os"
"time"
)
// InlineObject3 struct for InlineObject3
type InlineObject3 struct {
// None
Integer *int32 `json:"integer,omitempty"`
// None
Int32 *int32 `json:"int32,omitempty"`
// None
Int64 *int64 `json:"int64,omitempty"`
// None
Number float32 `json:"number"`
// None
Float *float32 `json:"float,omitempty"`
// None
Double float64 `json:"double"`
// None
String *string `json:"string,omitempty"`
// None
PatternWithoutDelimiter string `json:"pattern_without_delimiter"`
// None
Byte string `json:"byte"`
// None
Binary **os.File `json:"binary,omitempty"`
// None
Date *string `json:"date,omitempty"`
// None
DateTime *time.Time `json:"dateTime,omitempty"`
// None
Password *string `json:"password,omitempty"`
// None
Callback *string `json:"callback,omitempty"`
AdditionalProperties map[string]interface{}
}
type _InlineObject3 InlineObject3
// NewInlineObject3 instantiates a new InlineObject3 object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewInlineObject3(number float32, double float64, patternWithoutDelimiter string, byte_ string) *InlineObject3 {
this := InlineObject3{}
this.Number = number
this.Double = double
this.PatternWithoutDelimiter = patternWithoutDelimiter
this.Byte = byte_
return &this
}
// NewInlineObject3WithDefaults instantiates a new InlineObject3 object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewInlineObject3WithDefaults() *InlineObject3 {
this := InlineObject3{}
return &this
}
// GetInteger returns the Integer field value if set, zero value otherwise.
func (o *InlineObject3) GetInteger() int32 {
if o == nil || o.Integer == nil {
var ret int32
return ret
}
return *o.Integer
}
// GetIntegerOk returns a tuple with the Integer field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InlineObject3) GetIntegerOk() (*int32, bool) {
if o == nil || o.Integer == nil {
return nil, false
}
return o.Integer, true
}
// HasInteger returns a boolean if a field has been set.
func (o *InlineObject3) HasInteger() bool {
if o != nil && o.Integer != nil {
return true
}
return false
}
// SetInteger gets a reference to the given int32 and assigns it to the Integer field.
func (o *InlineObject3) SetInteger(v int32) {
o.Integer = &v
}
// GetInt32 returns the Int32 field value if set, zero value otherwise.
func (o *InlineObject3) GetInt32() int32 {
if o == nil || o.Int32 == nil {
var ret int32
return ret
}
return *o.Int32
}
// GetInt32Ok returns a tuple with the Int32 field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InlineObject3) GetInt32Ok() (*int32, bool) {
if o == nil || o.Int32 == nil {
return nil, false
}
return o.Int32, true
}
// HasInt32 returns a boolean if a field has been set.
func (o *InlineObject3) HasInt32() bool {
if o != nil && o.Int32 != nil {
return true
}
return false
}
// SetInt32 gets a reference to the given int32 and assigns it to the Int32 field.
func (o *InlineObject3) SetInt32(v int32) {
o.Int32 = &v
}
// GetInt64 returns the Int64 field value if set, zero value otherwise.
func (o *InlineObject3) GetInt64() int64 {
if o == nil || o.Int64 == nil {
var ret int64
return ret
}
return *o.Int64
}
// GetInt64Ok returns a tuple with the Int64 field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InlineObject3) GetInt64Ok() (*int64, bool) {
if o == nil || o.Int64 == nil {
return nil, false
}
return o.Int64, true
}
// HasInt64 returns a boolean if a field has been set.
func (o *InlineObject3) HasInt64() bool {
if o != nil && o.Int64 != nil {
return true
}
return false
}
// SetInt64 gets a reference to the given int64 and assigns it to the Int64 field.
func (o *InlineObject3) SetInt64(v int64) {
o.Int64 = &v
}
// GetNumber returns the Number field value
func (o *InlineObject3) GetNumber() float32 {
if o == nil {
var ret float32
return ret
}
return o.Number
}
// GetNumberOk returns a tuple with the Number field value
// and a boolean to check if the value has been set.
func (o *InlineObject3) GetNumberOk() (*float32, bool) {
if o == nil {
return nil, false
}
return &o.Number, true
}
// SetNumber sets field value
func (o *InlineObject3) SetNumber(v float32) {
o.Number = v
}
// GetFloat returns the Float field value if set, zero value otherwise.
func (o *InlineObject3) GetFloat() float32 {
if o == nil || o.Float == nil {
var ret float32
return ret
}
return *o.Float
}
// GetFloatOk returns a tuple with the Float field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InlineObject3) GetFloatOk() (*float32, bool) {
if o == nil || o.Float == nil {
return nil, false
}
return o.Float, true
}
// HasFloat returns a boolean if a field has been set.
func (o *InlineObject3) HasFloat() bool {
if o != nil && o.Float != nil {
return true
}
return false
}
// SetFloat gets a reference to the given float32 and assigns it to the Float field.
func (o *InlineObject3) SetFloat(v float32) {
o.Float = &v
}
// GetDouble returns the Double field value
func (o *InlineObject3) GetDouble() float64 {
if o == nil {
var ret float64
return ret
}
return o.Double
}
// GetDoubleOk returns a tuple with the Double field value
// and a boolean to check if the value has been set.
func (o *InlineObject3) GetDoubleOk() (*float64, bool) {
if o == nil {
return nil, false
}
return &o.Double, true
}
// SetDouble sets field value
func (o *InlineObject3) SetDouble(v float64) {
o.Double = v
}
// GetString returns the String field value if set, zero value otherwise.
func (o *InlineObject3) GetString() string {
if o == nil || o.String == nil {
var ret string
return ret
}
return *o.String
}
// GetStringOk returns a tuple with the String field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InlineObject3) GetStringOk() (*string, bool) {
if o == nil || o.String == nil {
return nil, false
}
return o.String, true
}
// HasString returns a boolean if a field has been set.
func (o *InlineObject3) HasString() bool {
if o != nil && o.String != nil {
return true
}
return false
}
// SetString gets a reference to the given string and assigns it to the String field.
func (o *InlineObject3) SetString(v string) {
o.String = &v
}
// GetPatternWithoutDelimiter returns the PatternWithoutDelimiter field value
func (o *InlineObject3) GetPatternWithoutDelimiter() string {
if o == nil {
var ret string
return ret
}
return o.PatternWithoutDelimiter
}
// GetPatternWithoutDelimiterOk returns a tuple with the PatternWithoutDelimiter field value
// and a boolean to check if the value has been set.
func (o *InlineObject3) GetPatternWithoutDelimiterOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.PatternWithoutDelimiter, true
}
// SetPatternWithoutDelimiter sets field value
func (o *InlineObject3) SetPatternWithoutDelimiter(v string) {
o.PatternWithoutDelimiter = v
}
// GetByte returns the Byte field value
func (o *InlineObject3) GetByte() string {
if o == nil {
var ret string
return ret
}
return o.Byte
}
// GetByteOk returns a tuple with the Byte field value
// and a boolean to check if the value has been set.
func (o *InlineObject3) GetByteOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Byte, true
}
// SetByte sets field value
func (o *InlineObject3) SetByte(v string) {
o.Byte = v
}
// GetBinary returns the Binary field value if set, zero value otherwise.
func (o *InlineObject3) GetBinary() *os.File {
if o == nil || o.Binary == nil {
var ret *os.File
return ret
}
return *o.Binary
}
// GetBinaryOk returns a tuple with the Binary field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InlineObject3) GetBinaryOk() (**os.File, bool) {
if o == nil || o.Binary == nil {
return nil, false
}
return o.Binary, true
}
// HasBinary returns a boolean if a field has been set.
func (o *InlineObject3) HasBinary() bool {
if o != nil && o.Binary != nil {
return true
}
return false
}
// SetBinary gets a reference to the given *os.File and assigns it to the Binary field.
func (o *InlineObject3) SetBinary(v *os.File) {
o.Binary = &v
}
// GetDate returns the Date field value if set, zero value otherwise.
func (o *InlineObject3) GetDate() string {
if o == nil || o.Date == nil {
var ret string
return ret
}
return *o.Date
}
// GetDateOk returns a tuple with the Date field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InlineObject3) GetDateOk() (*string, bool) {
if o == nil || o.Date == nil {
return nil, false
}
return o.Date, true
}
// HasDate returns a boolean if a field has been set.
func (o *InlineObject3) HasDate() bool {
if o != nil && o.Date != nil {
return true
}
return false
}
// SetDate gets a reference to the given string and assigns it to the Date field.
func (o *InlineObject3) SetDate(v string) {
o.Date = &v
}
// GetDateTime returns the DateTime field value if set, zero value otherwise.
func (o *InlineObject3) GetDateTime() time.Time {
if o == nil || o.DateTime == nil {
var ret time.Time
return ret
}
return *o.DateTime
}
// GetDateTimeOk returns a tuple with the DateTime field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InlineObject3) GetDateTimeOk() (*time.Time, bool) {
if o == nil || o.DateTime == nil {
return nil, false
}
return o.DateTime, true
}
// HasDateTime returns a boolean if a field has been set.
func (o *InlineObject3) HasDateTime() bool {
if o != nil && o.DateTime != nil {
return true
}
return false
}
// SetDateTime gets a reference to the given time.Time and assigns it to the DateTime field.
func (o *InlineObject3) SetDateTime(v time.Time) {
o.DateTime = &v
}
// GetPassword returns the Password field value if set, zero value otherwise.
func (o *InlineObject3) GetPassword() string {
if o == nil || o.Password == nil {
var ret string
return ret
}
return *o.Password
}
// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InlineObject3) GetPasswordOk() (*string, bool) {
if o == nil || o.Password == nil {
return nil, false
}
return o.Password, true
}
// HasPassword returns a boolean if a field has been set.
func (o *InlineObject3) HasPassword() bool {
if o != nil && o.Password != nil {
return true
}
return false
}
// SetPassword gets a reference to the given string and assigns it to the Password field.
func (o *InlineObject3) SetPassword(v string) {
o.Password = &v
}
// GetCallback returns the Callback field value if set, zero value otherwise.
func (o *InlineObject3) GetCallback() string {
if o == nil || o.Callback == nil {
var ret string
return ret
}
return *o.Callback
}
// GetCallbackOk returns a tuple with the Callback field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InlineObject3) GetCallbackOk() (*string, bool) {
if o == nil || o.Callback == nil {
return nil, false
}
return o.Callback, true
}
// HasCallback returns a boolean if a field has been set.
func (o *InlineObject3) HasCallback() bool {
if o != nil && o.Callback != nil {
return true
}
return false
}
// SetCallback gets a reference to the given string and assigns it to the Callback field.
func (o *InlineObject3) SetCallback(v string) {
o.Callback = &v
}
func (o InlineObject3) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.Integer != nil {
toSerialize["integer"] = o.Integer
}
if o.Int32 != nil {
toSerialize["int32"] = o.Int32
}
if o.Int64 != nil {
toSerialize["int64"] = o.Int64
}
if true {
toSerialize["number"] = o.Number
}
if o.Float != nil {
toSerialize["float"] = o.Float
}
if true {
toSerialize["double"] = o.Double
}
if o.String != nil {
toSerialize["string"] = o.String
}
if true {
toSerialize["pattern_without_delimiter"] = o.PatternWithoutDelimiter
}
if true {
toSerialize["byte"] = o.Byte
}
if o.Binary != nil {
toSerialize["binary"] = o.Binary
}
if o.Date != nil {
toSerialize["date"] = o.Date
}
if o.DateTime != nil {
toSerialize["dateTime"] = o.DateTime
}
if o.Password != nil {
toSerialize["password"] = o.Password
}
if o.Callback != nil {
toSerialize["callback"] = o.Callback
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return json.Marshal(toSerialize)
}
func (o *InlineObject3) UnmarshalJSON(bytes []byte) (err error) {
varInlineObject3 := _InlineObject3{}
if err = json.Unmarshal(bytes, &varInlineObject3); err == nil {
*o = InlineObject3(varInlineObject3)
}
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(bytes, &additionalProperties); err == nil {
delete(additionalProperties, "integer")
delete(additionalProperties, "int32")
delete(additionalProperties, "int64")
delete(additionalProperties, "number")
delete(additionalProperties, "float")
delete(additionalProperties, "double")
delete(additionalProperties, "string")
delete(additionalProperties, "pattern_without_delimiter")
delete(additionalProperties, "byte")
delete(additionalProperties, "binary")
delete(additionalProperties, "date")
delete(additionalProperties, "dateTime")
delete(additionalProperties, "password")
delete(additionalProperties, "callback")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableInlineObject3 struct {
value *InlineObject3
isSet bool
}
func (v NullableInlineObject3) Get() *InlineObject3 {
return v.value
}
func (v *NullableInlineObject3) Set(val *InlineObject3) {
v.value = val
v.isSet = true
}
func (v NullableInlineObject3) IsSet() bool {
return v.isSet
}
func (v *NullableInlineObject3) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableInlineObject3(val *InlineObject3) *NullableInlineObject3 {
return &NullableInlineObject3{value: val, isSet: true}
}
func (v NullableInlineObject3) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableInlineObject3) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View File

@@ -1,163 +0,0 @@
/*
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* API version: 1.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package petstore
import (
"encoding/json"
)
// InlineObject4 struct for InlineObject4
type InlineObject4 struct {
// field1
Param string `json:"param"`
// field2
Param2 string `json:"param2"`
AdditionalProperties map[string]interface{}
}
type _InlineObject4 InlineObject4
// NewInlineObject4 instantiates a new InlineObject4 object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewInlineObject4(param string, param2 string) *InlineObject4 {
this := InlineObject4{}
this.Param = param
this.Param2 = param2
return &this
}
// NewInlineObject4WithDefaults instantiates a new InlineObject4 object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewInlineObject4WithDefaults() *InlineObject4 {
this := InlineObject4{}
return &this
}
// GetParam returns the Param field value
func (o *InlineObject4) GetParam() string {
if o == nil {
var ret string
return ret
}
return o.Param
}
// GetParamOk returns a tuple with the Param field value
// and a boolean to check if the value has been set.
func (o *InlineObject4) GetParamOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Param, true
}
// SetParam sets field value
func (o *InlineObject4) SetParam(v string) {
o.Param = v
}
// GetParam2 returns the Param2 field value
func (o *InlineObject4) GetParam2() string {
if o == nil {
var ret string
return ret
}
return o.Param2
}
// GetParam2Ok returns a tuple with the Param2 field value
// and a boolean to check if the value has been set.
func (o *InlineObject4) GetParam2Ok() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Param2, true
}
// SetParam2 sets field value
func (o *InlineObject4) SetParam2(v string) {
o.Param2 = v
}
func (o InlineObject4) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if true {
toSerialize["param"] = o.Param
}
if true {
toSerialize["param2"] = o.Param2
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return json.Marshal(toSerialize)
}
func (o *InlineObject4) UnmarshalJSON(bytes []byte) (err error) {
varInlineObject4 := _InlineObject4{}
if err = json.Unmarshal(bytes, &varInlineObject4); err == nil {
*o = InlineObject4(varInlineObject4)
}
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(bytes, &additionalProperties); err == nil {
delete(additionalProperties, "param")
delete(additionalProperties, "param2")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableInlineObject4 struct {
value *InlineObject4
isSet bool
}
func (v NullableInlineObject4) Get() *InlineObject4 {
return v.value
}
func (v *NullableInlineObject4) Set(val *InlineObject4) {
v.value = val
v.isSet = true
}
func (v NullableInlineObject4) IsSet() bool {
return v.isSet
}
func (v *NullableInlineObject4) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableInlineObject4(val *InlineObject4) *NullableInlineObject4 {
return &NullableInlineObject4{value: val, isSet: true}
}
func (v NullableInlineObject4) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableInlineObject4) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View File

@@ -1,171 +0,0 @@
/*
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* API version: 1.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package petstore
import (
"encoding/json"
"os"
)
// InlineObject5 struct for InlineObject5
type InlineObject5 struct {
// Additional data to pass to server
AdditionalMetadata *string `json:"additionalMetadata,omitempty"`
// file to upload
RequiredFile *os.File `json:"requiredFile"`
AdditionalProperties map[string]interface{}
}
type _InlineObject5 InlineObject5
// NewInlineObject5 instantiates a new InlineObject5 object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewInlineObject5(requiredFile *os.File) *InlineObject5 {
this := InlineObject5{}
this.RequiredFile = requiredFile
return &this
}
// NewInlineObject5WithDefaults instantiates a new InlineObject5 object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewInlineObject5WithDefaults() *InlineObject5 {
this := InlineObject5{}
return &this
}
// GetAdditionalMetadata returns the AdditionalMetadata field value if set, zero value otherwise.
func (o *InlineObject5) GetAdditionalMetadata() string {
if o == nil || o.AdditionalMetadata == nil {
var ret string
return ret
}
return *o.AdditionalMetadata
}
// GetAdditionalMetadataOk returns a tuple with the AdditionalMetadata field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InlineObject5) GetAdditionalMetadataOk() (*string, bool) {
if o == nil || o.AdditionalMetadata == nil {
return nil, false
}
return o.AdditionalMetadata, true
}
// HasAdditionalMetadata returns a boolean if a field has been set.
func (o *InlineObject5) HasAdditionalMetadata() bool {
if o != nil && o.AdditionalMetadata != nil {
return true
}
return false
}
// SetAdditionalMetadata gets a reference to the given string and assigns it to the AdditionalMetadata field.
func (o *InlineObject5) SetAdditionalMetadata(v string) {
o.AdditionalMetadata = &v
}
// GetRequiredFile returns the RequiredFile field value
func (o *InlineObject5) GetRequiredFile() *os.File {
if o == nil {
var ret *os.File
return ret
}
return o.RequiredFile
}
// GetRequiredFileOk returns a tuple with the RequiredFile field value
// and a boolean to check if the value has been set.
func (o *InlineObject5) GetRequiredFileOk() (**os.File, bool) {
if o == nil {
return nil, false
}
return &o.RequiredFile, true
}
// SetRequiredFile sets field value
func (o *InlineObject5) SetRequiredFile(v *os.File) {
o.RequiredFile = v
}
func (o InlineObject5) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.AdditionalMetadata != nil {
toSerialize["additionalMetadata"] = o.AdditionalMetadata
}
if true {
toSerialize["requiredFile"] = o.RequiredFile
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return json.Marshal(toSerialize)
}
func (o *InlineObject5) UnmarshalJSON(bytes []byte) (err error) {
varInlineObject5 := _InlineObject5{}
if err = json.Unmarshal(bytes, &varInlineObject5); err == nil {
*o = InlineObject5(varInlineObject5)
}
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(bytes, &additionalProperties); err == nil {
delete(additionalProperties, "additionalMetadata")
delete(additionalProperties, "requiredFile")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableInlineObject5 struct {
value *InlineObject5
isSet bool
}
func (v NullableInlineObject5) Get() *InlineObject5 {
return v.value
}
func (v *NullableInlineObject5) Set(val *InlineObject5) {
v.value = val
v.isSet = true
}
func (v NullableInlineObject5) IsSet() bool {
return v.isSet
}
func (v *NullableInlineObject5) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableInlineObject5(val *InlineObject5) *NullableInlineObject5 {
return &NullableInlineObject5{value: val, isSet: true}
}
func (v NullableInlineObject5) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableInlineObject5) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View File

@@ -1,140 +0,0 @@
/*
OpenAPI Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
API version: 1.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package petstore
import (
"encoding/json"
)
// InlineResponseDefault struct for InlineResponseDefault
type InlineResponseDefault struct {
String *Foo `json:"string,omitempty"`
AdditionalProperties map[string]interface{}
}
type _InlineResponseDefault InlineResponseDefault
// NewInlineResponseDefault instantiates a new InlineResponseDefault object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewInlineResponseDefault() *InlineResponseDefault {
this := InlineResponseDefault{}
return &this
}
// NewInlineResponseDefaultWithDefaults instantiates a new InlineResponseDefault object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewInlineResponseDefaultWithDefaults() *InlineResponseDefault {
this := InlineResponseDefault{}
return &this
}
// GetString returns the String field value if set, zero value otherwise.
func (o *InlineResponseDefault) GetString() Foo {
if o == nil || o.String == nil {
var ret Foo
return ret
}
return *o.String
}
// GetStringOk returns a tuple with the String field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InlineResponseDefault) GetStringOk() (*Foo, bool) {
if o == nil || o.String == nil {
return nil, false
}
return o.String, true
}
// HasString returns a boolean if a field has been set.
func (o *InlineResponseDefault) HasString() bool {
if o != nil && o.String != nil {
return true
}
return false
}
// SetString gets a reference to the given Foo and assigns it to the String field.
func (o *InlineResponseDefault) SetString(v Foo) {
o.String = &v
}
func (o InlineResponseDefault) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.String != nil {
toSerialize["string"] = o.String
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return json.Marshal(toSerialize)
}
func (o *InlineResponseDefault) UnmarshalJSON(bytes []byte) (err error) {
varInlineResponseDefault := _InlineResponseDefault{}
if err = json.Unmarshal(bytes, &varInlineResponseDefault); err == nil {
*o = InlineResponseDefault(varInlineResponseDefault)
}
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(bytes, &additionalProperties); err == nil {
delete(additionalProperties, "string")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableInlineResponseDefault struct {
value *InlineResponseDefault
isSet bool
}
func (v NullableInlineResponseDefault) Get() *InlineResponseDefault {
return v.value
}
func (v *NullableInlineResponseDefault) Set(val *InlineResponseDefault) {
v.value = val
v.isSet = true
}
func (v NullableInlineResponseDefault) IsSet() bool {
return v.isSet
}
func (v *NullableInlineResponseDefault) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableInlineResponseDefault(val *InlineResponseDefault) *NullableInlineResponseDefault {
return &NullableInlineResponseDefault{value: val, isSet: true}
}
func (v NullableInlineResponseDefault) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableInlineResponseDefault) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View File

@@ -1,106 +0,0 @@
/*
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* API version: 1.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package petstore
import (
"encoding/json"
)
// OuterObjectWithEnumProperty struct for OuterObjectWithEnumProperty
type OuterObjectWithEnumProperty struct {
Value OuterEnumInteger `json:"value"`
}
// NewOuterObjectWithEnumProperty instantiates a new OuterObjectWithEnumProperty object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewOuterObjectWithEnumProperty(value OuterEnumInteger) *OuterObjectWithEnumProperty {
this := OuterObjectWithEnumProperty{}
this.Value = value
return &this
}
// NewOuterObjectWithEnumPropertyWithDefaults instantiates a new OuterObjectWithEnumProperty object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewOuterObjectWithEnumPropertyWithDefaults() *OuterObjectWithEnumProperty {
this := OuterObjectWithEnumProperty{}
return &this
}
// GetValue returns the Value field value
func (o *OuterObjectWithEnumProperty) GetValue() OuterEnumInteger {
if o == nil {
var ret OuterEnumInteger
return ret
}
return o.Value
}
// GetValueOk returns a tuple with the Value field value
// and a boolean to check if the value has been set.
func (o *OuterObjectWithEnumProperty) GetValueOk() (*OuterEnumInteger, bool) {
if o == nil {
return nil, false
}
return &o.Value, true
}
// SetValue sets field value
func (o *OuterObjectWithEnumProperty) SetValue(v OuterEnumInteger) {
o.Value = v
}
func (o OuterObjectWithEnumProperty) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if true {
toSerialize["value"] = o.Value
}
return json.Marshal(toSerialize)
}
type NullableOuterObjectWithEnumProperty struct {
value *OuterObjectWithEnumProperty
isSet bool
}
func (v NullableOuterObjectWithEnumProperty) Get() *OuterObjectWithEnumProperty {
return v.value
}
func (v *NullableOuterObjectWithEnumProperty) Set(val *OuterObjectWithEnumProperty) {
v.value = val
v.isSet = true
}
func (v NullableOuterObjectWithEnumProperty) IsSet() bool {
return v.isSet
}
func (v *NullableOuterObjectWithEnumProperty) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableOuterObjectWithEnumProperty(val *OuterObjectWithEnumProperty) *NullableOuterObjectWithEnumProperty {
return &NullableOuterObjectWithEnumProperty{value: val, isSet: true}
}
func (v NullableOuterObjectWithEnumProperty) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableOuterObjectWithEnumProperty) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View File

@@ -1,7 +1,7 @@
/* /*
OpenAPI Petstore OpenAPI Petstore
Testing AnotherFakeApiService Testing AnotherFakeAPIService
*/ */
@@ -17,16 +17,16 @@ import (
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
) )
func Test_petstore_AnotherFakeApiService(t *testing.T) { func Test_petstore_AnotherFakeAPIService(t *testing.T) {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
t.Run("Test AnotherFakeApiService Call123TestSpecialTags", func(t *testing.T) { t.Run("Test AnotherFakeAPIService Call123TestSpecialTags", func(t *testing.T) {
t.Skip("skip test") // remove to run test t.Skip("skip test") // remove to run test
resp, httpRes, err := apiClient.AnotherFakeApi.Call123TestSpecialTags(context.Background()).Execute() resp, httpRes, err := apiClient.AnotherFakeAPI.Call123TestSpecialTags(context.Background()).Execute()
require.Nil(t, err) require.Nil(t, err)
require.NotNil(t, resp) require.NotNil(t, resp)

View File

@@ -1,7 +1,7 @@
/* /*
OpenAPI Petstore OpenAPI Petstore
Testing DefaultApiService Testing DefaultAPIService
*/ */
@@ -17,16 +17,16 @@ import (
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
) )
func Test_petstore_DefaultApiService(t *testing.T) { func Test_petstore_DefaultAPIService(t *testing.T) {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
t.Run("Test DefaultApiService FooGet", func(t *testing.T) { t.Run("Test DefaultAPIService FooGet", func(t *testing.T) {
t.Skip("skip test") // remove to run test t.Skip("skip test") // remove to run test
resp, httpRes, err := apiClient.DefaultApi.FooGet(context.Background()).Execute() resp, httpRes, err := apiClient.DefaultAPI.FooGet(context.Background()).Execute()
require.Nil(t, err) require.Nil(t, err)
require.NotNil(t, resp) require.NotNil(t, resp)

View File

@@ -1,7 +1,7 @@
/* /*
OpenAPI Petstore OpenAPI Petstore
Testing FakeClassnameTags123ApiService Testing FakeClassnameTags123APIService
*/ */
@@ -17,16 +17,16 @@ import (
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
) )
func Test_petstore_FakeClassnameTags123ApiService(t *testing.T) { func Test_petstore_FakeClassnameTags123APIService(t *testing.T) {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
t.Run("Test FakeClassnameTags123ApiService TestClassname", func(t *testing.T) { t.Run("Test FakeClassnameTags123APIService TestClassname", func(t *testing.T) {
t.Skip("skip test") // remove to run test t.Skip("skip test") // remove to run test
resp, httpRes, err := apiClient.FakeClassnameTags123Api.TestClassname(context.Background()).Execute() resp, httpRes, err := apiClient.FakeClassnameTags123API.TestClassname(context.Background()).Execute()
require.Nil(t, err) require.Nil(t, err)
require.NotNil(t, resp) require.NotNil(t, resp)

View File

@@ -1,7 +1,7 @@
/* /*
OpenAPI Petstore OpenAPI Petstore
Testing FakeApiService Testing FakeAPIService
*/ */
@@ -17,16 +17,16 @@ import (
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
) )
func Test_petstore_FakeApiService(t *testing.T) { func Test_petstore_FakeAPIService(t *testing.T) {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
t.Run("Test FakeApiService FakeHealthGet", func(t *testing.T) { t.Run("Test FakeAPIService FakeHealthGet", func(t *testing.T) {
t.Skip("skip test") // remove to run test t.Skip("skip test") // remove to run test
resp, httpRes, err := apiClient.FakeApi.FakeHealthGet(context.Background()).Execute() resp, httpRes, err := apiClient.FakeAPI.FakeHealthGet(context.Background()).Execute()
require.Nil(t, err) require.Nil(t, err)
require.NotNil(t, resp) require.NotNil(t, resp)
@@ -34,11 +34,11 @@ func Test_petstore_FakeApiService(t *testing.T) {
}) })
t.Run("Test FakeApiService FakeOuterBooleanSerialize", func(t *testing.T) { t.Run("Test FakeAPIService FakeOuterBooleanSerialize", func(t *testing.T) {
t.Skip("skip test") // remove to run test t.Skip("skip test") // remove to run test
resp, httpRes, err := apiClient.FakeApi.FakeOuterBooleanSerialize(context.Background()).Execute() resp, httpRes, err := apiClient.FakeAPI.FakeOuterBooleanSerialize(context.Background()).Execute()
require.Nil(t, err) require.Nil(t, err)
require.NotNil(t, resp) require.NotNil(t, resp)
@@ -46,11 +46,11 @@ func Test_petstore_FakeApiService(t *testing.T) {
}) })
t.Run("Test FakeApiService FakeOuterCompositeSerialize", func(t *testing.T) { t.Run("Test FakeAPIService FakeOuterCompositeSerialize", func(t *testing.T) {
t.Skip("skip test") // remove to run test t.Skip("skip test") // remove to run test
resp, httpRes, err := apiClient.FakeApi.FakeOuterCompositeSerialize(context.Background()).Execute() resp, httpRes, err := apiClient.FakeAPI.FakeOuterCompositeSerialize(context.Background()).Execute()
require.Nil(t, err) require.Nil(t, err)
require.NotNil(t, resp) require.NotNil(t, resp)
@@ -58,11 +58,11 @@ func Test_petstore_FakeApiService(t *testing.T) {
}) })
t.Run("Test FakeApiService FakeOuterNumberSerialize", func(t *testing.T) { t.Run("Test FakeAPIService FakeOuterNumberSerialize", func(t *testing.T) {
t.Skip("skip test") // remove to run test t.Skip("skip test") // remove to run test
resp, httpRes, err := apiClient.FakeApi.FakeOuterNumberSerialize(context.Background()).Execute() resp, httpRes, err := apiClient.FakeAPI.FakeOuterNumberSerialize(context.Background()).Execute()
require.Nil(t, err) require.Nil(t, err)
require.NotNil(t, resp) require.NotNil(t, resp)
@@ -70,11 +70,11 @@ func Test_petstore_FakeApiService(t *testing.T) {
}) })
t.Run("Test FakeApiService FakeOuterStringSerialize", func(t *testing.T) { t.Run("Test FakeAPIService FakeOuterStringSerialize", func(t *testing.T) {
t.Skip("skip test") // remove to run test t.Skip("skip test") // remove to run test
resp, httpRes, err := apiClient.FakeApi.FakeOuterStringSerialize(context.Background()).Execute() resp, httpRes, err := apiClient.FakeAPI.FakeOuterStringSerialize(context.Background()).Execute()
require.Nil(t, err) require.Nil(t, err)
require.NotNil(t, resp) require.NotNil(t, resp)
@@ -82,11 +82,33 @@ func Test_petstore_FakeApiService(t *testing.T) {
}) })
t.Run("Test FakeApiService TestBodyWithFileSchema", func(t *testing.T) { t.Run("Test FakeAPIService TestBodyWithFileSchema", func(t *testing.T) {
t.Skip("skip test") // remove to run test t.Skip("skip test") // remove to run test
resp, httpRes, err := apiClient.FakeApi.TestBodyWithFileSchema(context.Background()).Execute() httpRes, err := apiClient.FakeAPI.TestBodyWithFileSchema(context.Background()).Execute()
require.Nil(t, err)
assert.Equal(t, 200, httpRes.StatusCode)
})
t.Run("Test FakeAPIService TestBodyWithQueryParams", func(t *testing.T) {
t.Skip("skip test") // remove to run test
httpRes, err := apiClient.FakeAPI.TestBodyWithQueryParams(context.Background()).Execute()
require.Nil(t, err)
assert.Equal(t, 200, httpRes.StatusCode)
})
t.Run("Test FakeAPIService TestClientModel", func(t *testing.T) {
t.Skip("skip test") // remove to run test
resp, httpRes, err := apiClient.FakeAPI.TestClientModel(context.Background()).Execute()
require.Nil(t, err) require.Nil(t, err)
require.NotNil(t, resp) require.NotNil(t, resp)
@@ -94,107 +116,88 @@ func Test_petstore_FakeApiService(t *testing.T) {
}) })
t.Run("Test FakeApiService TestBodyWithQueryParams", func(t *testing.T) { t.Run("Test FakeAPIService TestEndpointParameters", func(t *testing.T) {
t.Skip("skip test") // remove to run test t.Skip("skip test") // remove to run test
resp, httpRes, err := apiClient.FakeApi.TestBodyWithQueryParams(context.Background()).Execute() httpRes, err := apiClient.FakeAPI.TestEndpointParameters(context.Background()).Execute()
require.Nil(t, err) require.Nil(t, err)
require.NotNil(t, resp)
assert.Equal(t, 200, httpRes.StatusCode) assert.Equal(t, 200, httpRes.StatusCode)
}) })
t.Run("Test FakeApiService TestClientModel", func(t *testing.T) { t.Run("Test FakeAPIService TestEnumParameters", func(t *testing.T) {
t.Skip("skip test") // remove to run test t.Skip("skip test") // remove to run test
resp, httpRes, err := apiClient.FakeApi.TestClientModel(context.Background()).Execute() httpRes, err := apiClient.FakeAPI.TestEnumParameters(context.Background()).Execute()
require.Nil(t, err) require.Nil(t, err)
require.NotNil(t, resp)
assert.Equal(t, 200, httpRes.StatusCode) assert.Equal(t, 200, httpRes.StatusCode)
}) })
t.Run("Test FakeApiService TestEndpointParameters", func(t *testing.T) { t.Run("Test FakeAPIService TestGroupParameters", func(t *testing.T) {
t.Skip("skip test") // remove to run test t.Skip("skip test") // remove to run test
resp, httpRes, err := apiClient.FakeApi.TestEndpointParameters(context.Background()).Execute() httpRes, err := apiClient.FakeAPI.TestGroupParameters(context.Background()).Execute()
require.Nil(t, err) require.Nil(t, err)
require.NotNil(t, resp)
assert.Equal(t, 200, httpRes.StatusCode) assert.Equal(t, 200, httpRes.StatusCode)
}) })
t.Run("Test FakeApiService TestEnumParameters", func(t *testing.T) { t.Run("Test FakeAPIService TestInlineAdditionalProperties", func(t *testing.T) {
t.Skip("skip test") // remove to run test t.Skip("skip test") // remove to run test
resp, httpRes, err := apiClient.FakeApi.TestEnumParameters(context.Background()).Execute() httpRes, err := apiClient.FakeAPI.TestInlineAdditionalProperties(context.Background()).Execute()
require.Nil(t, err) require.Nil(t, err)
require.NotNil(t, resp)
assert.Equal(t, 200, httpRes.StatusCode) assert.Equal(t, 200, httpRes.StatusCode)
}) })
t.Run("Test FakeApiService TestGroupParameters", func(t *testing.T) { t.Run("Test FakeAPIService TestJsonFormData", func(t *testing.T) {
t.Skip("skip test") // remove to run test t.Skip("skip test") // remove to run test
resp, httpRes, err := apiClient.FakeApi.TestGroupParameters(context.Background()).Execute() httpRes, err := apiClient.FakeAPI.TestJsonFormData(context.Background()).Execute()
require.Nil(t, err) require.Nil(t, err)
require.NotNil(t, resp)
assert.Equal(t, 200, httpRes.StatusCode) assert.Equal(t, 200, httpRes.StatusCode)
}) })
t.Run("Test FakeApiService TestInlineAdditionalProperties", func(t *testing.T) { t.Run("Test FakeAPIService TestQueryDeepObject", func(t *testing.T) {
t.Skip("skip test") // remove to run test t.Skip("skip test") // remove to run test
resp, httpRes, err := apiClient.FakeApi.TestInlineAdditionalProperties(context.Background()).Execute() httpRes, err := apiClient.FakeAPI.TestQueryDeepObject(context.Background()).Execute()
require.Nil(t, err) require.Nil(t, err)
require.NotNil(t, resp)
assert.Equal(t, 200, httpRes.StatusCode) assert.Equal(t, 200, httpRes.StatusCode)
}) })
t.Run("Test FakeApiService TestJsonFormData", func(t *testing.T) { t.Run("Test FakeAPIService TestQueryParameterCollectionFormat", func(t *testing.T) {
t.Skip("skip test") // remove to run test t.Skip("skip test") // remove to run test
resp, httpRes, err := apiClient.FakeApi.TestJsonFormData(context.Background()).Execute() httpRes, err := apiClient.FakeAPI.TestQueryParameterCollectionFormat(context.Background()).Execute()
require.Nil(t, err) require.Nil(t, err)
require.NotNil(t, resp)
assert.Equal(t, 200, httpRes.StatusCode) assert.Equal(t, 200, httpRes.StatusCode)
}) })
t.Run("Test FakeApiService TestQueryParameterCollectionFormat", func(t *testing.T) { t.Run("Test FakeAPIService TestUniqueItemsHeaderAndQueryParameterCollectionFormat", func(t *testing.T) {
t.Skip("skip test") // remove to run test t.Skip("skip test") // remove to run test
resp, httpRes, err := apiClient.FakeApi.TestQueryParameterCollectionFormat(context.Background()).Execute() resp, httpRes, err := apiClient.FakeAPI.TestUniqueItemsHeaderAndQueryParameterCollectionFormat(context.Background()).Execute()
require.Nil(t, err)
require.NotNil(t, resp)
assert.Equal(t, 200, httpRes.StatusCode)
})
t.Run("Test FakeApiService TestUniqueItemsHeaderAndQueryParameterCollectionFormat", func(t *testing.T) {
t.Skip("skip test") // remove to run test
resp, httpRes, err := apiClient.FakeApi.TestUniqueItemsHeaderAndQueryParameterCollectionFormat(context.Background()).Execute()
require.Nil(t, err) require.Nil(t, err)
require.NotNil(t, resp) require.NotNil(t, resp)

View File

@@ -1,7 +1,7 @@
/* /*
OpenAPI Petstore OpenAPI Petstore
Testing PetApiService Testing PetAPIService
*/ */
@@ -17,42 +17,40 @@ import (
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
) )
func Test_petstore_PetApiService(t *testing.T) { func Test_petstore_PetAPIService(t *testing.T) {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
t.Run("Test PetApiService AddPet", func(t *testing.T) { t.Run("Test PetAPIService AddPet", func(t *testing.T) {
t.Skip("skip test") // remove to run test t.Skip("skip test") // remove to run test
resp, httpRes, err := apiClient.PetApi.AddPet(context.Background()).Execute() httpRes, err := apiClient.PetAPI.AddPet(context.Background()).Execute()
require.Nil(t, err) require.Nil(t, err)
require.NotNil(t, resp)
assert.Equal(t, 200, httpRes.StatusCode) assert.Equal(t, 200, httpRes.StatusCode)
}) })
t.Run("Test PetApiService DeletePet", func(t *testing.T) { t.Run("Test PetAPIService DeletePet", func(t *testing.T) {
t.Skip("skip test") // remove to run test t.Skip("skip test") // remove to run test
var petId int64 var petId int64
resp, httpRes, err := apiClient.PetApi.DeletePet(context.Background(), petId).Execute() httpRes, err := apiClient.PetAPI.DeletePet(context.Background(), petId).Execute()
require.Nil(t, err) require.Nil(t, err)
require.NotNil(t, resp)
assert.Equal(t, 200, httpRes.StatusCode) assert.Equal(t, 200, httpRes.StatusCode)
}) })
t.Run("Test PetApiService FindPetsByStatus", func(t *testing.T) { t.Run("Test PetAPIService FindPetsByStatus", func(t *testing.T) {
t.Skip("skip test") // remove to run test t.Skip("skip test") // remove to run test
resp, httpRes, err := apiClient.PetApi.FindPetsByStatus(context.Background()).Execute() resp, httpRes, err := apiClient.PetAPI.FindPetsByStatus(context.Background()).Execute()
require.Nil(t, err) require.Nil(t, err)
require.NotNil(t, resp) require.NotNil(t, resp)
@@ -60,11 +58,11 @@ func Test_petstore_PetApiService(t *testing.T) {
}) })
t.Run("Test PetApiService FindPetsByTags", func(t *testing.T) { t.Run("Test PetAPIService FindPetsByTags", func(t *testing.T) {
t.Skip("skip test") // remove to run test t.Skip("skip test") // remove to run test
resp, httpRes, err := apiClient.PetApi.FindPetsByTags(context.Background()).Execute() resp, httpRes, err := apiClient.PetAPI.FindPetsByTags(context.Background()).Execute()
require.Nil(t, err) require.Nil(t, err)
require.NotNil(t, resp) require.NotNil(t, resp)
@@ -72,13 +70,13 @@ func Test_petstore_PetApiService(t *testing.T) {
}) })
t.Run("Test PetApiService GetPetById", func(t *testing.T) { t.Run("Test PetAPIService GetPetById", func(t *testing.T) {
t.Skip("skip test") // remove to run test t.Skip("skip test") // remove to run test
var petId int64 var petId int64
resp, httpRes, err := apiClient.PetApi.GetPetById(context.Background(), petId).Execute() resp, httpRes, err := apiClient.PetAPI.GetPetById(context.Background(), petId).Execute()
require.Nil(t, err) require.Nil(t, err)
require.NotNil(t, resp) require.NotNil(t, resp)
@@ -86,25 +84,37 @@ func Test_petstore_PetApiService(t *testing.T) {
}) })
t.Run("Test PetApiService UpdatePet", func(t *testing.T) { t.Run("Test PetAPIService UpdatePet", func(t *testing.T) {
t.Skip("skip test") // remove to run test t.Skip("skip test") // remove to run test
resp, httpRes, err := apiClient.PetApi.UpdatePet(context.Background()).Execute() httpRes, err := apiClient.PetAPI.UpdatePet(context.Background()).Execute()
require.Nil(t, err) require.Nil(t, err)
require.NotNil(t, resp)
assert.Equal(t, 200, httpRes.StatusCode) assert.Equal(t, 200, httpRes.StatusCode)
}) })
t.Run("Test PetApiService UpdatePetWithForm", func(t *testing.T) { t.Run("Test PetAPIService UpdatePetWithForm", func(t *testing.T) {
t.Skip("skip test") // remove to run test t.Skip("skip test") // remove to run test
var petId int64 var petId int64
resp, httpRes, err := apiClient.PetApi.UpdatePetWithForm(context.Background(), petId).Execute() httpRes, err := apiClient.PetAPI.UpdatePetWithForm(context.Background(), petId).Execute()
require.Nil(t, err)
assert.Equal(t, 200, httpRes.StatusCode)
})
t.Run("Test PetAPIService UploadFile", func(t *testing.T) {
t.Skip("skip test") // remove to run test
var petId int64
resp, httpRes, err := apiClient.PetAPI.UploadFile(context.Background(), petId).Execute()
require.Nil(t, err) require.Nil(t, err)
require.NotNil(t, resp) require.NotNil(t, resp)
@@ -112,27 +122,13 @@ func Test_petstore_PetApiService(t *testing.T) {
}) })
t.Run("Test PetApiService UploadFile", func(t *testing.T) { t.Run("Test PetAPIService UploadFileWithRequiredFile", func(t *testing.T) {
t.Skip("skip test") // remove to run test t.Skip("skip test") // remove to run test
var petId int64 var petId int64
resp, httpRes, err := apiClient.PetApi.UploadFile(context.Background(), petId).Execute() resp, httpRes, err := apiClient.PetAPI.UploadFileWithRequiredFile(context.Background(), petId).Execute()
require.Nil(t, err)
require.NotNil(t, resp)
assert.Equal(t, 200, httpRes.StatusCode)
})
t.Run("Test PetApiService UploadFileWithRequiredFile", func(t *testing.T) {
t.Skip("skip test") // remove to run test
var petId int64
resp, httpRes, err := apiClient.PetApi.UploadFileWithRequiredFile(context.Background(), petId).Execute()
require.Nil(t, err) require.Nil(t, err)
require.NotNil(t, resp) require.NotNil(t, resp)

View File

@@ -1,7 +1,7 @@
/* /*
OpenAPI Petstore OpenAPI Petstore
Testing StoreApiService Testing StoreAPIService
*/ */
@@ -17,30 +17,29 @@ import (
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
) )
func Test_petstore_StoreApiService(t *testing.T) { func Test_petstore_StoreAPIService(t *testing.T) {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
t.Run("Test StoreApiService DeleteOrder", func(t *testing.T) { t.Run("Test StoreAPIService DeleteOrder", func(t *testing.T) {
t.Skip("skip test") // remove to run test t.Skip("skip test") // remove to run test
var orderId string var orderId string
resp, httpRes, err := apiClient.StoreApi.DeleteOrder(context.Background(), orderId).Execute() httpRes, err := apiClient.StoreAPI.DeleteOrder(context.Background(), orderId).Execute()
require.Nil(t, err) require.Nil(t, err)
require.NotNil(t, resp)
assert.Equal(t, 200, httpRes.StatusCode) assert.Equal(t, 200, httpRes.StatusCode)
}) })
t.Run("Test StoreApiService GetInventory", func(t *testing.T) { t.Run("Test StoreAPIService GetInventory", func(t *testing.T) {
t.Skip("skip test") // remove to run test t.Skip("skip test") // remove to run test
resp, httpRes, err := apiClient.StoreApi.GetInventory(context.Background()).Execute() resp, httpRes, err := apiClient.StoreAPI.GetInventory(context.Background()).Execute()
require.Nil(t, err) require.Nil(t, err)
require.NotNil(t, resp) require.NotNil(t, resp)
@@ -48,13 +47,13 @@ func Test_petstore_StoreApiService(t *testing.T) {
}) })
t.Run("Test StoreApiService GetOrderById", func(t *testing.T) { t.Run("Test StoreAPIService GetOrderById", func(t *testing.T) {
t.Skip("skip test") // remove to run test t.Skip("skip test") // remove to run test
var orderId int64 var orderId int64
resp, httpRes, err := apiClient.StoreApi.GetOrderById(context.Background(), orderId).Execute() resp, httpRes, err := apiClient.StoreAPI.GetOrderById(context.Background(), orderId).Execute()
require.Nil(t, err) require.Nil(t, err)
require.NotNil(t, resp) require.NotNil(t, resp)
@@ -62,11 +61,11 @@ func Test_petstore_StoreApiService(t *testing.T) {
}) })
t.Run("Test StoreApiService PlaceOrder", func(t *testing.T) { t.Run("Test StoreAPIService PlaceOrder", func(t *testing.T) {
t.Skip("skip test") // remove to run test t.Skip("skip test") // remove to run test
resp, httpRes, err := apiClient.StoreApi.PlaceOrder(context.Background()).Execute() resp, httpRes, err := apiClient.StoreAPI.PlaceOrder(context.Background()).Execute()
require.Nil(t, err) require.Nil(t, err)
require.NotNil(t, resp) require.NotNil(t, resp)

View File

@@ -1,7 +1,7 @@
/* /*
OpenAPI Petstore OpenAPI Petstore
Testing UserApiService Testing UserAPIService
*/ */
@@ -17,68 +17,64 @@ import (
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
) )
func Test_petstore_UserApiService(t *testing.T) { func Test_petstore_UserAPIService(t *testing.T) {
configuration := openapiclient.NewConfiguration() configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration) apiClient := openapiclient.NewAPIClient(configuration)
t.Run("Test UserApiService CreateUser", func(t *testing.T) { t.Run("Test UserAPIService CreateUser", func(t *testing.T) {
t.Skip("skip test") // remove to run test t.Skip("skip test") // remove to run test
resp, httpRes, err := apiClient.UserApi.CreateUser(context.Background()).Execute() httpRes, err := apiClient.UserAPI.CreateUser(context.Background()).Execute()
require.Nil(t, err) require.Nil(t, err)
require.NotNil(t, resp)
assert.Equal(t, 200, httpRes.StatusCode) assert.Equal(t, 200, httpRes.StatusCode)
}) })
t.Run("Test UserApiService CreateUsersWithArrayInput", func(t *testing.T) { t.Run("Test UserAPIService CreateUsersWithArrayInput", func(t *testing.T) {
t.Skip("skip test") // remove to run test t.Skip("skip test") // remove to run test
resp, httpRes, err := apiClient.UserApi.CreateUsersWithArrayInput(context.Background()).Execute() httpRes, err := apiClient.UserAPI.CreateUsersWithArrayInput(context.Background()).Execute()
require.Nil(t, err) require.Nil(t, err)
require.NotNil(t, resp)
assert.Equal(t, 200, httpRes.StatusCode) assert.Equal(t, 200, httpRes.StatusCode)
}) })
t.Run("Test UserApiService CreateUsersWithListInput", func(t *testing.T) { t.Run("Test UserAPIService CreateUsersWithListInput", func(t *testing.T) {
t.Skip("skip test") // remove to run test t.Skip("skip test") // remove to run test
resp, httpRes, err := apiClient.UserApi.CreateUsersWithListInput(context.Background()).Execute() httpRes, err := apiClient.UserAPI.CreateUsersWithListInput(context.Background()).Execute()
require.Nil(t, err) require.Nil(t, err)
require.NotNil(t, resp)
assert.Equal(t, 200, httpRes.StatusCode) assert.Equal(t, 200, httpRes.StatusCode)
}) })
t.Run("Test UserApiService DeleteUser", func(t *testing.T) { t.Run("Test UserAPIService DeleteUser", func(t *testing.T) {
t.Skip("skip test") // remove to run test t.Skip("skip test") // remove to run test
var username string var username string
resp, httpRes, err := apiClient.UserApi.DeleteUser(context.Background(), username).Execute() httpRes, err := apiClient.UserAPI.DeleteUser(context.Background(), username).Execute()
require.Nil(t, err) require.Nil(t, err)
require.NotNil(t, resp)
assert.Equal(t, 200, httpRes.StatusCode) assert.Equal(t, 200, httpRes.StatusCode)
}) })
t.Run("Test UserApiService GetUserByName", func(t *testing.T) { t.Run("Test UserAPIService GetUserByName", func(t *testing.T) {
t.Skip("skip test") // remove to run test t.Skip("skip test") // remove to run test
var username string var username string
resp, httpRes, err := apiClient.UserApi.GetUserByName(context.Background(), username).Execute() resp, httpRes, err := apiClient.UserAPI.GetUserByName(context.Background(), username).Execute()
require.Nil(t, err) require.Nil(t, err)
require.NotNil(t, resp) require.NotNil(t, resp)
@@ -86,11 +82,11 @@ func Test_petstore_UserApiService(t *testing.T) {
}) })
t.Run("Test UserApiService LoginUser", func(t *testing.T) { t.Run("Test UserAPIService LoginUser", func(t *testing.T) {
t.Skip("skip test") // remove to run test t.Skip("skip test") // remove to run test
resp, httpRes, err := apiClient.UserApi.LoginUser(context.Background()).Execute() resp, httpRes, err := apiClient.UserAPI.LoginUser(context.Background()).Execute()
require.Nil(t, err) require.Nil(t, err)
require.NotNil(t, resp) require.NotNil(t, resp)
@@ -98,28 +94,26 @@ func Test_petstore_UserApiService(t *testing.T) {
}) })
t.Run("Test UserApiService LogoutUser", func(t *testing.T) { t.Run("Test UserAPIService LogoutUser", func(t *testing.T) {
t.Skip("skip test") // remove to run test t.Skip("skip test") // remove to run test
resp, httpRes, err := apiClient.UserApi.LogoutUser(context.Background()).Execute() httpRes, err := apiClient.UserAPI.LogoutUser(context.Background()).Execute()
require.Nil(t, err) require.Nil(t, err)
require.NotNil(t, resp)
assert.Equal(t, 200, httpRes.StatusCode) assert.Equal(t, 200, httpRes.StatusCode)
}) })
t.Run("Test UserApiService UpdateUser", func(t *testing.T) { t.Run("Test UserAPIService UpdateUser", func(t *testing.T) {
t.Skip("skip test") // remove to run test t.Skip("skip test") // remove to run test
var username string var username string
resp, httpRes, err := apiClient.UserApi.UpdateUser(context.Background(), username).Execute() httpRes, err := apiClient.UserAPI.UpdateUser(context.Background(), username).Execute()
require.Nil(t, err) require.Nil(t, err)
require.NotNil(t, resp)
assert.Equal(t, 200, httpRes.StatusCode) assert.Equal(t, 200, httpRes.StatusCode)
}) })

View File

@@ -281,7 +281,7 @@ func executeHttpSignatureAuth(t *testing.T, authConfig *sw.HttpSignatureAuth, ex
fmt.Printf("Request with HTTP signature. Scheme: '%s'. Algorithm: '%s'. MaxValidity: %v. Headers: '%v'\n", fmt.Printf("Request with HTTP signature. Scheme: '%s'. Algorithm: '%s'. MaxValidity: %v. Headers: '%v'\n",
authConfig.SigningScheme, authConfig.SigningAlgorithm, authConfig.SignatureMaxValidity, authConfig.SignedHeaders) authConfig.SigningScheme, authConfig.SigningAlgorithm, authConfig.SignatureMaxValidity, authConfig.SignedHeaders)
r, err2 := apiClient.PetApi.AddPet(authCtx).Pet(newPet).Execute() r, err2 := apiClient.PetAPI.AddPet(authCtx).Pet(newPet).Execute()
if expectSuccess && err2 != nil { if expectSuccess && err2 != nil {
t.Fatalf("Error while adding pet: %v", err2) t.Fatalf("Error while adding pet: %v", err2)
} }
@@ -297,7 +297,7 @@ func executeHttpSignatureAuth(t *testing.T, authConfig *sw.HttpSignatureAuth, ex
t.Log(r) t.Log(r)
} }
_, r, err = apiClient.PetApi.GetPetById(authCtx, 12992).Execute() _, r, err = apiClient.PetAPI.GetPetById(authCtx, 12992).Execute()
if expectSuccess && err != nil { if expectSuccess && err != nil {
t.Fatalf("Error while deleting pet by id: %v", err) t.Fatalf("Error while deleting pet by id: %v", err)
} }

View File

@@ -31,7 +31,7 @@ func TestAddPet(t *testing.T) {
PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"),
Tags: []sw.Tag{{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) Tags: []sw.Tag{{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}})
r, err := client.PetApi.AddPet(context.Background()).Pet(newPet).Execute() r, err := client.PetAPI.AddPet(context.Background()).Pet(newPet).Execute()
if err != nil { if err != nil {
t.Fatalf("Error while adding pet: %v", err) t.Fatalf("Error while adding pet: %v", err)
@@ -42,7 +42,7 @@ func TestAddPet(t *testing.T) {
} }
func TestFindPetsByStatusWithMissingParam(t *testing.T) { func TestFindPetsByStatusWithMissingParam(t *testing.T) {
_, r, err := client.PetApi.FindPetsByStatus(context.Background()).Status(nil).Execute() _, r, err := client.PetAPI.FindPetsByStatus(context.Background()).Status(nil).Execute()
if err != nil { if err != nil {
t.Fatalf("Error while testing TestFindPetsByStatusWithMissingParam: %v", err) t.Fatalf("Error while testing TestFindPetsByStatusWithMissingParam: %v", err)
@@ -57,7 +57,7 @@ func TestGetPetById(t *testing.T) {
} }
func TestGetPetByIdWithInvalidID(t *testing.T) { func TestGetPetByIdWithInvalidID(t *testing.T) {
resp, r, err := client.PetApi.GetPetById(context.Background(), 999999999).Execute() resp, r, err := client.PetAPI.GetPetById(context.Background(), 999999999).Execute()
if r != nil && r.StatusCode == 404 { if r != nil && r.StatusCode == 404 {
assertedError, ok := err.(*sw.GenericOpenAPIError) assertedError, ok := err.(*sw.GenericOpenAPIError)
a := assert.New(t) a := assert.New(t)
@@ -74,7 +74,7 @@ func TestGetPetByIdWithInvalidID(t *testing.T) {
} }
func TestUpdatePetWithForm(t *testing.T) { func TestUpdatePetWithForm(t *testing.T) {
r, err := client.PetApi.UpdatePetWithForm(context.Background(), 12830).Name("golang").Status("available").Execute() r, err := client.PetAPI.UpdatePetWithForm(context.Background(), 12830).Name("golang").Status("available").Execute()
if err != nil { if err != nil {
t.Fatalf("Error while updating pet by id: %v", err) t.Fatalf("Error while updating pet by id: %v", err)
t.Log(r) t.Log(r)
@@ -89,7 +89,7 @@ func TestUpdatePetWithForm(t *testing.T) {
func TestFindPetsByTag(t *testing.T) { func TestFindPetsByTag(t *testing.T) {
var found = false var found = false
resp, r, err := client.PetApi.FindPetsByTags(context.Background()).Tags([]string{"tag2"}).Execute() resp, r, err := client.PetAPI.FindPetsByTags(context.Background()).Tags([]string{"tag2"}).Execute()
if err != nil { if err != nil {
t.Fatalf("Error while getting pet by tag: %v", err) t.Fatalf("Error while getting pet by tag: %v", err)
t.Log(r) t.Log(r)
@@ -118,7 +118,7 @@ func TestFindPetsByTag(t *testing.T) {
} }
func TestFindPetsByStatus(t *testing.T) { func TestFindPetsByStatus(t *testing.T) {
resp, r, err := client.PetApi.FindPetsByStatus(context.Background()).Status([]string{"available"}).Execute() resp, r, err := client.PetAPI.FindPetsByStatus(context.Background()).Status([]string{"available"}).Execute()
if err != nil { if err != nil {
t.Fatalf("Error while getting pet by id: %v", err) t.Fatalf("Error while getting pet by id: %v", err)
t.Log(r) t.Log(r)
@@ -144,7 +144,7 @@ func TestUploadFile(t *testing.T) {
t.Fatalf("Error opening file: %v", err1) t.Fatalf("Error opening file: %v", err1)
} }
_, r, err := client.PetApi.UploadFile(context.Background(), 12830).AdditionalMetadata("golang").File(file).Execute() _, r, err := client.PetAPI.UploadFile(context.Background(), 12830).AdditionalMetadata("golang").File(file).Execute()
if err != nil { if err != nil {
t.Fatalf("Error while uploading file: %v", err) t.Fatalf("Error while uploading file: %v", err)
@@ -162,7 +162,7 @@ func TestUploadFileRequired(t *testing.T) {
t.Fatalf("Error opening file: %v", err1) t.Fatalf("Error opening file: %v", err1)
} }
_, r, err := client.PetApi.UploadFileWithRequiredFile(context.Background(), 12830).RequiredFile(file).AdditionalMetadata("golang").Execute() _, r, err := client.PetAPI.UploadFileWithRequiredFile(context.Background(), 12830).RequiredFile(file).AdditionalMetadata("golang").Execute()
if err != nil { if err != nil {
t.Fatalf("Error while uploading file: %v", err) t.Fatalf("Error while uploading file: %v", err)
@@ -174,7 +174,7 @@ func TestUploadFileRequired(t *testing.T) {
} }
func TestDeletePet(t *testing.T) { func TestDeletePet(t *testing.T) {
r, err := client.PetApi.DeletePet(context.Background(), 12830).Execute() r, err := client.PetAPI.DeletePet(context.Background(), 12830).Execute()
if err != nil { if err != nil {
t.Fatalf("Error while deleting pet by id: %v", err) t.Fatalf("Error while deleting pet by id: %v", err)
@@ -195,7 +195,7 @@ func TestDeepObjectQuery(t *testing.T) {
newCategory := sw.Category{Id: sw.PtrInt64(12830), Name: "cat"} newCategory := sw.Category{Id: sw.PtrInt64(12830), Name: "cat"}
configuration := sw.NewConfiguration() configuration := sw.NewConfiguration()
apiClient := sw.NewAPIClient(configuration) apiClient := sw.NewAPIClient(configuration)
r, err := apiClient.FakeApi.TestQueryDeepObject(context.Background()).TestPet(newPet).InputOptions(newCategory).Execute() r, err := apiClient.FakeAPI.TestQueryDeepObject(context.Background()).TestPet(newPet).InputOptions(newCategory).Execute()
if err != nil { if err != nil {
// for sure this will fail as the endpoint is fake // for sure this will fail as the endpoint is fake
} }
@@ -222,7 +222,7 @@ func TestConcurrency(t *testing.T) {
// Add the pets. // Add the pets.
for _, pet := range newPets { for _, pet := range newPets {
go func(newPet sw.Pet) { go func(newPet sw.Pet) {
r, err := client.PetApi.AddPet(nil, newPet) r, err := client.PetAPI.AddPet(nil, newPet)
if r.StatusCode != 200 { if r.StatusCode != 200 {
t.Log(r) t.Log(r)
} }
@@ -244,7 +244,7 @@ func TestConcurrency(t *testing.T) {
// Update all to active with the name gopherDan // Update all to active with the name gopherDan
for _, pet := range newPets { for _, pet := range newPets {
go func(id int64) { go func(id int64) {
r, err := client.PetApi.UpdatePet(nil, sw.Pet{Id: (int64)(id), Name: "gopherDan", PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: "active"}) r, err := client.PetAPI.UpdatePet(nil, sw.Pet{Id: (int64)(id), Name: "gopherDan", PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: "active"})
if r.StatusCode != 200 { if r.StatusCode != 200 {
t.Log(r) t.Log(r)
} }
@@ -284,7 +284,7 @@ func waitOnFunctions(t *testing.T, errc chan error, n int) {
} }
func deletePet(t *testing.T, id int64) { func deletePet(t *testing.T, id int64) {
r, err := client.PetApi.DeletePet(context.Background(), id).Execute() r, err := client.PetAPI.DeletePet(context.Background(), id).Execute()
if err != nil { if err != nil {
t.Fatalf("Error while deleting pet by id: %v", err) t.Fatalf("Error while deleting pet by id: %v", err)
@@ -296,7 +296,7 @@ func deletePet(t *testing.T, id int64) {
func isPetCorrect(t *testing.T, id int64, name string, status string) { func isPetCorrect(t *testing.T, id int64, name string, status string) {
assert := assert.New(t) assert := assert.New(t)
resp, r, err := client.PetApi.GetPetById(context.Background(), id).Execute() resp, r, err := client.PetAPI.GetPetById(context.Background(), id).Execute()
if err != nil { if err != nil {
t.Fatalf("Error while getting pet by id: %v", err) t.Fatalf("Error while getting pet by id: %v", err)
} else { } else {

View File

@@ -18,7 +18,7 @@ func TestPlaceOrder(t *testing.T) {
Status: sw.PtrString("placed"), Status: sw.PtrString("placed"),
Complete: sw.PtrBool(false)} Complete: sw.PtrBool(false)}
_, r, err := client.StoreApi.PlaceOrder(context.Background()).Order(newOrder).Execute() _, r, err := client.StoreAPI.PlaceOrder(context.Background()).Order(newOrder).Execute()
if err != nil { if err != nil {
// Skip parsing time error due to error in Petstore Test Server // Skip parsing time error due to error in Petstore Test Server

View File

@@ -20,7 +20,7 @@ func TestCreateUser(t *testing.T) {
Phone: sw.PtrString("5101112222"), Phone: sw.PtrString("5101112222"),
UserStatus: sw.PtrInt32(1)} UserStatus: sw.PtrInt32(1)}
apiResponse, err := client.UserApi.CreateUser(context.Background()).User(newUser).Execute() apiResponse, err := client.UserAPI.CreateUser(context.Background()).User(newUser).Execute()
if err != nil { if err != nil {
t.Fatalf("Error while adding user: %v", err) t.Fatalf("Error while adding user: %v", err)
@@ -55,7 +55,7 @@ func TestCreateUsersWithArrayInput(t *testing.T) {
}, },
} }
apiResponse, err := client.UserApi.CreateUsersWithArrayInput(context.Background()).User(newUsers).Execute() apiResponse, err := client.UserAPI.CreateUsersWithArrayInput(context.Background()).User(newUsers).Execute()
if err != nil { if err != nil {
t.Fatalf("Error while adding users: %v", err) t.Fatalf("Error while adding users: %v", err)
} }
@@ -65,13 +65,13 @@ func TestCreateUsersWithArrayInput(t *testing.T) {
/* issue deleting users due to issue in the server side (500). commented out below for the time being /* issue deleting users due to issue in the server side (500). commented out below for the time being
//tear down //tear down
_, err1 := client.UserApi.DeleteUser(context.Background(), "gopher1").Execute() _, err1 := client.UserAPI.DeleteUser(context.Background(), "gopher1").Execute()
if err1 != nil { if err1 != nil {
t.Errorf("Error while deleting user") t.Errorf("Error while deleting user")
t.Log(err1) t.Log(err1)
} }
_, err2 := client.UserApi.DeleteUser(context.Background(), "gopher2").Execute() _, err2 := client.UserAPI.DeleteUser(context.Background(), "gopher2").Execute()
if err2 != nil { if err2 != nil {
t.Errorf("Error while deleting user") t.Errorf("Error while deleting user")
t.Log(err2) t.Log(err2)
@@ -82,7 +82,7 @@ func TestCreateUsersWithArrayInput(t *testing.T) {
func TestGetUserByName(t *testing.T) { func TestGetUserByName(t *testing.T) {
assert := assert.New(t) assert := assert.New(t)
resp, apiResponse, err := client.UserApi.GetUserByName(context.Background(), "gopher").Execute() resp, apiResponse, err := client.UserAPI.GetUserByName(context.Background(), "gopher").Execute()
if err != nil { if err != nil {
t.Fatalf("Error while getting user by id: %v", err) t.Fatalf("Error while getting user by id: %v", err)
} else { } else {
@@ -97,7 +97,7 @@ func TestGetUserByName(t *testing.T) {
} }
func TestGetUserByNameWithInvalidID(t *testing.T) { func TestGetUserByNameWithInvalidID(t *testing.T) {
resp, apiResponse, err := client.UserApi.GetUserByName(context.Background(), "999999999").Execute() resp, apiResponse, err := client.UserAPI.GetUserByName(context.Background(), "999999999").Execute()
if apiResponse != nil && apiResponse.StatusCode == 404 { if apiResponse != nil && apiResponse.StatusCode == 404 {
return // This is a pass condition. API will return with a 404 error. return // This is a pass condition. API will return with a 404 error.
} else if err != nil { } else if err != nil {
@@ -124,7 +124,7 @@ func TestUpdateUser(t *testing.T) {
Phone: sw.PtrString("5101112222"), Phone: sw.PtrString("5101112222"),
UserStatus: sw.PtrInt32(1)} UserStatus: sw.PtrInt32(1)}
apiResponse, err := client.UserApi.UpdateUser(context.Background(), "gopher").User(newUser).Execute() apiResponse, err := client.UserAPI.UpdateUser(context.Background(), "gopher").User(newUser).Execute()
if err != nil { if err != nil {
t.Fatalf("Error while deleting user by id: %v", err) t.Fatalf("Error while deleting user by id: %v", err)
} }
@@ -133,7 +133,7 @@ func TestUpdateUser(t *testing.T) {
} }
//verify changes are correct //verify changes are correct
resp, apiResponse, err := client.UserApi.GetUserByName(context.Background(), "gopher").Execute() resp, apiResponse, err := client.UserAPI.GetUserByName(context.Background(), "gopher").Execute()
if err != nil { if err != nil {
t.Fatalf("Error while getting user by id: %v", err) t.Fatalf("Error while getting user by id: %v", err)
} else { } else {
@@ -145,7 +145,7 @@ func TestUpdateUser(t *testing.T) {
/* issue deleting users due to issue in the server side (500). commented out below for the time being /* issue deleting users due to issue in the server side (500). commented out below for the time being
func TestDeleteUser(t *testing.T) { func TestDeleteUser(t *testing.T) {
apiResponse, err := client.UserApi.DeleteUser(context.Background(), "gopher").Execute() apiResponse, err := client.UserAPI.DeleteUser(context.Background(), "gopher").Execute()
if err != nil { if err != nil {
t.Fatalf("Error while deleting user: %v", err) t.Fatalf("Error while deleting user: %v", err)

View File

@@ -1,2 +0,0 @@
github.com/gorilla/mux v1.7.3 h1:gnP5JzjVOuiZD07fKKToCAOjS0yOpj/qPETTXCCS6hw=
github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=

View File

@@ -17,10 +17,10 @@ import (
// PetApiRouter defines the required methods for binding the api requests to a responses for the PetApi // PetAPIRouter defines the required methods for binding the api requests to a responses for the PetAPI
// The PetApiRouter implementation should parse necessary information from the http request, // The PetAPIRouter implementation should parse necessary information from the http request,
// pass the data to a PetApiServicer to perform the required actions, then write the service results to the http response. // pass the data to a PetAPIServicer to perform the required actions, then write the service results to the http response.
type PetApiRouter interface { type PetAPIRouter interface {
AddPet(http.ResponseWriter, *http.Request) AddPet(http.ResponseWriter, *http.Request)
DeletePet(http.ResponseWriter, *http.Request) DeletePet(http.ResponseWriter, *http.Request)
FindPetsByStatus(http.ResponseWriter, *http.Request) FindPetsByStatus(http.ResponseWriter, *http.Request)
@@ -31,19 +31,19 @@ type PetApiRouter interface {
UpdatePetWithForm(http.ResponseWriter, *http.Request) UpdatePetWithForm(http.ResponseWriter, *http.Request)
UploadFile(http.ResponseWriter, *http.Request) UploadFile(http.ResponseWriter, *http.Request)
} }
// StoreApiRouter defines the required methods for binding the api requests to a responses for the StoreApi // StoreAPIRouter defines the required methods for binding the api requests to a responses for the StoreAPI
// The StoreApiRouter implementation should parse necessary information from the http request, // The StoreAPIRouter implementation should parse necessary information from the http request,
// pass the data to a StoreApiServicer to perform the required actions, then write the service results to the http response. // pass the data to a StoreAPIServicer to perform the required actions, then write the service results to the http response.
type StoreApiRouter interface { type StoreAPIRouter interface {
DeleteOrder(http.ResponseWriter, *http.Request) DeleteOrder(http.ResponseWriter, *http.Request)
GetInventory(http.ResponseWriter, *http.Request) GetInventory(http.ResponseWriter, *http.Request)
GetOrderById(http.ResponseWriter, *http.Request) GetOrderById(http.ResponseWriter, *http.Request)
PlaceOrder(http.ResponseWriter, *http.Request) PlaceOrder(http.ResponseWriter, *http.Request)
} }
// UserApiRouter defines the required methods for binding the api requests to a responses for the UserApi // UserAPIRouter defines the required methods for binding the api requests to a responses for the UserAPI
// The UserApiRouter implementation should parse necessary information from the http request, // The UserAPIRouter implementation should parse necessary information from the http request,
// pass the data to a UserApiServicer to perform the required actions, then write the service results to the http response. // pass the data to a UserAPIServicer to perform the required actions, then write the service results to the http response.
type UserApiRouter interface { type UserAPIRouter interface {
CreateUser(http.ResponseWriter, *http.Request) CreateUser(http.ResponseWriter, *http.Request)
CreateUsersWithArrayInput(http.ResponseWriter, *http.Request) CreateUsersWithArrayInput(http.ResponseWriter, *http.Request)
CreateUsersWithListInput(http.ResponseWriter, *http.Request) CreateUsersWithListInput(http.ResponseWriter, *http.Request)
@@ -55,11 +55,11 @@ type UserApiRouter interface {
} }
// PetApiServicer defines the api actions for the PetApi service // PetAPIServicer defines the api actions for the PetAPI service
// This interface intended to stay up to date with the openapi yaml used to generate it, // This interface intended to stay up to date with the openapi yaml used to generate it,
// while the service implementation can be ignored with the .openapi-generator-ignore file // while the service implementation can be ignored with the .openapi-generator-ignore file
// and updated with the logic required for the API. // and updated with the logic required for the API.
type PetApiServicer interface { type PetAPIServicer interface {
AddPet(context.Context, Pet) (ImplResponse, error) AddPet(context.Context, Pet) (ImplResponse, error)
DeletePet(context.Context, int64, string) (ImplResponse, error) DeletePet(context.Context, int64, string) (ImplResponse, error)
FindPetsByStatus(context.Context, []string) (ImplResponse, error) FindPetsByStatus(context.Context, []string) (ImplResponse, error)
@@ -72,11 +72,11 @@ type PetApiServicer interface {
} }
// StoreApiServicer defines the api actions for the StoreApi service // StoreAPIServicer defines the api actions for the StoreAPI service
// This interface intended to stay up to date with the openapi yaml used to generate it, // This interface intended to stay up to date with the openapi yaml used to generate it,
// while the service implementation can be ignored with the .openapi-generator-ignore file // while the service implementation can be ignored with the .openapi-generator-ignore file
// and updated with the logic required for the API. // and updated with the logic required for the API.
type StoreApiServicer interface { type StoreAPIServicer interface {
DeleteOrder(context.Context, string) (ImplResponse, error) DeleteOrder(context.Context, string) (ImplResponse, error)
GetInventory(context.Context) (ImplResponse, error) GetInventory(context.Context) (ImplResponse, error)
GetOrderById(context.Context, int64) (ImplResponse, error) GetOrderById(context.Context, int64) (ImplResponse, error)
@@ -84,11 +84,11 @@ type StoreApiServicer interface {
} }
// UserApiServicer defines the api actions for the UserApi service // UserAPIServicer defines the api actions for the UserAPI service
// This interface intended to stay up to date with the openapi yaml used to generate it, // This interface intended to stay up to date with the openapi yaml used to generate it,
// while the service implementation can be ignored with the .openapi-generator-ignore file // while the service implementation can be ignored with the .openapi-generator-ignore file
// and updated with the logic required for the API. // and updated with the logic required for the API.
type UserApiServicer interface { type UserAPIServicer interface {
CreateUser(context.Context, User) (ImplResponse, error) CreateUser(context.Context, User) (ImplResponse, error)
CreateUsersWithArrayInput(context.Context, []User) (ImplResponse, error) CreateUsersWithArrayInput(context.Context, []User) (ImplResponse, error)
CreateUsersWithListInput(context.Context, []User) (ImplResponse, error) CreateUsersWithListInput(context.Context, []User) (ImplResponse, error)

View File

@@ -17,25 +17,25 @@ import (
"github.com/gorilla/mux" "github.com/gorilla/mux"
) )
// PetApiController binds http requests to an api service and writes the service results to the http response // PetAPIController binds http requests to an api service and writes the service results to the http response
type PetApiController struct { type PetAPIController struct {
service PetApiServicer service PetAPIServicer
errorHandler ErrorHandler errorHandler ErrorHandler
} }
// PetApiOption for how the controller is set up. // PetAPIOption for how the controller is set up.
type PetApiOption func(*PetApiController) type PetAPIOption func(*PetAPIController)
// WithPetApiErrorHandler inject ErrorHandler into controller // WithPetAPIErrorHandler inject ErrorHandler into controller
func WithPetApiErrorHandler(h ErrorHandler) PetApiOption { func WithPetAPIErrorHandler(h ErrorHandler) PetAPIOption {
return func(c *PetApiController) { return func(c *PetAPIController) {
c.errorHandler = h c.errorHandler = h
} }
} }
// NewPetApiController creates a default api controller // NewPetAPIController creates a default api controller
func NewPetApiController(s PetApiServicer, opts ...PetApiOption) Router { func NewPetAPIController(s PetAPIServicer, opts ...PetAPIOption) Router {
controller := &PetApiController{ controller := &PetAPIController{
service: s, service: s,
errorHandler: DefaultErrorHandler, errorHandler: DefaultErrorHandler,
} }
@@ -47,8 +47,8 @@ func NewPetApiController(s PetApiServicer, opts ...PetApiOption) Router {
return controller return controller
} }
// Routes returns all the api routes for the PetApiController // Routes returns all the api routes for the PetAPIController
func (c *PetApiController) Routes() Routes { func (c *PetAPIController) Routes() Routes {
return Routes{ return Routes{
"AddPet": Route{ "AddPet": Route{
strings.ToUpper("Post"), strings.ToUpper("Post"),
@@ -94,7 +94,7 @@ func (c *PetApiController) Routes() Routes {
} }
// AddPet - Add a new pet to the store // AddPet - Add a new pet to the store
func (c *PetApiController) AddPet(w http.ResponseWriter, r *http.Request) { func (c *PetAPIController) AddPet(w http.ResponseWriter, r *http.Request) {
petParam := Pet{} petParam := Pet{}
d := json.NewDecoder(r.Body) d := json.NewDecoder(r.Body)
d.DisallowUnknownFields() d.DisallowUnknownFields()
@@ -117,7 +117,7 @@ func (c *PetApiController) AddPet(w http.ResponseWriter, r *http.Request) {
} }
// DeletePet - Deletes a pet // DeletePet - Deletes a pet
func (c *PetApiController) DeletePet(w http.ResponseWriter, r *http.Request) { func (c *PetAPIController) DeletePet(w http.ResponseWriter, r *http.Request) {
params := mux.Vars(r) params := mux.Vars(r)
petIdParam, err := parseInt64Parameter(params["petId"], true) petIdParam, err := parseInt64Parameter(params["petId"], true)
if err != nil { if err != nil {
@@ -136,7 +136,7 @@ func (c *PetApiController) DeletePet(w http.ResponseWriter, r *http.Request) {
} }
// FindPetsByStatus - Finds Pets by status // FindPetsByStatus - Finds Pets by status
func (c *PetApiController) FindPetsByStatus(w http.ResponseWriter, r *http.Request) { func (c *PetAPIController) FindPetsByStatus(w http.ResponseWriter, r *http.Request) {
query := r.URL.Query() query := r.URL.Query()
statusParam := strings.Split(query.Get("status"), ",") statusParam := strings.Split(query.Get("status"), ",")
result, err := c.service.FindPetsByStatus(r.Context(), statusParam) result, err := c.service.FindPetsByStatus(r.Context(), statusParam)
@@ -151,7 +151,7 @@ func (c *PetApiController) FindPetsByStatus(w http.ResponseWriter, r *http.Reque
// FindPetsByTags - Finds Pets by tags // FindPetsByTags - Finds Pets by tags
// Deprecated // Deprecated
func (c *PetApiController) FindPetsByTags(w http.ResponseWriter, r *http.Request) { func (c *PetAPIController) FindPetsByTags(w http.ResponseWriter, r *http.Request) {
query := r.URL.Query() query := r.URL.Query()
tagsParam := strings.Split(query.Get("tags"), ",") tagsParam := strings.Split(query.Get("tags"), ",")
result, err := c.service.FindPetsByTags(r.Context(), tagsParam) result, err := c.service.FindPetsByTags(r.Context(), tagsParam)
@@ -165,7 +165,7 @@ func (c *PetApiController) FindPetsByTags(w http.ResponseWriter, r *http.Request
} }
// GetPetById - Find pet by ID // GetPetById - Find pet by ID
func (c *PetApiController) GetPetById(w http.ResponseWriter, r *http.Request) { func (c *PetAPIController) GetPetById(w http.ResponseWriter, r *http.Request) {
params := mux.Vars(r) params := mux.Vars(r)
petIdParam, err := parseInt64Parameter(params["petId"], true) petIdParam, err := parseInt64Parameter(params["petId"], true)
if err != nil { if err != nil {
@@ -183,7 +183,7 @@ func (c *PetApiController) GetPetById(w http.ResponseWriter, r *http.Request) {
} }
// UpdatePet - Update an existing pet // UpdatePet - Update an existing pet
func (c *PetApiController) UpdatePet(w http.ResponseWriter, r *http.Request) { func (c *PetAPIController) UpdatePet(w http.ResponseWriter, r *http.Request) {
petParam := Pet{} petParam := Pet{}
d := json.NewDecoder(r.Body) d := json.NewDecoder(r.Body)
d.DisallowUnknownFields() d.DisallowUnknownFields()
@@ -206,7 +206,7 @@ func (c *PetApiController) UpdatePet(w http.ResponseWriter, r *http.Request) {
} }
// UpdatePetWithForm - Updates a pet in the store with form data // UpdatePetWithForm - Updates a pet in the store with form data
func (c *PetApiController) UpdatePetWithForm(w http.ResponseWriter, r *http.Request) { func (c *PetAPIController) UpdatePetWithForm(w http.ResponseWriter, r *http.Request) {
if err := r.ParseForm(); err != nil { if err := r.ParseForm(); err != nil {
c.errorHandler(w, r, &ParsingError{Err: err}, nil) c.errorHandler(w, r, &ParsingError{Err: err}, nil)
return return
@@ -230,7 +230,7 @@ func (c *PetApiController) UpdatePetWithForm(w http.ResponseWriter, r *http.Requ
} }
// UploadFile - uploads an image // UploadFile - uploads an image
func (c *PetApiController) UploadFile(w http.ResponseWriter, r *http.Request) { func (c *PetAPIController) UploadFile(w http.ResponseWriter, r *http.Request) {
if err := r.ParseMultipartForm(32 << 20); err != nil { if err := r.ParseMultipartForm(32 << 20); err != nil {
c.errorHandler(w, r, &ParsingError{Err: err}, nil) c.errorHandler(w, r, &ParsingError{Err: err}, nil)
return return

View File

@@ -16,19 +16,19 @@ import (
"os" "os"
) )
// PetApiService is a service that implements the logic for the PetApiServicer // PetAPIService is a service that implements the logic for the PetAPIServicer
// This service should implement the business logic for every endpoint for the PetApi API. // This service should implement the business logic for every endpoint for the PetAPI API.
// Include any external packages or services that will be required by this service. // Include any external packages or services that will be required by this service.
type PetApiService struct { type PetAPIService struct {
} }
// NewPetApiService creates a default api service // NewPetAPIService creates a default api service
func NewPetApiService() PetApiServicer { func NewPetAPIService() PetAPIServicer {
return &PetApiService{} return &PetAPIService{}
} }
// AddPet - Add a new pet to the store // AddPet - Add a new pet to the store
func (s *PetApiService) AddPet(ctx context.Context, pet Pet) (ImplResponse, error) { func (s *PetAPIService) AddPet(ctx context.Context, pet Pet) (ImplResponse, error) {
// TODO - update AddPet with the required logic for this service method. // TODO - update AddPet with the required logic for this service method.
// Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. // Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.
@@ -42,7 +42,7 @@ func (s *PetApiService) AddPet(ctx context.Context, pet Pet) (ImplResponse, erro
} }
// DeletePet - Deletes a pet // DeletePet - Deletes a pet
func (s *PetApiService) DeletePet(ctx context.Context, petId int64, apiKey string) (ImplResponse, error) { func (s *PetAPIService) DeletePet(ctx context.Context, petId int64, apiKey string) (ImplResponse, error) {
// TODO - update DeletePet with the required logic for this service method. // TODO - update DeletePet with the required logic for this service method.
// Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. // Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.
@@ -53,7 +53,7 @@ func (s *PetApiService) DeletePet(ctx context.Context, petId int64, apiKey strin
} }
// FindPetsByStatus - Finds Pets by status // FindPetsByStatus - Finds Pets by status
func (s *PetApiService) FindPetsByStatus(ctx context.Context, status []string) (ImplResponse, error) { func (s *PetAPIService) FindPetsByStatus(ctx context.Context, status []string) (ImplResponse, error) {
// TODO - update FindPetsByStatus with the required logic for this service method. // TODO - update FindPetsByStatus with the required logic for this service method.
// Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. // Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.
@@ -68,7 +68,7 @@ func (s *PetApiService) FindPetsByStatus(ctx context.Context, status []string) (
// FindPetsByTags - Finds Pets by tags // FindPetsByTags - Finds Pets by tags
// Deprecated // Deprecated
func (s *PetApiService) FindPetsByTags(ctx context.Context, tags []string) (ImplResponse, error) { func (s *PetAPIService) FindPetsByTags(ctx context.Context, tags []string) (ImplResponse, error) {
// TODO - update FindPetsByTags with the required logic for this service method. // TODO - update FindPetsByTags with the required logic for this service method.
// Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. // Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.
@@ -82,7 +82,7 @@ func (s *PetApiService) FindPetsByTags(ctx context.Context, tags []string) (Impl
} }
// GetPetById - Find pet by ID // GetPetById - Find pet by ID
func (s *PetApiService) GetPetById(ctx context.Context, petId int64) (ImplResponse, error) { func (s *PetAPIService) GetPetById(ctx context.Context, petId int64) (ImplResponse, error) {
// TODO - update GetPetById with the required logic for this service method. // TODO - update GetPetById with the required logic for this service method.
// Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. // Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.
@@ -99,7 +99,7 @@ func (s *PetApiService) GetPetById(ctx context.Context, petId int64) (ImplRespon
} }
// UpdatePet - Update an existing pet // UpdatePet - Update an existing pet
func (s *PetApiService) UpdatePet(ctx context.Context, pet Pet) (ImplResponse, error) { func (s *PetAPIService) UpdatePet(ctx context.Context, pet Pet) (ImplResponse, error) {
// TODO - update UpdatePet with the required logic for this service method. // TODO - update UpdatePet with the required logic for this service method.
// Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. // Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.
@@ -119,7 +119,7 @@ func (s *PetApiService) UpdatePet(ctx context.Context, pet Pet) (ImplResponse, e
} }
// UpdatePetWithForm - Updates a pet in the store with form data // UpdatePetWithForm - Updates a pet in the store with form data
func (s *PetApiService) UpdatePetWithForm(ctx context.Context, petId int64, name string, status string) (ImplResponse, error) { func (s *PetAPIService) UpdatePetWithForm(ctx context.Context, petId int64, name string, status string) (ImplResponse, error) {
// TODO - update UpdatePetWithForm with the required logic for this service method. // TODO - update UpdatePetWithForm with the required logic for this service method.
// Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. // Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.
@@ -130,7 +130,7 @@ func (s *PetApiService) UpdatePetWithForm(ctx context.Context, petId int64, name
} }
// UploadFile - uploads an image // UploadFile - uploads an image
func (s *PetApiService) UploadFile(ctx context.Context, petId int64, additionalMetadata string, file *os.File) (ImplResponse, error) { func (s *PetAPIService) UploadFile(ctx context.Context, petId int64, additionalMetadata string, file *os.File) (ImplResponse, error) {
// TODO - update UploadFile with the required logic for this service method. // TODO - update UploadFile with the required logic for this service method.
// Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. // Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.

View File

@@ -17,25 +17,25 @@ import (
"github.com/gorilla/mux" "github.com/gorilla/mux"
) )
// StoreApiController binds http requests to an api service and writes the service results to the http response // StoreAPIController binds http requests to an api service and writes the service results to the http response
type StoreApiController struct { type StoreAPIController struct {
service StoreApiServicer service StoreAPIServicer
errorHandler ErrorHandler errorHandler ErrorHandler
} }
// StoreApiOption for how the controller is set up. // StoreAPIOption for how the controller is set up.
type StoreApiOption func(*StoreApiController) type StoreAPIOption func(*StoreAPIController)
// WithStoreApiErrorHandler inject ErrorHandler into controller // WithStoreAPIErrorHandler inject ErrorHandler into controller
func WithStoreApiErrorHandler(h ErrorHandler) StoreApiOption { func WithStoreAPIErrorHandler(h ErrorHandler) StoreAPIOption {
return func(c *StoreApiController) { return func(c *StoreAPIController) {
c.errorHandler = h c.errorHandler = h
} }
} }
// NewStoreApiController creates a default api controller // NewStoreAPIController creates a default api controller
func NewStoreApiController(s StoreApiServicer, opts ...StoreApiOption) Router { func NewStoreAPIController(s StoreAPIServicer, opts ...StoreAPIOption) Router {
controller := &StoreApiController{ controller := &StoreAPIController{
service: s, service: s,
errorHandler: DefaultErrorHandler, errorHandler: DefaultErrorHandler,
} }
@@ -47,8 +47,8 @@ func NewStoreApiController(s StoreApiServicer, opts ...StoreApiOption) Router {
return controller return controller
} }
// Routes returns all the api routes for the StoreApiController // Routes returns all the api routes for the StoreAPIController
func (c *StoreApiController) Routes() Routes { func (c *StoreAPIController) Routes() Routes {
return Routes{ return Routes{
"DeleteOrder": Route{ "DeleteOrder": Route{
strings.ToUpper("Delete"), strings.ToUpper("Delete"),
@@ -74,7 +74,7 @@ func (c *StoreApiController) Routes() Routes {
} }
// DeleteOrder - Delete purchase order by ID // DeleteOrder - Delete purchase order by ID
func (c *StoreApiController) DeleteOrder(w http.ResponseWriter, r *http.Request) { func (c *StoreAPIController) DeleteOrder(w http.ResponseWriter, r *http.Request) {
params := mux.Vars(r) params := mux.Vars(r)
orderIdParam := params["orderId"] orderIdParam := params["orderId"]
result, err := c.service.DeleteOrder(r.Context(), orderIdParam) result, err := c.service.DeleteOrder(r.Context(), orderIdParam)
@@ -88,7 +88,7 @@ func (c *StoreApiController) DeleteOrder(w http.ResponseWriter, r *http.Request)
} }
// GetInventory - Returns pet inventories by status // GetInventory - Returns pet inventories by status
func (c *StoreApiController) GetInventory(w http.ResponseWriter, r *http.Request) { func (c *StoreAPIController) GetInventory(w http.ResponseWriter, r *http.Request) {
result, err := c.service.GetInventory(r.Context()) result, err := c.service.GetInventory(r.Context())
// If an error occurred, encode the error with the status code // If an error occurred, encode the error with the status code
if err != nil { if err != nil {
@@ -100,7 +100,7 @@ func (c *StoreApiController) GetInventory(w http.ResponseWriter, r *http.Request
} }
// GetOrderById - Find purchase order by ID // GetOrderById - Find purchase order by ID
func (c *StoreApiController) GetOrderById(w http.ResponseWriter, r *http.Request) { func (c *StoreAPIController) GetOrderById(w http.ResponseWriter, r *http.Request) {
params := mux.Vars(r) params := mux.Vars(r)
orderIdParam, err := parseInt64Parameter(params["orderId"], true) orderIdParam, err := parseInt64Parameter(params["orderId"], true)
if err != nil { if err != nil {
@@ -118,7 +118,7 @@ func (c *StoreApiController) GetOrderById(w http.ResponseWriter, r *http.Request
} }
// PlaceOrder - Place an order for a pet // PlaceOrder - Place an order for a pet
func (c *StoreApiController) PlaceOrder(w http.ResponseWriter, r *http.Request) { func (c *StoreAPIController) PlaceOrder(w http.ResponseWriter, r *http.Request) {
orderParam := Order{} orderParam := Order{}
d := json.NewDecoder(r.Body) d := json.NewDecoder(r.Body)
d.DisallowUnknownFields() d.DisallowUnknownFields()

View File

@@ -15,19 +15,19 @@ import (
"errors" "errors"
) )
// StoreApiService is a service that implements the logic for the StoreApiServicer // StoreAPIService is a service that implements the logic for the StoreAPIServicer
// This service should implement the business logic for every endpoint for the StoreApi API. // This service should implement the business logic for every endpoint for the StoreAPI API.
// Include any external packages or services that will be required by this service. // Include any external packages or services that will be required by this service.
type StoreApiService struct { type StoreAPIService struct {
} }
// NewStoreApiService creates a default api service // NewStoreAPIService creates a default api service
func NewStoreApiService() StoreApiServicer { func NewStoreAPIService() StoreAPIServicer {
return &StoreApiService{} return &StoreAPIService{}
} }
// DeleteOrder - Delete purchase order by ID // DeleteOrder - Delete purchase order by ID
func (s *StoreApiService) DeleteOrder(ctx context.Context, orderId string) (ImplResponse, error) { func (s *StoreAPIService) DeleteOrder(ctx context.Context, orderId string) (ImplResponse, error) {
// TODO - update DeleteOrder with the required logic for this service method. // TODO - update DeleteOrder with the required logic for this service method.
// Add api_store_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. // Add api_store_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.
@@ -41,7 +41,7 @@ func (s *StoreApiService) DeleteOrder(ctx context.Context, orderId string) (Impl
} }
// GetInventory - Returns pet inventories by status // GetInventory - Returns pet inventories by status
func (s *StoreApiService) GetInventory(ctx context.Context) (ImplResponse, error) { func (s *StoreAPIService) GetInventory(ctx context.Context) (ImplResponse, error) {
// TODO - update GetInventory with the required logic for this service method. // TODO - update GetInventory with the required logic for this service method.
// Add api_store_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. // Add api_store_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.
@@ -52,7 +52,7 @@ func (s *StoreApiService) GetInventory(ctx context.Context) (ImplResponse, error
} }
// GetOrderById - Find purchase order by ID // GetOrderById - Find purchase order by ID
func (s *StoreApiService) GetOrderById(ctx context.Context, orderId int64) (ImplResponse, error) { func (s *StoreAPIService) GetOrderById(ctx context.Context, orderId int64) (ImplResponse, error) {
// TODO - update GetOrderById with the required logic for this service method. // TODO - update GetOrderById with the required logic for this service method.
// Add api_store_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. // Add api_store_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.
@@ -69,7 +69,7 @@ func (s *StoreApiService) GetOrderById(ctx context.Context, orderId int64) (Impl
} }
// PlaceOrder - Place an order for a pet // PlaceOrder - Place an order for a pet
func (s *StoreApiService) PlaceOrder(ctx context.Context, order Order) (ImplResponse, error) { func (s *StoreAPIService) PlaceOrder(ctx context.Context, order Order) (ImplResponse, error) {
// TODO - update PlaceOrder with the required logic for this service method. // TODO - update PlaceOrder with the required logic for this service method.
// Add api_store_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. // Add api_store_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.

View File

@@ -17,25 +17,25 @@ import (
"github.com/gorilla/mux" "github.com/gorilla/mux"
) )
// UserApiController binds http requests to an api service and writes the service results to the http response // UserAPIController binds http requests to an api service and writes the service results to the http response
type UserApiController struct { type UserAPIController struct {
service UserApiServicer service UserAPIServicer
errorHandler ErrorHandler errorHandler ErrorHandler
} }
// UserApiOption for how the controller is set up. // UserAPIOption for how the controller is set up.
type UserApiOption func(*UserApiController) type UserAPIOption func(*UserAPIController)
// WithUserApiErrorHandler inject ErrorHandler into controller // WithUserAPIErrorHandler inject ErrorHandler into controller
func WithUserApiErrorHandler(h ErrorHandler) UserApiOption { func WithUserAPIErrorHandler(h ErrorHandler) UserAPIOption {
return func(c *UserApiController) { return func(c *UserAPIController) {
c.errorHandler = h c.errorHandler = h
} }
} }
// NewUserApiController creates a default api controller // NewUserAPIController creates a default api controller
func NewUserApiController(s UserApiServicer, opts ...UserApiOption) Router { func NewUserAPIController(s UserAPIServicer, opts ...UserAPIOption) Router {
controller := &UserApiController{ controller := &UserAPIController{
service: s, service: s,
errorHandler: DefaultErrorHandler, errorHandler: DefaultErrorHandler,
} }
@@ -47,8 +47,8 @@ func NewUserApiController(s UserApiServicer, opts ...UserApiOption) Router {
return controller return controller
} }
// Routes returns all the api routes for the UserApiController // Routes returns all the api routes for the UserAPIController
func (c *UserApiController) Routes() Routes { func (c *UserAPIController) Routes() Routes {
return Routes{ return Routes{
"CreateUser": Route{ "CreateUser": Route{
strings.ToUpper("Post"), strings.ToUpper("Post"),
@@ -94,7 +94,7 @@ func (c *UserApiController) Routes() Routes {
} }
// CreateUser - Create user // CreateUser - Create user
func (c *UserApiController) CreateUser(w http.ResponseWriter, r *http.Request) { func (c *UserAPIController) CreateUser(w http.ResponseWriter, r *http.Request) {
userParam := User{} userParam := User{}
d := json.NewDecoder(r.Body) d := json.NewDecoder(r.Body)
d.DisallowUnknownFields() d.DisallowUnknownFields()
@@ -117,7 +117,7 @@ func (c *UserApiController) CreateUser(w http.ResponseWriter, r *http.Request) {
} }
// CreateUsersWithArrayInput - Creates list of users with given input array // CreateUsersWithArrayInput - Creates list of users with given input array
func (c *UserApiController) CreateUsersWithArrayInput(w http.ResponseWriter, r *http.Request) { func (c *UserAPIController) CreateUsersWithArrayInput(w http.ResponseWriter, r *http.Request) {
userParam := []User{} userParam := []User{}
d := json.NewDecoder(r.Body) d := json.NewDecoder(r.Body)
d.DisallowUnknownFields() d.DisallowUnknownFields()
@@ -142,7 +142,7 @@ func (c *UserApiController) CreateUsersWithArrayInput(w http.ResponseWriter, r *
} }
// CreateUsersWithListInput - Creates list of users with given input array // CreateUsersWithListInput - Creates list of users with given input array
func (c *UserApiController) CreateUsersWithListInput(w http.ResponseWriter, r *http.Request) { func (c *UserAPIController) CreateUsersWithListInput(w http.ResponseWriter, r *http.Request) {
userParam := []User{} userParam := []User{}
d := json.NewDecoder(r.Body) d := json.NewDecoder(r.Body)
d.DisallowUnknownFields() d.DisallowUnknownFields()
@@ -167,7 +167,7 @@ func (c *UserApiController) CreateUsersWithListInput(w http.ResponseWriter, r *h
} }
// DeleteUser - Delete user // DeleteUser - Delete user
func (c *UserApiController) DeleteUser(w http.ResponseWriter, r *http.Request) { func (c *UserAPIController) DeleteUser(w http.ResponseWriter, r *http.Request) {
params := mux.Vars(r) params := mux.Vars(r)
usernameParam := params["username"] usernameParam := params["username"]
result, err := c.service.DeleteUser(r.Context(), usernameParam) result, err := c.service.DeleteUser(r.Context(), usernameParam)
@@ -181,7 +181,7 @@ func (c *UserApiController) DeleteUser(w http.ResponseWriter, r *http.Request) {
} }
// GetUserByName - Get user by user name // GetUserByName - Get user by user name
func (c *UserApiController) GetUserByName(w http.ResponseWriter, r *http.Request) { func (c *UserAPIController) GetUserByName(w http.ResponseWriter, r *http.Request) {
params := mux.Vars(r) params := mux.Vars(r)
usernameParam := params["username"] usernameParam := params["username"]
result, err := c.service.GetUserByName(r.Context(), usernameParam) result, err := c.service.GetUserByName(r.Context(), usernameParam)
@@ -195,7 +195,7 @@ func (c *UserApiController) GetUserByName(w http.ResponseWriter, r *http.Request
} }
// LoginUser - Logs user into the system // LoginUser - Logs user into the system
func (c *UserApiController) LoginUser(w http.ResponseWriter, r *http.Request) { func (c *UserAPIController) LoginUser(w http.ResponseWriter, r *http.Request) {
query := r.URL.Query() query := r.URL.Query()
usernameParam := query.Get("username") usernameParam := query.Get("username")
passwordParam := query.Get("password") passwordParam := query.Get("password")
@@ -210,7 +210,7 @@ func (c *UserApiController) LoginUser(w http.ResponseWriter, r *http.Request) {
} }
// LogoutUser - Logs out current logged in user session // LogoutUser - Logs out current logged in user session
func (c *UserApiController) LogoutUser(w http.ResponseWriter, r *http.Request) { func (c *UserAPIController) LogoutUser(w http.ResponseWriter, r *http.Request) {
result, err := c.service.LogoutUser(r.Context()) result, err := c.service.LogoutUser(r.Context())
// If an error occurred, encode the error with the status code // If an error occurred, encode the error with the status code
if err != nil { if err != nil {
@@ -222,7 +222,7 @@ func (c *UserApiController) LogoutUser(w http.ResponseWriter, r *http.Request) {
} }
// UpdateUser - Updated user // UpdateUser - Updated user
func (c *UserApiController) UpdateUser(w http.ResponseWriter, r *http.Request) { func (c *UserAPIController) UpdateUser(w http.ResponseWriter, r *http.Request) {
params := mux.Vars(r) params := mux.Vars(r)
usernameParam := params["username"] usernameParam := params["username"]
userParam := User{} userParam := User{}

View File

@@ -15,19 +15,19 @@ import (
"errors" "errors"
) )
// UserApiService is a service that implements the logic for the UserApiServicer // UserAPIService is a service that implements the logic for the UserAPIServicer
// This service should implement the business logic for every endpoint for the UserApi API. // This service should implement the business logic for every endpoint for the UserAPI API.
// Include any external packages or services that will be required by this service. // Include any external packages or services that will be required by this service.
type UserApiService struct { type UserAPIService struct {
} }
// NewUserApiService creates a default api service // NewUserAPIService creates a default api service
func NewUserApiService() UserApiServicer { func NewUserAPIService() UserAPIServicer {
return &UserApiService{} return &UserAPIService{}
} }
// CreateUser - Create user // CreateUser - Create user
func (s *UserApiService) CreateUser(ctx context.Context, user User) (ImplResponse, error) { func (s *UserAPIService) CreateUser(ctx context.Context, user User) (ImplResponse, error) {
// TODO - update CreateUser with the required logic for this service method. // TODO - update CreateUser with the required logic for this service method.
// Add api_user_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. // Add api_user_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.
@@ -38,7 +38,7 @@ func (s *UserApiService) CreateUser(ctx context.Context, user User) (ImplRespons
} }
// CreateUsersWithArrayInput - Creates list of users with given input array // CreateUsersWithArrayInput - Creates list of users with given input array
func (s *UserApiService) CreateUsersWithArrayInput(ctx context.Context, user []User) (ImplResponse, error) { func (s *UserAPIService) CreateUsersWithArrayInput(ctx context.Context, user []User) (ImplResponse, error) {
// TODO - update CreateUsersWithArrayInput with the required logic for this service method. // TODO - update CreateUsersWithArrayInput with the required logic for this service method.
// Add api_user_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. // Add api_user_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.
@@ -49,7 +49,7 @@ func (s *UserApiService) CreateUsersWithArrayInput(ctx context.Context, user []U
} }
// CreateUsersWithListInput - Creates list of users with given input array // CreateUsersWithListInput - Creates list of users with given input array
func (s *UserApiService) CreateUsersWithListInput(ctx context.Context, user []User) (ImplResponse, error) { func (s *UserAPIService) CreateUsersWithListInput(ctx context.Context, user []User) (ImplResponse, error) {
// TODO - update CreateUsersWithListInput with the required logic for this service method. // TODO - update CreateUsersWithListInput with the required logic for this service method.
// Add api_user_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. // Add api_user_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.
@@ -60,7 +60,7 @@ func (s *UserApiService) CreateUsersWithListInput(ctx context.Context, user []Us
} }
// DeleteUser - Delete user // DeleteUser - Delete user
func (s *UserApiService) DeleteUser(ctx context.Context, username string) (ImplResponse, error) { func (s *UserAPIService) DeleteUser(ctx context.Context, username string) (ImplResponse, error) {
// TODO - update DeleteUser with the required logic for this service method. // TODO - update DeleteUser with the required logic for this service method.
// Add api_user_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. // Add api_user_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.
@@ -74,7 +74,7 @@ func (s *UserApiService) DeleteUser(ctx context.Context, username string) (ImplR
} }
// GetUserByName - Get user by user name // GetUserByName - Get user by user name
func (s *UserApiService) GetUserByName(ctx context.Context, username string) (ImplResponse, error) { func (s *UserAPIService) GetUserByName(ctx context.Context, username string) (ImplResponse, error) {
// TODO - update GetUserByName with the required logic for this service method. // TODO - update GetUserByName with the required logic for this service method.
// Add api_user_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. // Add api_user_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.
@@ -91,7 +91,7 @@ func (s *UserApiService) GetUserByName(ctx context.Context, username string) (Im
} }
// LoginUser - Logs user into the system // LoginUser - Logs user into the system
func (s *UserApiService) LoginUser(ctx context.Context, username string, password string) (ImplResponse, error) { func (s *UserAPIService) LoginUser(ctx context.Context, username string, password string) (ImplResponse, error) {
// TODO - update LoginUser with the required logic for this service method. // TODO - update LoginUser with the required logic for this service method.
// Add api_user_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. // Add api_user_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.
@@ -105,7 +105,7 @@ func (s *UserApiService) LoginUser(ctx context.Context, username string, passwor
} }
// LogoutUser - Logs out current logged in user session // LogoutUser - Logs out current logged in user session
func (s *UserApiService) LogoutUser(ctx context.Context) (ImplResponse, error) { func (s *UserAPIService) LogoutUser(ctx context.Context) (ImplResponse, error) {
// TODO - update LogoutUser with the required logic for this service method. // TODO - update LogoutUser with the required logic for this service method.
// Add api_user_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. // Add api_user_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.
@@ -116,7 +116,7 @@ func (s *UserApiService) LogoutUser(ctx context.Context) (ImplResponse, error) {
} }
// UpdateUser - Updated user // UpdateUser - Updated user
func (s *UserApiService) UpdateUser(ctx context.Context, username string, user User) (ImplResponse, error) { func (s *UserAPIService) UpdateUser(ctx context.Context, username string, user User) (ImplResponse, error) {
// TODO - update UpdateUser with the required logic for this service method. // TODO - update UpdateUser with the required logic for this service method.
// Add api_user_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. // Add api_user_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.

View File

@@ -1,19 +0,0 @@
/*
* OpenAPI Petstore
*
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
* API version: 1.0.0
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/
package petstoreserver
type InlineObject struct {
// Updated name of the pet
Name string `json:"name,omitempty"`
// Updated status of the pet
Status string `json:"status,omitempty"`
}

View File

@@ -1,23 +0,0 @@
/*
* OpenAPI Petstore
*
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
* API version: 1.0.0
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/
package petstoreserver
import (
"os"
)
type InlineObject1 struct {
// Additional data to pass to server
AdditionalMetadata string `json:"additionalMetadata,omitempty"`
// file to upload
File *os.File `json:"file,omitempty"`
}

View File

@@ -19,16 +19,16 @@ import (
func main() { func main() {
log.Printf("Server started") log.Printf("Server started")
PetApiService := petstoreserver.NewPetApiService() PetAPIService := petstoreserver.NewPetAPIService()
PetApiController := petstoreserver.NewPetApiController(PetApiService) PetAPIController := petstoreserver.NewPetAPIController(PetAPIService)
StoreApiService := petstoreserver.NewStoreApiService() StoreAPIService := petstoreserver.NewStoreAPIService()
StoreApiController := petstoreserver.NewStoreApiController(StoreApiService) StoreAPIController := petstoreserver.NewStoreAPIController(StoreAPIService)
UserApiService := petstoreserver.NewUserApiService() UserAPIService := petstoreserver.NewUserAPIService()
UserApiController := petstoreserver.NewUserApiController(UserApiService) UserAPIController := petstoreserver.NewUserAPIController(UserAPIService)
router := petstoreserver.NewRouter(PetApiController, StoreApiController, UserApiController) router := petstoreserver.NewRouter(PetAPIController, StoreAPIController, UserAPIController)
log.Fatal(http.ListenAndServe(":8080", router)) log.Fatal(http.ListenAndServe(":8080", router))
} }

View File

@@ -1,47 +0,0 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>org.openapitools</groupId>
<artifactId>GoApiServer</artifactId>
<packaging>pom</packaging>
<version>1.0-SNAPSHOT</version>
<name>Go Api Server</name>
<build>
<plugins>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<id>go-test</id>
<phase>integration-test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>go</executable>
<arguments>
<argument>test</argument>
<argument>-v</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@@ -17,10 +17,10 @@ import (
// PetApiRouter defines the required methods for binding the api requests to a responses for the PetApi // PetAPIRouter defines the required methods for binding the api requests to a responses for the PetAPI
// The PetApiRouter implementation should parse necessary information from the http request, // The PetAPIRouter implementation should parse necessary information from the http request,
// pass the data to a PetApiServicer to perform the required actions, then write the service results to the http response. // pass the data to a PetAPIServicer to perform the required actions, then write the service results to the http response.
type PetApiRouter interface { type PetAPIRouter interface {
AddPet(http.ResponseWriter, *http.Request) AddPet(http.ResponseWriter, *http.Request)
DeletePet(http.ResponseWriter, *http.Request) DeletePet(http.ResponseWriter, *http.Request)
FindPetsByStatus(http.ResponseWriter, *http.Request) FindPetsByStatus(http.ResponseWriter, *http.Request)
@@ -31,19 +31,19 @@ type PetApiRouter interface {
UpdatePetWithForm(http.ResponseWriter, *http.Request) UpdatePetWithForm(http.ResponseWriter, *http.Request)
UploadFile(http.ResponseWriter, *http.Request) UploadFile(http.ResponseWriter, *http.Request)
} }
// StoreApiRouter defines the required methods for binding the api requests to a responses for the StoreApi // StoreAPIRouter defines the required methods for binding the api requests to a responses for the StoreAPI
// The StoreApiRouter implementation should parse necessary information from the http request, // The StoreAPIRouter implementation should parse necessary information from the http request,
// pass the data to a StoreApiServicer to perform the required actions, then write the service results to the http response. // pass the data to a StoreAPIServicer to perform the required actions, then write the service results to the http response.
type StoreApiRouter interface { type StoreAPIRouter interface {
DeleteOrder(http.ResponseWriter, *http.Request) DeleteOrder(http.ResponseWriter, *http.Request)
GetInventory(http.ResponseWriter, *http.Request) GetInventory(http.ResponseWriter, *http.Request)
GetOrderById(http.ResponseWriter, *http.Request) GetOrderById(http.ResponseWriter, *http.Request)
PlaceOrder(http.ResponseWriter, *http.Request) PlaceOrder(http.ResponseWriter, *http.Request)
} }
// UserApiRouter defines the required methods for binding the api requests to a responses for the UserApi // UserAPIRouter defines the required methods for binding the api requests to a responses for the UserAPI
// The UserApiRouter implementation should parse necessary information from the http request, // The UserAPIRouter implementation should parse necessary information from the http request,
// pass the data to a UserApiServicer to perform the required actions, then write the service results to the http response. // pass the data to a UserAPIServicer to perform the required actions, then write the service results to the http response.
type UserApiRouter interface { type UserAPIRouter interface {
CreateUser(http.ResponseWriter, *http.Request) CreateUser(http.ResponseWriter, *http.Request)
CreateUsersWithArrayInput(http.ResponseWriter, *http.Request) CreateUsersWithArrayInput(http.ResponseWriter, *http.Request)
CreateUsersWithListInput(http.ResponseWriter, *http.Request) CreateUsersWithListInput(http.ResponseWriter, *http.Request)
@@ -55,11 +55,11 @@ type UserApiRouter interface {
} }
// PetApiServicer defines the api actions for the PetApi service // PetAPIServicer defines the api actions for the PetAPI service
// This interface intended to stay up to date with the openapi yaml used to generate it, // This interface intended to stay up to date with the openapi yaml used to generate it,
// while the service implementation can be ignored with the .openapi-generator-ignore file // while the service implementation can be ignored with the .openapi-generator-ignore file
// and updated with the logic required for the API. // and updated with the logic required for the API.
type PetApiServicer interface { type PetAPIServicer interface {
AddPet(context.Context, Pet) (ImplResponse, error) AddPet(context.Context, Pet) (ImplResponse, error)
DeletePet(context.Context, int64, string) (ImplResponse, error) DeletePet(context.Context, int64, string) (ImplResponse, error)
FindPetsByStatus(context.Context, []string) (ImplResponse, error) FindPetsByStatus(context.Context, []string) (ImplResponse, error)
@@ -72,11 +72,11 @@ type PetApiServicer interface {
} }
// StoreApiServicer defines the api actions for the StoreApi service // StoreAPIServicer defines the api actions for the StoreAPI service
// This interface intended to stay up to date with the openapi yaml used to generate it, // This interface intended to stay up to date with the openapi yaml used to generate it,
// while the service implementation can be ignored with the .openapi-generator-ignore file // while the service implementation can be ignored with the .openapi-generator-ignore file
// and updated with the logic required for the API. // and updated with the logic required for the API.
type StoreApiServicer interface { type StoreAPIServicer interface {
DeleteOrder(context.Context, string) (ImplResponse, error) DeleteOrder(context.Context, string) (ImplResponse, error)
GetInventory(context.Context) (ImplResponse, error) GetInventory(context.Context) (ImplResponse, error)
GetOrderById(context.Context, int64) (ImplResponse, error) GetOrderById(context.Context, int64) (ImplResponse, error)
@@ -84,11 +84,11 @@ type StoreApiServicer interface {
} }
// UserApiServicer defines the api actions for the UserApi service // UserAPIServicer defines the api actions for the UserAPI service
// This interface intended to stay up to date with the openapi yaml used to generate it, // This interface intended to stay up to date with the openapi yaml used to generate it,
// while the service implementation can be ignored with the .openapi-generator-ignore file // while the service implementation can be ignored with the .openapi-generator-ignore file
// and updated with the logic required for the API. // and updated with the logic required for the API.
type UserApiServicer interface { type UserAPIServicer interface {
CreateUser(context.Context, User) (ImplResponse, error) CreateUser(context.Context, User) (ImplResponse, error)
CreateUsersWithArrayInput(context.Context, []User) (ImplResponse, error) CreateUsersWithArrayInput(context.Context, []User) (ImplResponse, error)
CreateUsersWithListInput(context.Context, []User) (ImplResponse, error) CreateUsersWithListInput(context.Context, []User) (ImplResponse, error)

View File

@@ -17,25 +17,25 @@ import (
"github.com/go-chi/chi/v5" "github.com/go-chi/chi/v5"
) )
// PetApiController binds http requests to an api service and writes the service results to the http response // PetAPIController binds http requests to an api service and writes the service results to the http response
type PetApiController struct { type PetAPIController struct {
service PetApiServicer service PetAPIServicer
errorHandler ErrorHandler errorHandler ErrorHandler
} }
// PetApiOption for how the controller is set up. // PetAPIOption for how the controller is set up.
type PetApiOption func(*PetApiController) type PetAPIOption func(*PetAPIController)
// WithPetApiErrorHandler inject ErrorHandler into controller // WithPetAPIErrorHandler inject ErrorHandler into controller
func WithPetApiErrorHandler(h ErrorHandler) PetApiOption { func WithPetAPIErrorHandler(h ErrorHandler) PetAPIOption {
return func(c *PetApiController) { return func(c *PetAPIController) {
c.errorHandler = h c.errorHandler = h
} }
} }
// NewPetApiController creates a default api controller // NewPetAPIController creates a default api controller
func NewPetApiController(s PetApiServicer, opts ...PetApiOption) Router { func NewPetAPIController(s PetAPIServicer, opts ...PetAPIOption) Router {
controller := &PetApiController{ controller := &PetAPIController{
service: s, service: s,
errorHandler: DefaultErrorHandler, errorHandler: DefaultErrorHandler,
} }
@@ -47,8 +47,8 @@ func NewPetApiController(s PetApiServicer, opts ...PetApiOption) Router {
return controller return controller
} }
// Routes returns all the api routes for the PetApiController // Routes returns all the api routes for the PetAPIController
func (c *PetApiController) Routes() Routes { func (c *PetAPIController) Routes() Routes {
return Routes{ return Routes{
"AddPet": Route{ "AddPet": Route{
strings.ToUpper("Post"), strings.ToUpper("Post"),
@@ -94,7 +94,7 @@ func (c *PetApiController) Routes() Routes {
} }
// AddPet - Add a new pet to the store // AddPet - Add a new pet to the store
func (c *PetApiController) AddPet(w http.ResponseWriter, r *http.Request) { func (c *PetAPIController) AddPet(w http.ResponseWriter, r *http.Request) {
petParam := Pet{} petParam := Pet{}
d := json.NewDecoder(r.Body) d := json.NewDecoder(r.Body)
d.DisallowUnknownFields() d.DisallowUnknownFields()
@@ -117,7 +117,7 @@ func (c *PetApiController) AddPet(w http.ResponseWriter, r *http.Request) {
} }
// DeletePet - Deletes a pet // DeletePet - Deletes a pet
func (c *PetApiController) DeletePet(w http.ResponseWriter, r *http.Request) { func (c *PetAPIController) DeletePet(w http.ResponseWriter, r *http.Request) {
petIdParam, err := parseInt64Parameter(chi.URLParam(r, "petId"), true) petIdParam, err := parseInt64Parameter(chi.URLParam(r, "petId"), true)
if err != nil { if err != nil {
c.errorHandler(w, r, &ParsingError{Err: err}, nil) c.errorHandler(w, r, &ParsingError{Err: err}, nil)
@@ -135,7 +135,7 @@ func (c *PetApiController) DeletePet(w http.ResponseWriter, r *http.Request) {
} }
// FindPetsByStatus - Finds Pets by status // FindPetsByStatus - Finds Pets by status
func (c *PetApiController) FindPetsByStatus(w http.ResponseWriter, r *http.Request) { func (c *PetAPIController) FindPetsByStatus(w http.ResponseWriter, r *http.Request) {
query := r.URL.Query() query := r.URL.Query()
statusParam := strings.Split(query.Get("status"), ",") statusParam := strings.Split(query.Get("status"), ",")
result, err := c.service.FindPetsByStatus(r.Context(), statusParam) result, err := c.service.FindPetsByStatus(r.Context(), statusParam)
@@ -150,7 +150,7 @@ func (c *PetApiController) FindPetsByStatus(w http.ResponseWriter, r *http.Reque
// FindPetsByTags - Finds Pets by tags // FindPetsByTags - Finds Pets by tags
// Deprecated // Deprecated
func (c *PetApiController) FindPetsByTags(w http.ResponseWriter, r *http.Request) { func (c *PetAPIController) FindPetsByTags(w http.ResponseWriter, r *http.Request) {
query := r.URL.Query() query := r.URL.Query()
tagsParam := strings.Split(query.Get("tags"), ",") tagsParam := strings.Split(query.Get("tags"), ",")
result, err := c.service.FindPetsByTags(r.Context(), tagsParam) result, err := c.service.FindPetsByTags(r.Context(), tagsParam)
@@ -164,7 +164,7 @@ func (c *PetApiController) FindPetsByTags(w http.ResponseWriter, r *http.Request
} }
// GetPetById - Find pet by ID // GetPetById - Find pet by ID
func (c *PetApiController) GetPetById(w http.ResponseWriter, r *http.Request) { func (c *PetAPIController) GetPetById(w http.ResponseWriter, r *http.Request) {
petIdParam, err := parseInt64Parameter(chi.URLParam(r, "petId"), true) petIdParam, err := parseInt64Parameter(chi.URLParam(r, "petId"), true)
if err != nil { if err != nil {
c.errorHandler(w, r, &ParsingError{Err: err}, nil) c.errorHandler(w, r, &ParsingError{Err: err}, nil)
@@ -181,7 +181,7 @@ func (c *PetApiController) GetPetById(w http.ResponseWriter, r *http.Request) {
} }
// UpdatePet - Update an existing pet // UpdatePet - Update an existing pet
func (c *PetApiController) UpdatePet(w http.ResponseWriter, r *http.Request) { func (c *PetAPIController) UpdatePet(w http.ResponseWriter, r *http.Request) {
petParam := Pet{} petParam := Pet{}
d := json.NewDecoder(r.Body) d := json.NewDecoder(r.Body)
d.DisallowUnknownFields() d.DisallowUnknownFields()
@@ -204,7 +204,7 @@ func (c *PetApiController) UpdatePet(w http.ResponseWriter, r *http.Request) {
} }
// UpdatePetWithForm - Updates a pet in the store with form data // UpdatePetWithForm - Updates a pet in the store with form data
func (c *PetApiController) UpdatePetWithForm(w http.ResponseWriter, r *http.Request) { func (c *PetAPIController) UpdatePetWithForm(w http.ResponseWriter, r *http.Request) {
if err := r.ParseForm(); err != nil { if err := r.ParseForm(); err != nil {
c.errorHandler(w, r, &ParsingError{Err: err}, nil) c.errorHandler(w, r, &ParsingError{Err: err}, nil)
return return
@@ -227,7 +227,7 @@ func (c *PetApiController) UpdatePetWithForm(w http.ResponseWriter, r *http.Requ
} }
// UploadFile - uploads an image // UploadFile - uploads an image
func (c *PetApiController) UploadFile(w http.ResponseWriter, r *http.Request) { func (c *PetAPIController) UploadFile(w http.ResponseWriter, r *http.Request) {
if err := r.ParseMultipartForm(32 << 20); err != nil { if err := r.ParseMultipartForm(32 << 20); err != nil {
c.errorHandler(w, r, &ParsingError{Err: err}, nil) c.errorHandler(w, r, &ParsingError{Err: err}, nil)
return return

View File

@@ -16,19 +16,19 @@ import (
"os" "os"
) )
// PetApiService is a service that implements the logic for the PetApiServicer // PetAPIService is a service that implements the logic for the PetAPIServicer
// This service should implement the business logic for every endpoint for the PetApi API. // This service should implement the business logic for every endpoint for the PetAPI API.
// Include any external packages or services that will be required by this service. // Include any external packages or services that will be required by this service.
type PetApiService struct { type PetAPIService struct {
} }
// NewPetApiService creates a default api service // NewPetAPIService creates a default api service
func NewPetApiService() PetApiServicer { func NewPetAPIService() PetAPIServicer {
return &PetApiService{} return &PetAPIService{}
} }
// AddPet - Add a new pet to the store // AddPet - Add a new pet to the store
func (s *PetApiService) AddPet(ctx context.Context, pet Pet) (ImplResponse, error) { func (s *PetAPIService) AddPet(ctx context.Context, pet Pet) (ImplResponse, error) {
// TODO - update AddPet with the required logic for this service method. // TODO - update AddPet with the required logic for this service method.
// Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. // Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.
@@ -42,7 +42,7 @@ func (s *PetApiService) AddPet(ctx context.Context, pet Pet) (ImplResponse, erro
} }
// DeletePet - Deletes a pet // DeletePet - Deletes a pet
func (s *PetApiService) DeletePet(ctx context.Context, petId int64, apiKey string) (ImplResponse, error) { func (s *PetAPIService) DeletePet(ctx context.Context, petId int64, apiKey string) (ImplResponse, error) {
// TODO - update DeletePet with the required logic for this service method. // TODO - update DeletePet with the required logic for this service method.
// Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. // Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.
@@ -53,7 +53,7 @@ func (s *PetApiService) DeletePet(ctx context.Context, petId int64, apiKey strin
} }
// FindPetsByStatus - Finds Pets by status // FindPetsByStatus - Finds Pets by status
func (s *PetApiService) FindPetsByStatus(ctx context.Context, status []string) (ImplResponse, error) { func (s *PetAPIService) FindPetsByStatus(ctx context.Context, status []string) (ImplResponse, error) {
// TODO - update FindPetsByStatus with the required logic for this service method. // TODO - update FindPetsByStatus with the required logic for this service method.
// Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. // Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.
@@ -68,7 +68,7 @@ func (s *PetApiService) FindPetsByStatus(ctx context.Context, status []string) (
// FindPetsByTags - Finds Pets by tags // FindPetsByTags - Finds Pets by tags
// Deprecated // Deprecated
func (s *PetApiService) FindPetsByTags(ctx context.Context, tags []string) (ImplResponse, error) { func (s *PetAPIService) FindPetsByTags(ctx context.Context, tags []string) (ImplResponse, error) {
// TODO - update FindPetsByTags with the required logic for this service method. // TODO - update FindPetsByTags with the required logic for this service method.
// Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. // Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.
@@ -82,7 +82,7 @@ func (s *PetApiService) FindPetsByTags(ctx context.Context, tags []string) (Impl
} }
// GetPetById - Find pet by ID // GetPetById - Find pet by ID
func (s *PetApiService) GetPetById(ctx context.Context, petId int64) (ImplResponse, error) { func (s *PetAPIService) GetPetById(ctx context.Context, petId int64) (ImplResponse, error) {
// TODO - update GetPetById with the required logic for this service method. // TODO - update GetPetById with the required logic for this service method.
// Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. // Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.
@@ -99,7 +99,7 @@ func (s *PetApiService) GetPetById(ctx context.Context, petId int64) (ImplRespon
} }
// UpdatePet - Update an existing pet // UpdatePet - Update an existing pet
func (s *PetApiService) UpdatePet(ctx context.Context, pet Pet) (ImplResponse, error) { func (s *PetAPIService) UpdatePet(ctx context.Context, pet Pet) (ImplResponse, error) {
// TODO - update UpdatePet with the required logic for this service method. // TODO - update UpdatePet with the required logic for this service method.
// Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. // Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.
@@ -119,7 +119,7 @@ func (s *PetApiService) UpdatePet(ctx context.Context, pet Pet) (ImplResponse, e
} }
// UpdatePetWithForm - Updates a pet in the store with form data // UpdatePetWithForm - Updates a pet in the store with form data
func (s *PetApiService) UpdatePetWithForm(ctx context.Context, petId int64, name string, status string) (ImplResponse, error) { func (s *PetAPIService) UpdatePetWithForm(ctx context.Context, petId int64, name string, status string) (ImplResponse, error) {
// TODO - update UpdatePetWithForm with the required logic for this service method. // TODO - update UpdatePetWithForm with the required logic for this service method.
// Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. // Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.
@@ -130,7 +130,7 @@ func (s *PetApiService) UpdatePetWithForm(ctx context.Context, petId int64, name
} }
// UploadFile - uploads an image // UploadFile - uploads an image
func (s *PetApiService) UploadFile(ctx context.Context, petId int64, additionalMetadata string, file *os.File) (ImplResponse, error) { func (s *PetAPIService) UploadFile(ctx context.Context, petId int64, additionalMetadata string, file *os.File) (ImplResponse, error) {
// TODO - update UploadFile with the required logic for this service method. // TODO - update UploadFile with the required logic for this service method.
// Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. // Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.

View File

@@ -17,25 +17,25 @@ import (
"github.com/go-chi/chi/v5" "github.com/go-chi/chi/v5"
) )
// StoreApiController binds http requests to an api service and writes the service results to the http response // StoreAPIController binds http requests to an api service and writes the service results to the http response
type StoreApiController struct { type StoreAPIController struct {
service StoreApiServicer service StoreAPIServicer
errorHandler ErrorHandler errorHandler ErrorHandler
} }
// StoreApiOption for how the controller is set up. // StoreAPIOption for how the controller is set up.
type StoreApiOption func(*StoreApiController) type StoreAPIOption func(*StoreAPIController)
// WithStoreApiErrorHandler inject ErrorHandler into controller // WithStoreAPIErrorHandler inject ErrorHandler into controller
func WithStoreApiErrorHandler(h ErrorHandler) StoreApiOption { func WithStoreAPIErrorHandler(h ErrorHandler) StoreAPIOption {
return func(c *StoreApiController) { return func(c *StoreAPIController) {
c.errorHandler = h c.errorHandler = h
} }
} }
// NewStoreApiController creates a default api controller // NewStoreAPIController creates a default api controller
func NewStoreApiController(s StoreApiServicer, opts ...StoreApiOption) Router { func NewStoreAPIController(s StoreAPIServicer, opts ...StoreAPIOption) Router {
controller := &StoreApiController{ controller := &StoreAPIController{
service: s, service: s,
errorHandler: DefaultErrorHandler, errorHandler: DefaultErrorHandler,
} }
@@ -47,8 +47,8 @@ func NewStoreApiController(s StoreApiServicer, opts ...StoreApiOption) Router {
return controller return controller
} }
// Routes returns all the api routes for the StoreApiController // Routes returns all the api routes for the StoreAPIController
func (c *StoreApiController) Routes() Routes { func (c *StoreAPIController) Routes() Routes {
return Routes{ return Routes{
"DeleteOrder": Route{ "DeleteOrder": Route{
strings.ToUpper("Delete"), strings.ToUpper("Delete"),
@@ -74,7 +74,7 @@ func (c *StoreApiController) Routes() Routes {
} }
// DeleteOrder - Delete purchase order by ID // DeleteOrder - Delete purchase order by ID
func (c *StoreApiController) DeleteOrder(w http.ResponseWriter, r *http.Request) { func (c *StoreAPIController) DeleteOrder(w http.ResponseWriter, r *http.Request) {
orderIdParam := chi.URLParam(r, "orderId") orderIdParam := chi.URLParam(r, "orderId")
result, err := c.service.DeleteOrder(r.Context(), orderIdParam) result, err := c.service.DeleteOrder(r.Context(), orderIdParam)
// If an error occurred, encode the error with the status code // If an error occurred, encode the error with the status code
@@ -87,7 +87,7 @@ func (c *StoreApiController) DeleteOrder(w http.ResponseWriter, r *http.Request)
} }
// GetInventory - Returns pet inventories by status // GetInventory - Returns pet inventories by status
func (c *StoreApiController) GetInventory(w http.ResponseWriter, r *http.Request) { func (c *StoreAPIController) GetInventory(w http.ResponseWriter, r *http.Request) {
result, err := c.service.GetInventory(r.Context()) result, err := c.service.GetInventory(r.Context())
// If an error occurred, encode the error with the status code // If an error occurred, encode the error with the status code
if err != nil { if err != nil {
@@ -99,7 +99,7 @@ func (c *StoreApiController) GetInventory(w http.ResponseWriter, r *http.Request
} }
// GetOrderById - Find purchase order by ID // GetOrderById - Find purchase order by ID
func (c *StoreApiController) GetOrderById(w http.ResponseWriter, r *http.Request) { func (c *StoreAPIController) GetOrderById(w http.ResponseWriter, r *http.Request) {
orderIdParam, err := parseInt64Parameter(chi.URLParam(r, "orderId"), true) orderIdParam, err := parseInt64Parameter(chi.URLParam(r, "orderId"), true)
if err != nil { if err != nil {
c.errorHandler(w, r, &ParsingError{Err: err}, nil) c.errorHandler(w, r, &ParsingError{Err: err}, nil)
@@ -116,7 +116,7 @@ func (c *StoreApiController) GetOrderById(w http.ResponseWriter, r *http.Request
} }
// PlaceOrder - Place an order for a pet // PlaceOrder - Place an order for a pet
func (c *StoreApiController) PlaceOrder(w http.ResponseWriter, r *http.Request) { func (c *StoreAPIController) PlaceOrder(w http.ResponseWriter, r *http.Request) {
orderParam := Order{} orderParam := Order{}
d := json.NewDecoder(r.Body) d := json.NewDecoder(r.Body)
d.DisallowUnknownFields() d.DisallowUnknownFields()

View File

@@ -15,19 +15,19 @@ import (
"errors" "errors"
) )
// StoreApiService is a service that implements the logic for the StoreApiServicer // StoreAPIService is a service that implements the logic for the StoreAPIServicer
// This service should implement the business logic for every endpoint for the StoreApi API. // This service should implement the business logic for every endpoint for the StoreAPI API.
// Include any external packages or services that will be required by this service. // Include any external packages or services that will be required by this service.
type StoreApiService struct { type StoreAPIService struct {
} }
// NewStoreApiService creates a default api service // NewStoreAPIService creates a default api service
func NewStoreApiService() StoreApiServicer { func NewStoreAPIService() StoreAPIServicer {
return &StoreApiService{} return &StoreAPIService{}
} }
// DeleteOrder - Delete purchase order by ID // DeleteOrder - Delete purchase order by ID
func (s *StoreApiService) DeleteOrder(ctx context.Context, orderId string) (ImplResponse, error) { func (s *StoreAPIService) DeleteOrder(ctx context.Context, orderId string) (ImplResponse, error) {
// TODO - update DeleteOrder with the required logic for this service method. // TODO - update DeleteOrder with the required logic for this service method.
// Add api_store_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. // Add api_store_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.
@@ -41,7 +41,7 @@ func (s *StoreApiService) DeleteOrder(ctx context.Context, orderId string) (Impl
} }
// GetInventory - Returns pet inventories by status // GetInventory - Returns pet inventories by status
func (s *StoreApiService) GetInventory(ctx context.Context) (ImplResponse, error) { func (s *StoreAPIService) GetInventory(ctx context.Context) (ImplResponse, error) {
// TODO - update GetInventory with the required logic for this service method. // TODO - update GetInventory with the required logic for this service method.
// Add api_store_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. // Add api_store_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.
@@ -52,7 +52,7 @@ func (s *StoreApiService) GetInventory(ctx context.Context) (ImplResponse, error
} }
// GetOrderById - Find purchase order by ID // GetOrderById - Find purchase order by ID
func (s *StoreApiService) GetOrderById(ctx context.Context, orderId int64) (ImplResponse, error) { func (s *StoreAPIService) GetOrderById(ctx context.Context, orderId int64) (ImplResponse, error) {
// TODO - update GetOrderById with the required logic for this service method. // TODO - update GetOrderById with the required logic for this service method.
// Add api_store_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. // Add api_store_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.
@@ -69,7 +69,7 @@ func (s *StoreApiService) GetOrderById(ctx context.Context, orderId int64) (Impl
} }
// PlaceOrder - Place an order for a pet // PlaceOrder - Place an order for a pet
func (s *StoreApiService) PlaceOrder(ctx context.Context, order Order) (ImplResponse, error) { func (s *StoreAPIService) PlaceOrder(ctx context.Context, order Order) (ImplResponse, error) {
// TODO - update PlaceOrder with the required logic for this service method. // TODO - update PlaceOrder with the required logic for this service method.
// Add api_store_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. // Add api_store_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.

View File

@@ -17,25 +17,25 @@ import (
"github.com/go-chi/chi/v5" "github.com/go-chi/chi/v5"
) )
// UserApiController binds http requests to an api service and writes the service results to the http response // UserAPIController binds http requests to an api service and writes the service results to the http response
type UserApiController struct { type UserAPIController struct {
service UserApiServicer service UserAPIServicer
errorHandler ErrorHandler errorHandler ErrorHandler
} }
// UserApiOption for how the controller is set up. // UserAPIOption for how the controller is set up.
type UserApiOption func(*UserApiController) type UserAPIOption func(*UserAPIController)
// WithUserApiErrorHandler inject ErrorHandler into controller // WithUserAPIErrorHandler inject ErrorHandler into controller
func WithUserApiErrorHandler(h ErrorHandler) UserApiOption { func WithUserAPIErrorHandler(h ErrorHandler) UserAPIOption {
return func(c *UserApiController) { return func(c *UserAPIController) {
c.errorHandler = h c.errorHandler = h
} }
} }
// NewUserApiController creates a default api controller // NewUserAPIController creates a default api controller
func NewUserApiController(s UserApiServicer, opts ...UserApiOption) Router { func NewUserAPIController(s UserAPIServicer, opts ...UserAPIOption) Router {
controller := &UserApiController{ controller := &UserAPIController{
service: s, service: s,
errorHandler: DefaultErrorHandler, errorHandler: DefaultErrorHandler,
} }
@@ -47,8 +47,8 @@ func NewUserApiController(s UserApiServicer, opts ...UserApiOption) Router {
return controller return controller
} }
// Routes returns all the api routes for the UserApiController // Routes returns all the api routes for the UserAPIController
func (c *UserApiController) Routes() Routes { func (c *UserAPIController) Routes() Routes {
return Routes{ return Routes{
"CreateUser": Route{ "CreateUser": Route{
strings.ToUpper("Post"), strings.ToUpper("Post"),
@@ -94,7 +94,7 @@ func (c *UserApiController) Routes() Routes {
} }
// CreateUser - Create user // CreateUser - Create user
func (c *UserApiController) CreateUser(w http.ResponseWriter, r *http.Request) { func (c *UserAPIController) CreateUser(w http.ResponseWriter, r *http.Request) {
userParam := User{} userParam := User{}
d := json.NewDecoder(r.Body) d := json.NewDecoder(r.Body)
d.DisallowUnknownFields() d.DisallowUnknownFields()
@@ -117,7 +117,7 @@ func (c *UserApiController) CreateUser(w http.ResponseWriter, r *http.Request) {
} }
// CreateUsersWithArrayInput - Creates list of users with given input array // CreateUsersWithArrayInput - Creates list of users with given input array
func (c *UserApiController) CreateUsersWithArrayInput(w http.ResponseWriter, r *http.Request) { func (c *UserAPIController) CreateUsersWithArrayInput(w http.ResponseWriter, r *http.Request) {
userParam := []User{} userParam := []User{}
d := json.NewDecoder(r.Body) d := json.NewDecoder(r.Body)
d.DisallowUnknownFields() d.DisallowUnknownFields()
@@ -142,7 +142,7 @@ func (c *UserApiController) CreateUsersWithArrayInput(w http.ResponseWriter, r *
} }
// CreateUsersWithListInput - Creates list of users with given input array // CreateUsersWithListInput - Creates list of users with given input array
func (c *UserApiController) CreateUsersWithListInput(w http.ResponseWriter, r *http.Request) { func (c *UserAPIController) CreateUsersWithListInput(w http.ResponseWriter, r *http.Request) {
userParam := []User{} userParam := []User{}
d := json.NewDecoder(r.Body) d := json.NewDecoder(r.Body)
d.DisallowUnknownFields() d.DisallowUnknownFields()
@@ -167,7 +167,7 @@ func (c *UserApiController) CreateUsersWithListInput(w http.ResponseWriter, r *h
} }
// DeleteUser - Delete user // DeleteUser - Delete user
func (c *UserApiController) DeleteUser(w http.ResponseWriter, r *http.Request) { func (c *UserAPIController) DeleteUser(w http.ResponseWriter, r *http.Request) {
usernameParam := chi.URLParam(r, "username") usernameParam := chi.URLParam(r, "username")
result, err := c.service.DeleteUser(r.Context(), usernameParam) result, err := c.service.DeleteUser(r.Context(), usernameParam)
// If an error occurred, encode the error with the status code // If an error occurred, encode the error with the status code
@@ -180,7 +180,7 @@ func (c *UserApiController) DeleteUser(w http.ResponseWriter, r *http.Request) {
} }
// GetUserByName - Get user by user name // GetUserByName - Get user by user name
func (c *UserApiController) GetUserByName(w http.ResponseWriter, r *http.Request) { func (c *UserAPIController) GetUserByName(w http.ResponseWriter, r *http.Request) {
usernameParam := chi.URLParam(r, "username") usernameParam := chi.URLParam(r, "username")
result, err := c.service.GetUserByName(r.Context(), usernameParam) result, err := c.service.GetUserByName(r.Context(), usernameParam)
// If an error occurred, encode the error with the status code // If an error occurred, encode the error with the status code
@@ -193,7 +193,7 @@ func (c *UserApiController) GetUserByName(w http.ResponseWriter, r *http.Request
} }
// LoginUser - Logs user into the system // LoginUser - Logs user into the system
func (c *UserApiController) LoginUser(w http.ResponseWriter, r *http.Request) { func (c *UserAPIController) LoginUser(w http.ResponseWriter, r *http.Request) {
query := r.URL.Query() query := r.URL.Query()
usernameParam := query.Get("username") usernameParam := query.Get("username")
passwordParam := query.Get("password") passwordParam := query.Get("password")
@@ -208,7 +208,7 @@ func (c *UserApiController) LoginUser(w http.ResponseWriter, r *http.Request) {
} }
// LogoutUser - Logs out current logged in user session // LogoutUser - Logs out current logged in user session
func (c *UserApiController) LogoutUser(w http.ResponseWriter, r *http.Request) { func (c *UserAPIController) LogoutUser(w http.ResponseWriter, r *http.Request) {
result, err := c.service.LogoutUser(r.Context()) result, err := c.service.LogoutUser(r.Context())
// If an error occurred, encode the error with the status code // If an error occurred, encode the error with the status code
if err != nil { if err != nil {
@@ -220,7 +220,7 @@ func (c *UserApiController) LogoutUser(w http.ResponseWriter, r *http.Request) {
} }
// UpdateUser - Updated user // UpdateUser - Updated user
func (c *UserApiController) UpdateUser(w http.ResponseWriter, r *http.Request) { func (c *UserAPIController) UpdateUser(w http.ResponseWriter, r *http.Request) {
usernameParam := chi.URLParam(r, "username") usernameParam := chi.URLParam(r, "username")
userParam := User{} userParam := User{}
d := json.NewDecoder(r.Body) d := json.NewDecoder(r.Body)

View File

@@ -15,19 +15,19 @@ import (
"errors" "errors"
) )
// UserApiService is a service that implements the logic for the UserApiServicer // UserAPIService is a service that implements the logic for the UserAPIServicer
// This service should implement the business logic for every endpoint for the UserApi API. // This service should implement the business logic for every endpoint for the UserAPI API.
// Include any external packages or services that will be required by this service. // Include any external packages or services that will be required by this service.
type UserApiService struct { type UserAPIService struct {
} }
// NewUserApiService creates a default api service // NewUserAPIService creates a default api service
func NewUserApiService() UserApiServicer { func NewUserAPIService() UserAPIServicer {
return &UserApiService{} return &UserAPIService{}
} }
// CreateUser - Create user // CreateUser - Create user
func (s *UserApiService) CreateUser(ctx context.Context, user User) (ImplResponse, error) { func (s *UserAPIService) CreateUser(ctx context.Context, user User) (ImplResponse, error) {
// TODO - update CreateUser with the required logic for this service method. // TODO - update CreateUser with the required logic for this service method.
// Add api_user_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. // Add api_user_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.
@@ -38,7 +38,7 @@ func (s *UserApiService) CreateUser(ctx context.Context, user User) (ImplRespons
} }
// CreateUsersWithArrayInput - Creates list of users with given input array // CreateUsersWithArrayInput - Creates list of users with given input array
func (s *UserApiService) CreateUsersWithArrayInput(ctx context.Context, user []User) (ImplResponse, error) { func (s *UserAPIService) CreateUsersWithArrayInput(ctx context.Context, user []User) (ImplResponse, error) {
// TODO - update CreateUsersWithArrayInput with the required logic for this service method. // TODO - update CreateUsersWithArrayInput with the required logic for this service method.
// Add api_user_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. // Add api_user_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.
@@ -49,7 +49,7 @@ func (s *UserApiService) CreateUsersWithArrayInput(ctx context.Context, user []U
} }
// CreateUsersWithListInput - Creates list of users with given input array // CreateUsersWithListInput - Creates list of users with given input array
func (s *UserApiService) CreateUsersWithListInput(ctx context.Context, user []User) (ImplResponse, error) { func (s *UserAPIService) CreateUsersWithListInput(ctx context.Context, user []User) (ImplResponse, error) {
// TODO - update CreateUsersWithListInput with the required logic for this service method. // TODO - update CreateUsersWithListInput with the required logic for this service method.
// Add api_user_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. // Add api_user_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.
@@ -60,7 +60,7 @@ func (s *UserApiService) CreateUsersWithListInput(ctx context.Context, user []Us
} }
// DeleteUser - Delete user // DeleteUser - Delete user
func (s *UserApiService) DeleteUser(ctx context.Context, username string) (ImplResponse, error) { func (s *UserAPIService) DeleteUser(ctx context.Context, username string) (ImplResponse, error) {
// TODO - update DeleteUser with the required logic for this service method. // TODO - update DeleteUser with the required logic for this service method.
// Add api_user_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. // Add api_user_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.
@@ -74,7 +74,7 @@ func (s *UserApiService) DeleteUser(ctx context.Context, username string) (ImplR
} }
// GetUserByName - Get user by user name // GetUserByName - Get user by user name
func (s *UserApiService) GetUserByName(ctx context.Context, username string) (ImplResponse, error) { func (s *UserAPIService) GetUserByName(ctx context.Context, username string) (ImplResponse, error) {
// TODO - update GetUserByName with the required logic for this service method. // TODO - update GetUserByName with the required logic for this service method.
// Add api_user_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. // Add api_user_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.
@@ -91,7 +91,7 @@ func (s *UserApiService) GetUserByName(ctx context.Context, username string) (Im
} }
// LoginUser - Logs user into the system // LoginUser - Logs user into the system
func (s *UserApiService) LoginUser(ctx context.Context, username string, password string) (ImplResponse, error) { func (s *UserAPIService) LoginUser(ctx context.Context, username string, password string) (ImplResponse, error) {
// TODO - update LoginUser with the required logic for this service method. // TODO - update LoginUser with the required logic for this service method.
// Add api_user_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. // Add api_user_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.
@@ -105,7 +105,7 @@ func (s *UserApiService) LoginUser(ctx context.Context, username string, passwor
} }
// LogoutUser - Logs out current logged in user session // LogoutUser - Logs out current logged in user session
func (s *UserApiService) LogoutUser(ctx context.Context) (ImplResponse, error) { func (s *UserAPIService) LogoutUser(ctx context.Context) (ImplResponse, error) {
// TODO - update LogoutUser with the required logic for this service method. // TODO - update LogoutUser with the required logic for this service method.
// Add api_user_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. // Add api_user_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.
@@ -116,7 +116,7 @@ func (s *UserApiService) LogoutUser(ctx context.Context) (ImplResponse, error) {
} }
// UpdateUser - Updated user // UpdateUser - Updated user
func (s *UserApiService) UpdateUser(ctx context.Context, username string, user User) (ImplResponse, error) { func (s *UserAPIService) UpdateUser(ctx context.Context, username string, user User) (ImplResponse, error) {
// TODO - update UpdateUser with the required logic for this service method. // TODO - update UpdateUser with the required logic for this service method.
// Add api_user_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. // Add api_user_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.

View File

@@ -19,16 +19,16 @@ import (
func main() { func main() {
log.Printf("Server started") log.Printf("Server started")
PetApiService := petstoreserver.NewPetApiService() PetAPIService := petstoreserver.NewPetAPIService()
PetApiController := petstoreserver.NewPetApiController(PetApiService) PetAPIController := petstoreserver.NewPetAPIController(PetAPIService)
StoreApiService := petstoreserver.NewStoreApiService() StoreAPIService := petstoreserver.NewStoreAPIService()
StoreApiController := petstoreserver.NewStoreApiController(StoreApiService) StoreAPIController := petstoreserver.NewStoreAPIController(StoreAPIService)
UserApiService := petstoreserver.NewUserApiService() UserAPIService := petstoreserver.NewUserAPIService()
UserApiController := petstoreserver.NewUserApiController(UserApiService) UserAPIController := petstoreserver.NewUserAPIController(UserAPIService)
router := petstoreserver.NewRouter(PetApiController, StoreApiController, UserApiController) router := petstoreserver.NewRouter(PetAPIController, StoreAPIController, UserAPIController)
log.Fatal(http.ListenAndServe(":8080", router)) log.Fatal(http.ListenAndServe(":8080", router))
} }

View File

@@ -1,62 +0,0 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>org.openapitools</groupId>
<artifactId>GoEchoServer</artifactId>
<packaging>pom</packaging>
<version>1.0-SNAPSHOT</version>
<name>Go Gin Server</name>
<build>
<plugins>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<id>go-get</id>
<phase>integration-test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>go</executable>
<arguments>
<argument>mod</argument>
<argument>download</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>go-test</id>
<phase>integration-test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>go</executable>
<arguments>
<argument>build</argument>
<argument>-o</argument>
<argument>app</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@@ -1,19 +0,0 @@
/*
* OpenAPI Petstore
*
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
* API version: 1.0.0
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/
package petstoreserver
type InlineObject struct {
// Updated name of the pet
Name string `json:"name,omitempty"`
// Updated status of the pet
Status string `json:"status,omitempty"`
}

View File

@@ -1,23 +0,0 @@
/*
* OpenAPI Petstore
*
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
* API version: 1.0.0
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/
package petstoreserver
import (
"os"
)
type InlineObject1 struct {
// Additional data to pass to server
AdditionalMetadata string `json:"additionalMetadata,omitempty"`
// file to upload
File *os.File `json:"file,omitempty"`
}

View File

@@ -1,61 +0,0 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>org.openapitools</groupId>
<artifactId>GoGinServer</artifactId>
<packaging>pom</packaging>
<version>1.0-SNAPSHOT</version>
<name>Go Gin Server</name>
<build>
<plugins>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<id>go-get</id>
<phase>integration-test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>go</executable>
<arguments>
<argument>get</argument>
<argument>github.com/gin-gonic/gin</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>go-test</id>
<phase>integration-test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>go</executable>
<arguments>
<argument>test</argument>
<argument>-v</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@@ -17,10 +17,10 @@ import (
// PetApiRouter defines the required methods for binding the api requests to a responses for the PetApi // PetAPIRouter defines the required methods for binding the api requests to a responses for the PetAPI
// The PetApiRouter implementation should parse necessary information from the http request, // The PetAPIRouter implementation should parse necessary information from the http request,
// pass the data to a PetApiServicer to perform the required actions, then write the service results to the http response. // pass the data to a PetAPIServicer to perform the required actions, then write the service results to the http response.
type PetApiRouter interface { type PetAPIRouter interface {
AddPet(http.ResponseWriter, *http.Request) AddPet(http.ResponseWriter, *http.Request)
DeletePet(http.ResponseWriter, *http.Request) DeletePet(http.ResponseWriter, *http.Request)
FindPetsByStatus(http.ResponseWriter, *http.Request) FindPetsByStatus(http.ResponseWriter, *http.Request)
@@ -31,19 +31,19 @@ type PetApiRouter interface {
UpdatePetWithForm(http.ResponseWriter, *http.Request) UpdatePetWithForm(http.ResponseWriter, *http.Request)
UploadFile(http.ResponseWriter, *http.Request) UploadFile(http.ResponseWriter, *http.Request)
} }
// StoreApiRouter defines the required methods for binding the api requests to a responses for the StoreApi // StoreAPIRouter defines the required methods for binding the api requests to a responses for the StoreAPI
// The StoreApiRouter implementation should parse necessary information from the http request, // The StoreAPIRouter implementation should parse necessary information from the http request,
// pass the data to a StoreApiServicer to perform the required actions, then write the service results to the http response. // pass the data to a StoreAPIServicer to perform the required actions, then write the service results to the http response.
type StoreApiRouter interface { type StoreAPIRouter interface {
DeleteOrder(http.ResponseWriter, *http.Request) DeleteOrder(http.ResponseWriter, *http.Request)
GetInventory(http.ResponseWriter, *http.Request) GetInventory(http.ResponseWriter, *http.Request)
GetOrderById(http.ResponseWriter, *http.Request) GetOrderById(http.ResponseWriter, *http.Request)
PlaceOrder(http.ResponseWriter, *http.Request) PlaceOrder(http.ResponseWriter, *http.Request)
} }
// UserApiRouter defines the required methods for binding the api requests to a responses for the UserApi // UserAPIRouter defines the required methods for binding the api requests to a responses for the UserAPI
// The UserApiRouter implementation should parse necessary information from the http request, // The UserAPIRouter implementation should parse necessary information from the http request,
// pass the data to a UserApiServicer to perform the required actions, then write the service results to the http response. // pass the data to a UserAPIServicer to perform the required actions, then write the service results to the http response.
type UserApiRouter interface { type UserAPIRouter interface {
CreateUser(http.ResponseWriter, *http.Request) CreateUser(http.ResponseWriter, *http.Request)
CreateUsersWithArrayInput(http.ResponseWriter, *http.Request) CreateUsersWithArrayInput(http.ResponseWriter, *http.Request)
CreateUsersWithListInput(http.ResponseWriter, *http.Request) CreateUsersWithListInput(http.ResponseWriter, *http.Request)
@@ -55,11 +55,11 @@ type UserApiRouter interface {
} }
// PetApiServicer defines the api actions for the PetApi service // PetAPIServicer defines the api actions for the PetAPI service
// This interface intended to stay up to date with the openapi yaml used to generate it, // This interface intended to stay up to date with the openapi yaml used to generate it,
// while the service implementation can be ignored with the .openapi-generator-ignore file // while the service implementation can be ignored with the .openapi-generator-ignore file
// and updated with the logic required for the API. // and updated with the logic required for the API.
type PetApiServicer interface { type PetAPIServicer interface {
AddPet(context.Context, Pet) (ImplResponse, error) AddPet(context.Context, Pet) (ImplResponse, error)
DeletePet(context.Context, int64, string) (ImplResponse, error) DeletePet(context.Context, int64, string) (ImplResponse, error)
FindPetsByStatus(context.Context, []string) (ImplResponse, error) FindPetsByStatus(context.Context, []string) (ImplResponse, error)
@@ -72,11 +72,11 @@ type PetApiServicer interface {
} }
// StoreApiServicer defines the api actions for the StoreApi service // StoreAPIServicer defines the api actions for the StoreAPI service
// This interface intended to stay up to date with the openapi yaml used to generate it, // This interface intended to stay up to date with the openapi yaml used to generate it,
// while the service implementation can be ignored with the .openapi-generator-ignore file // while the service implementation can be ignored with the .openapi-generator-ignore file
// and updated with the logic required for the API. // and updated with the logic required for the API.
type StoreApiServicer interface { type StoreAPIServicer interface {
DeleteOrder(context.Context, string) (ImplResponse, error) DeleteOrder(context.Context, string) (ImplResponse, error)
GetInventory(context.Context) (ImplResponse, error) GetInventory(context.Context) (ImplResponse, error)
GetOrderById(context.Context, int64) (ImplResponse, error) GetOrderById(context.Context, int64) (ImplResponse, error)
@@ -84,11 +84,11 @@ type StoreApiServicer interface {
} }
// UserApiServicer defines the api actions for the UserApi service // UserAPIServicer defines the api actions for the UserAPI service
// This interface intended to stay up to date with the openapi yaml used to generate it, // This interface intended to stay up to date with the openapi yaml used to generate it,
// while the service implementation can be ignored with the .openapi-generator-ignore file // while the service implementation can be ignored with the .openapi-generator-ignore file
// and updated with the logic required for the API. // and updated with the logic required for the API.
type UserApiServicer interface { type UserAPIServicer interface {
CreateUser(context.Context, User) (ImplResponse, error) CreateUser(context.Context, User) (ImplResponse, error)
CreateUsersWithArrayInput(context.Context, []User) (ImplResponse, error) CreateUsersWithArrayInput(context.Context, []User) (ImplResponse, error)
CreateUsersWithListInput(context.Context, []User) (ImplResponse, error) CreateUsersWithListInput(context.Context, []User) (ImplResponse, error)

View File

@@ -17,25 +17,25 @@ import (
"github.com/go-chi/chi/v5" "github.com/go-chi/chi/v5"
) )
// PetApiController binds http requests to an api service and writes the service results to the http response // PetAPIController binds http requests to an api service and writes the service results to the http response
type PetApiController struct { type PetAPIController struct {
service PetApiServicer service PetAPIServicer
errorHandler ErrorHandler errorHandler ErrorHandler
} }
// PetApiOption for how the controller is set up. // PetAPIOption for how the controller is set up.
type PetApiOption func(*PetApiController) type PetAPIOption func(*PetAPIController)
// WithPetApiErrorHandler inject ErrorHandler into controller // WithPetAPIErrorHandler inject ErrorHandler into controller
func WithPetApiErrorHandler(h ErrorHandler) PetApiOption { func WithPetAPIErrorHandler(h ErrorHandler) PetAPIOption {
return func(c *PetApiController) { return func(c *PetAPIController) {
c.errorHandler = h c.errorHandler = h
} }
} }
// NewPetApiController creates a default api controller // NewPetAPIController creates a default api controller
func NewPetApiController(s PetApiServicer, opts ...PetApiOption) Router { func NewPetAPIController(s PetAPIServicer, opts ...PetAPIOption) Router {
controller := &PetApiController{ controller := &PetAPIController{
service: s, service: s,
errorHandler: DefaultErrorHandler, errorHandler: DefaultErrorHandler,
} }
@@ -47,8 +47,8 @@ func NewPetApiController(s PetApiServicer, opts ...PetApiOption) Router {
return controller return controller
} }
// Routes returns all the api routes for the PetApiController // Routes returns all the api routes for the PetAPIController
func (c *PetApiController) Routes() Routes { func (c *PetAPIController) Routes() Routes {
return Routes{ return Routes{
"AddPet": Route{ "AddPet": Route{
strings.ToUpper("Post"), strings.ToUpper("Post"),
@@ -94,7 +94,7 @@ func (c *PetApiController) Routes() Routes {
} }
// AddPet - Add a new pet to the store // AddPet - Add a new pet to the store
func (c *PetApiController) AddPet(w http.ResponseWriter, r *http.Request) { func (c *PetAPIController) AddPet(w http.ResponseWriter, r *http.Request) {
petParam := Pet{} petParam := Pet{}
d := json.NewDecoder(r.Body) d := json.NewDecoder(r.Body)
d.DisallowUnknownFields() d.DisallowUnknownFields()
@@ -117,7 +117,7 @@ func (c *PetApiController) AddPet(w http.ResponseWriter, r *http.Request) {
} }
// DeletePet - Deletes a pet // DeletePet - Deletes a pet
func (c *PetApiController) DeletePet(w http.ResponseWriter, r *http.Request) { func (c *PetAPIController) DeletePet(w http.ResponseWriter, r *http.Request) {
petIdParam, err := parseInt64Parameter(chi.URLParam(r, "petId"), true) petIdParam, err := parseInt64Parameter(chi.URLParam(r, "petId"), true)
if err != nil { if err != nil {
c.errorHandler(w, r, &ParsingError{Err: err}, nil) c.errorHandler(w, r, &ParsingError{Err: err}, nil)
@@ -135,7 +135,7 @@ func (c *PetApiController) DeletePet(w http.ResponseWriter, r *http.Request) {
} }
// FindPetsByStatus - Finds Pets by status // FindPetsByStatus - Finds Pets by status
func (c *PetApiController) FindPetsByStatus(w http.ResponseWriter, r *http.Request) { func (c *PetAPIController) FindPetsByStatus(w http.ResponseWriter, r *http.Request) {
query := r.URL.Query() query := r.URL.Query()
statusParam := strings.Split(query.Get("status"), ",") statusParam := strings.Split(query.Get("status"), ",")
result, err := c.service.FindPetsByStatus(r.Context(), statusParam) result, err := c.service.FindPetsByStatus(r.Context(), statusParam)
@@ -150,7 +150,7 @@ func (c *PetApiController) FindPetsByStatus(w http.ResponseWriter, r *http.Reque
// FindPetsByTags - Finds Pets by tags // FindPetsByTags - Finds Pets by tags
// Deprecated // Deprecated
func (c *PetApiController) FindPetsByTags(w http.ResponseWriter, r *http.Request) { func (c *PetAPIController) FindPetsByTags(w http.ResponseWriter, r *http.Request) {
query := r.URL.Query() query := r.URL.Query()
tagsParam := strings.Split(query.Get("tags"), ",") tagsParam := strings.Split(query.Get("tags"), ",")
result, err := c.service.FindPetsByTags(r.Context(), tagsParam) result, err := c.service.FindPetsByTags(r.Context(), tagsParam)
@@ -164,7 +164,7 @@ func (c *PetApiController) FindPetsByTags(w http.ResponseWriter, r *http.Request
} }
// GetPetById - Find pet by ID // GetPetById - Find pet by ID
func (c *PetApiController) GetPetById(w http.ResponseWriter, r *http.Request) { func (c *PetAPIController) GetPetById(w http.ResponseWriter, r *http.Request) {
petIdParam, err := parseInt64Parameter(chi.URLParam(r, "petId"), true) petIdParam, err := parseInt64Parameter(chi.URLParam(r, "petId"), true)
if err != nil { if err != nil {
c.errorHandler(w, r, &ParsingError{Err: err}, nil) c.errorHandler(w, r, &ParsingError{Err: err}, nil)
@@ -181,7 +181,7 @@ func (c *PetApiController) GetPetById(w http.ResponseWriter, r *http.Request) {
} }
// UpdatePet - Update an existing pet // UpdatePet - Update an existing pet
func (c *PetApiController) UpdatePet(w http.ResponseWriter, r *http.Request) { func (c *PetAPIController) UpdatePet(w http.ResponseWriter, r *http.Request) {
petParam := Pet{} petParam := Pet{}
d := json.NewDecoder(r.Body) d := json.NewDecoder(r.Body)
d.DisallowUnknownFields() d.DisallowUnknownFields()
@@ -204,7 +204,7 @@ func (c *PetApiController) UpdatePet(w http.ResponseWriter, r *http.Request) {
} }
// UpdatePetWithForm - Updates a pet in the store with form data // UpdatePetWithForm - Updates a pet in the store with form data
func (c *PetApiController) UpdatePetWithForm(w http.ResponseWriter, r *http.Request) { func (c *PetAPIController) UpdatePetWithForm(w http.ResponseWriter, r *http.Request) {
if err := r.ParseForm(); err != nil { if err := r.ParseForm(); err != nil {
c.errorHandler(w, r, &ParsingError{Err: err}, nil) c.errorHandler(w, r, &ParsingError{Err: err}, nil)
return return
@@ -227,7 +227,7 @@ func (c *PetApiController) UpdatePetWithForm(w http.ResponseWriter, r *http.Requ
} }
// UploadFile - uploads an image // UploadFile - uploads an image
func (c *PetApiController) UploadFile(w http.ResponseWriter, r *http.Request) { func (c *PetAPIController) UploadFile(w http.ResponseWriter, r *http.Request) {
if err := r.ParseMultipartForm(32 << 20); err != nil { if err := r.ParseMultipartForm(32 << 20); err != nil {
c.errorHandler(w, r, &ParsingError{Err: err}, nil) c.errorHandler(w, r, &ParsingError{Err: err}, nil)
return return

View File

@@ -16,19 +16,19 @@ import (
"os" "os"
) )
// PetApiService is a service that implements the logic for the PetApiServicer // PetAPIService is a service that implements the logic for the PetAPIServicer
// This service should implement the business logic for every endpoint for the PetApi API. // This service should implement the business logic for every endpoint for the PetAPI API.
// Include any external packages or services that will be required by this service. // Include any external packages or services that will be required by this service.
type PetApiService struct { type PetAPIService struct {
} }
// NewPetApiService creates a default api service // NewPetAPIService creates a default api service
func NewPetApiService() PetApiServicer { func NewPetAPIService() PetAPIServicer {
return &PetApiService{} return &PetAPIService{}
} }
// AddPet - Add a new pet to the store // AddPet - Add a new pet to the store
func (s *PetApiService) AddPet(ctx context.Context, pet Pet) (ImplResponse, error) { func (s *PetAPIService) AddPet(ctx context.Context, pet Pet) (ImplResponse, error) {
// TODO - update AddPet with the required logic for this service method. // TODO - update AddPet with the required logic for this service method.
// Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. // Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.
@@ -42,7 +42,7 @@ func (s *PetApiService) AddPet(ctx context.Context, pet Pet) (ImplResponse, erro
} }
// DeletePet - Deletes a pet // DeletePet - Deletes a pet
func (s *PetApiService) DeletePet(ctx context.Context, petId int64, apiKey string) (ImplResponse, error) { func (s *PetAPIService) DeletePet(ctx context.Context, petId int64, apiKey string) (ImplResponse, error) {
// TODO - update DeletePet with the required logic for this service method. // TODO - update DeletePet with the required logic for this service method.
// Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. // Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.
@@ -53,7 +53,7 @@ func (s *PetApiService) DeletePet(ctx context.Context, petId int64, apiKey strin
} }
// FindPetsByStatus - Finds Pets by status // FindPetsByStatus - Finds Pets by status
func (s *PetApiService) FindPetsByStatus(ctx context.Context, status []string) (ImplResponse, error) { func (s *PetAPIService) FindPetsByStatus(ctx context.Context, status []string) (ImplResponse, error) {
// TODO - update FindPetsByStatus with the required logic for this service method. // TODO - update FindPetsByStatus with the required logic for this service method.
// Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. // Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.
@@ -68,7 +68,7 @@ func (s *PetApiService) FindPetsByStatus(ctx context.Context, status []string) (
// FindPetsByTags - Finds Pets by tags // FindPetsByTags - Finds Pets by tags
// Deprecated // Deprecated
func (s *PetApiService) FindPetsByTags(ctx context.Context, tags []string) (ImplResponse, error) { func (s *PetAPIService) FindPetsByTags(ctx context.Context, tags []string) (ImplResponse, error) {
// TODO - update FindPetsByTags with the required logic for this service method. // TODO - update FindPetsByTags with the required logic for this service method.
// Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. // Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.
@@ -82,7 +82,7 @@ func (s *PetApiService) FindPetsByTags(ctx context.Context, tags []string) (Impl
} }
// GetPetById - Find pet by ID // GetPetById - Find pet by ID
func (s *PetApiService) GetPetById(ctx context.Context, petId int64) (ImplResponse, error) { func (s *PetAPIService) GetPetById(ctx context.Context, petId int64) (ImplResponse, error) {
// TODO - update GetPetById with the required logic for this service method. // TODO - update GetPetById with the required logic for this service method.
// Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. // Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.
@@ -99,7 +99,7 @@ func (s *PetApiService) GetPetById(ctx context.Context, petId int64) (ImplRespon
} }
// UpdatePet - Update an existing pet // UpdatePet - Update an existing pet
func (s *PetApiService) UpdatePet(ctx context.Context, pet Pet) (ImplResponse, error) { func (s *PetAPIService) UpdatePet(ctx context.Context, pet Pet) (ImplResponse, error) {
// TODO - update UpdatePet with the required logic for this service method. // TODO - update UpdatePet with the required logic for this service method.
// Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. // Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.
@@ -119,7 +119,7 @@ func (s *PetApiService) UpdatePet(ctx context.Context, pet Pet) (ImplResponse, e
} }
// UpdatePetWithForm - Updates a pet in the store with form data // UpdatePetWithForm - Updates a pet in the store with form data
func (s *PetApiService) UpdatePetWithForm(ctx context.Context, petId int64, name string, status string) (ImplResponse, error) { func (s *PetAPIService) UpdatePetWithForm(ctx context.Context, petId int64, name string, status string) (ImplResponse, error) {
// TODO - update UpdatePetWithForm with the required logic for this service method. // TODO - update UpdatePetWithForm with the required logic for this service method.
// Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. // Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.
@@ -130,7 +130,7 @@ func (s *PetApiService) UpdatePetWithForm(ctx context.Context, petId int64, name
} }
// UploadFile - uploads an image // UploadFile - uploads an image
func (s *PetApiService) UploadFile(ctx context.Context, petId int64, additionalMetadata string, file *os.File) (ImplResponse, error) { func (s *PetAPIService) UploadFile(ctx context.Context, petId int64, additionalMetadata string, file *os.File) (ImplResponse, error) {
// TODO - update UploadFile with the required logic for this service method. // TODO - update UploadFile with the required logic for this service method.
// Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. // Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.

View File

@@ -17,25 +17,25 @@ import (
"github.com/go-chi/chi/v5" "github.com/go-chi/chi/v5"
) )
// StoreApiController binds http requests to an api service and writes the service results to the http response // StoreAPIController binds http requests to an api service and writes the service results to the http response
type StoreApiController struct { type StoreAPIController struct {
service StoreApiServicer service StoreAPIServicer
errorHandler ErrorHandler errorHandler ErrorHandler
} }
// StoreApiOption for how the controller is set up. // StoreAPIOption for how the controller is set up.
type StoreApiOption func(*StoreApiController) type StoreAPIOption func(*StoreAPIController)
// WithStoreApiErrorHandler inject ErrorHandler into controller // WithStoreAPIErrorHandler inject ErrorHandler into controller
func WithStoreApiErrorHandler(h ErrorHandler) StoreApiOption { func WithStoreAPIErrorHandler(h ErrorHandler) StoreAPIOption {
return func(c *StoreApiController) { return func(c *StoreAPIController) {
c.errorHandler = h c.errorHandler = h
} }
} }
// NewStoreApiController creates a default api controller // NewStoreAPIController creates a default api controller
func NewStoreApiController(s StoreApiServicer, opts ...StoreApiOption) Router { func NewStoreAPIController(s StoreAPIServicer, opts ...StoreAPIOption) Router {
controller := &StoreApiController{ controller := &StoreAPIController{
service: s, service: s,
errorHandler: DefaultErrorHandler, errorHandler: DefaultErrorHandler,
} }
@@ -47,8 +47,8 @@ func NewStoreApiController(s StoreApiServicer, opts ...StoreApiOption) Router {
return controller return controller
} }
// Routes returns all the api routes for the StoreApiController // Routes returns all the api routes for the StoreAPIController
func (c *StoreApiController) Routes() Routes { func (c *StoreAPIController) Routes() Routes {
return Routes{ return Routes{
"DeleteOrder": Route{ "DeleteOrder": Route{
strings.ToUpper("Delete"), strings.ToUpper("Delete"),
@@ -74,7 +74,7 @@ func (c *StoreApiController) Routes() Routes {
} }
// DeleteOrder - Delete purchase order by ID // DeleteOrder - Delete purchase order by ID
func (c *StoreApiController) DeleteOrder(w http.ResponseWriter, r *http.Request) { func (c *StoreAPIController) DeleteOrder(w http.ResponseWriter, r *http.Request) {
orderIdParam := chi.URLParam(r, "orderId") orderIdParam := chi.URLParam(r, "orderId")
result, err := c.service.DeleteOrder(r.Context(), orderIdParam) result, err := c.service.DeleteOrder(r.Context(), orderIdParam)
// If an error occurred, encode the error with the status code // If an error occurred, encode the error with the status code
@@ -87,7 +87,7 @@ func (c *StoreApiController) DeleteOrder(w http.ResponseWriter, r *http.Request)
} }
// GetInventory - Returns pet inventories by status // GetInventory - Returns pet inventories by status
func (c *StoreApiController) GetInventory(w http.ResponseWriter, r *http.Request) { func (c *StoreAPIController) GetInventory(w http.ResponseWriter, r *http.Request) {
result, err := c.service.GetInventory(r.Context()) result, err := c.service.GetInventory(r.Context())
// If an error occurred, encode the error with the status code // If an error occurred, encode the error with the status code
if err != nil { if err != nil {
@@ -99,7 +99,7 @@ func (c *StoreApiController) GetInventory(w http.ResponseWriter, r *http.Request
} }
// GetOrderById - Find purchase order by ID // GetOrderById - Find purchase order by ID
func (c *StoreApiController) GetOrderById(w http.ResponseWriter, r *http.Request) { func (c *StoreAPIController) GetOrderById(w http.ResponseWriter, r *http.Request) {
orderIdParam, err := parseInt64Parameter(chi.URLParam(r, "orderId"), true) orderIdParam, err := parseInt64Parameter(chi.URLParam(r, "orderId"), true)
if err != nil { if err != nil {
c.errorHandler(w, r, &ParsingError{Err: err}, nil) c.errorHandler(w, r, &ParsingError{Err: err}, nil)
@@ -116,7 +116,7 @@ func (c *StoreApiController) GetOrderById(w http.ResponseWriter, r *http.Request
} }
// PlaceOrder - Place an order for a pet // PlaceOrder - Place an order for a pet
func (c *StoreApiController) PlaceOrder(w http.ResponseWriter, r *http.Request) { func (c *StoreAPIController) PlaceOrder(w http.ResponseWriter, r *http.Request) {
orderParam := Order{} orderParam := Order{}
d := json.NewDecoder(r.Body) d := json.NewDecoder(r.Body)
d.DisallowUnknownFields() d.DisallowUnknownFields()

View File

@@ -15,19 +15,19 @@ import (
"errors" "errors"
) )
// StoreApiService is a service that implements the logic for the StoreApiServicer // StoreAPIService is a service that implements the logic for the StoreAPIServicer
// This service should implement the business logic for every endpoint for the StoreApi API. // This service should implement the business logic for every endpoint for the StoreAPI API.
// Include any external packages or services that will be required by this service. // Include any external packages or services that will be required by this service.
type StoreApiService struct { type StoreAPIService struct {
} }
// NewStoreApiService creates a default api service // NewStoreAPIService creates a default api service
func NewStoreApiService() StoreApiServicer { func NewStoreAPIService() StoreAPIServicer {
return &StoreApiService{} return &StoreAPIService{}
} }
// DeleteOrder - Delete purchase order by ID // DeleteOrder - Delete purchase order by ID
func (s *StoreApiService) DeleteOrder(ctx context.Context, orderId string) (ImplResponse, error) { func (s *StoreAPIService) DeleteOrder(ctx context.Context, orderId string) (ImplResponse, error) {
// TODO - update DeleteOrder with the required logic for this service method. // TODO - update DeleteOrder with the required logic for this service method.
// Add api_store_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. // Add api_store_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.
@@ -41,7 +41,7 @@ func (s *StoreApiService) DeleteOrder(ctx context.Context, orderId string) (Impl
} }
// GetInventory - Returns pet inventories by status // GetInventory - Returns pet inventories by status
func (s *StoreApiService) GetInventory(ctx context.Context) (ImplResponse, error) { func (s *StoreAPIService) GetInventory(ctx context.Context) (ImplResponse, error) {
// TODO - update GetInventory with the required logic for this service method. // TODO - update GetInventory with the required logic for this service method.
// Add api_store_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. // Add api_store_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.
@@ -52,7 +52,7 @@ func (s *StoreApiService) GetInventory(ctx context.Context) (ImplResponse, error
} }
// GetOrderById - Find purchase order by ID // GetOrderById - Find purchase order by ID
func (s *StoreApiService) GetOrderById(ctx context.Context, orderId int64) (ImplResponse, error) { func (s *StoreAPIService) GetOrderById(ctx context.Context, orderId int64) (ImplResponse, error) {
// TODO - update GetOrderById with the required logic for this service method. // TODO - update GetOrderById with the required logic for this service method.
// Add api_store_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. // Add api_store_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.
@@ -69,7 +69,7 @@ func (s *StoreApiService) GetOrderById(ctx context.Context, orderId int64) (Impl
} }
// PlaceOrder - Place an order for a pet // PlaceOrder - Place an order for a pet
func (s *StoreApiService) PlaceOrder(ctx context.Context, order Order) (ImplResponse, error) { func (s *StoreAPIService) PlaceOrder(ctx context.Context, order Order) (ImplResponse, error) {
// TODO - update PlaceOrder with the required logic for this service method. // TODO - update PlaceOrder with the required logic for this service method.
// Add api_store_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. // Add api_store_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.

View File

@@ -17,25 +17,25 @@ import (
"github.com/go-chi/chi/v5" "github.com/go-chi/chi/v5"
) )
// UserApiController binds http requests to an api service and writes the service results to the http response // UserAPIController binds http requests to an api service and writes the service results to the http response
type UserApiController struct { type UserAPIController struct {
service UserApiServicer service UserAPIServicer
errorHandler ErrorHandler errorHandler ErrorHandler
} }
// UserApiOption for how the controller is set up. // UserAPIOption for how the controller is set up.
type UserApiOption func(*UserApiController) type UserAPIOption func(*UserAPIController)
// WithUserApiErrorHandler inject ErrorHandler into controller // WithUserAPIErrorHandler inject ErrorHandler into controller
func WithUserApiErrorHandler(h ErrorHandler) UserApiOption { func WithUserAPIErrorHandler(h ErrorHandler) UserAPIOption {
return func(c *UserApiController) { return func(c *UserAPIController) {
c.errorHandler = h c.errorHandler = h
} }
} }
// NewUserApiController creates a default api controller // NewUserAPIController creates a default api controller
func NewUserApiController(s UserApiServicer, opts ...UserApiOption) Router { func NewUserAPIController(s UserAPIServicer, opts ...UserAPIOption) Router {
controller := &UserApiController{ controller := &UserAPIController{
service: s, service: s,
errorHandler: DefaultErrorHandler, errorHandler: DefaultErrorHandler,
} }
@@ -47,8 +47,8 @@ func NewUserApiController(s UserApiServicer, opts ...UserApiOption) Router {
return controller return controller
} }
// Routes returns all the api routes for the UserApiController // Routes returns all the api routes for the UserAPIController
func (c *UserApiController) Routes() Routes { func (c *UserAPIController) Routes() Routes {
return Routes{ return Routes{
"CreateUser": Route{ "CreateUser": Route{
strings.ToUpper("Post"), strings.ToUpper("Post"),
@@ -94,7 +94,7 @@ func (c *UserApiController) Routes() Routes {
} }
// CreateUser - Create user // CreateUser - Create user
func (c *UserApiController) CreateUser(w http.ResponseWriter, r *http.Request) { func (c *UserAPIController) CreateUser(w http.ResponseWriter, r *http.Request) {
userParam := User{} userParam := User{}
d := json.NewDecoder(r.Body) d := json.NewDecoder(r.Body)
d.DisallowUnknownFields() d.DisallowUnknownFields()
@@ -117,7 +117,7 @@ func (c *UserApiController) CreateUser(w http.ResponseWriter, r *http.Request) {
} }
// CreateUsersWithArrayInput - Creates list of users with given input array // CreateUsersWithArrayInput - Creates list of users with given input array
func (c *UserApiController) CreateUsersWithArrayInput(w http.ResponseWriter, r *http.Request) { func (c *UserAPIController) CreateUsersWithArrayInput(w http.ResponseWriter, r *http.Request) {
userParam := []User{} userParam := []User{}
d := json.NewDecoder(r.Body) d := json.NewDecoder(r.Body)
d.DisallowUnknownFields() d.DisallowUnknownFields()
@@ -142,7 +142,7 @@ func (c *UserApiController) CreateUsersWithArrayInput(w http.ResponseWriter, r *
} }
// CreateUsersWithListInput - Creates list of users with given input array // CreateUsersWithListInput - Creates list of users with given input array
func (c *UserApiController) CreateUsersWithListInput(w http.ResponseWriter, r *http.Request) { func (c *UserAPIController) CreateUsersWithListInput(w http.ResponseWriter, r *http.Request) {
userParam := []User{} userParam := []User{}
d := json.NewDecoder(r.Body) d := json.NewDecoder(r.Body)
d.DisallowUnknownFields() d.DisallowUnknownFields()
@@ -167,7 +167,7 @@ func (c *UserApiController) CreateUsersWithListInput(w http.ResponseWriter, r *h
} }
// DeleteUser - Delete user // DeleteUser - Delete user
func (c *UserApiController) DeleteUser(w http.ResponseWriter, r *http.Request) { func (c *UserAPIController) DeleteUser(w http.ResponseWriter, r *http.Request) {
usernameParam := chi.URLParam(r, "username") usernameParam := chi.URLParam(r, "username")
result, err := c.service.DeleteUser(r.Context(), usernameParam) result, err := c.service.DeleteUser(r.Context(), usernameParam)
// If an error occurred, encode the error with the status code // If an error occurred, encode the error with the status code
@@ -180,7 +180,7 @@ func (c *UserApiController) DeleteUser(w http.ResponseWriter, r *http.Request) {
} }
// GetUserByName - Get user by user name // GetUserByName - Get user by user name
func (c *UserApiController) GetUserByName(w http.ResponseWriter, r *http.Request) { func (c *UserAPIController) GetUserByName(w http.ResponseWriter, r *http.Request) {
usernameParam := chi.URLParam(r, "username") usernameParam := chi.URLParam(r, "username")
result, err := c.service.GetUserByName(r.Context(), usernameParam) result, err := c.service.GetUserByName(r.Context(), usernameParam)
// If an error occurred, encode the error with the status code // If an error occurred, encode the error with the status code
@@ -193,7 +193,7 @@ func (c *UserApiController) GetUserByName(w http.ResponseWriter, r *http.Request
} }
// LoginUser - Logs user into the system // LoginUser - Logs user into the system
func (c *UserApiController) LoginUser(w http.ResponseWriter, r *http.Request) { func (c *UserAPIController) LoginUser(w http.ResponseWriter, r *http.Request) {
query := r.URL.Query() query := r.URL.Query()
usernameParam := query.Get("username") usernameParam := query.Get("username")
passwordParam := query.Get("password") passwordParam := query.Get("password")
@@ -208,7 +208,7 @@ func (c *UserApiController) LoginUser(w http.ResponseWriter, r *http.Request) {
} }
// LogoutUser - Logs out current logged in user session // LogoutUser - Logs out current logged in user session
func (c *UserApiController) LogoutUser(w http.ResponseWriter, r *http.Request) { func (c *UserAPIController) LogoutUser(w http.ResponseWriter, r *http.Request) {
result, err := c.service.LogoutUser(r.Context()) result, err := c.service.LogoutUser(r.Context())
// If an error occurred, encode the error with the status code // If an error occurred, encode the error with the status code
if err != nil { if err != nil {
@@ -220,7 +220,7 @@ func (c *UserApiController) LogoutUser(w http.ResponseWriter, r *http.Request) {
} }
// UpdateUser - Updated user // UpdateUser - Updated user
func (c *UserApiController) UpdateUser(w http.ResponseWriter, r *http.Request) { func (c *UserAPIController) UpdateUser(w http.ResponseWriter, r *http.Request) {
usernameParam := chi.URLParam(r, "username") usernameParam := chi.URLParam(r, "username")
userParam := User{} userParam := User{}
d := json.NewDecoder(r.Body) d := json.NewDecoder(r.Body)

View File

@@ -15,19 +15,19 @@ import (
"errors" "errors"
) )
// UserApiService is a service that implements the logic for the UserApiServicer // UserAPIService is a service that implements the logic for the UserAPIServicer
// This service should implement the business logic for every endpoint for the UserApi API. // This service should implement the business logic for every endpoint for the UserAPI API.
// Include any external packages or services that will be required by this service. // Include any external packages or services that will be required by this service.
type UserApiService struct { type UserAPIService struct {
} }
// NewUserApiService creates a default api service // NewUserAPIService creates a default api service
func NewUserApiService() UserApiServicer { func NewUserAPIService() UserAPIServicer {
return &UserApiService{} return &UserAPIService{}
} }
// CreateUser - Create user // CreateUser - Create user
func (s *UserApiService) CreateUser(ctx context.Context, user User) (ImplResponse, error) { func (s *UserAPIService) CreateUser(ctx context.Context, user User) (ImplResponse, error) {
// TODO - update CreateUser with the required logic for this service method. // TODO - update CreateUser with the required logic for this service method.
// Add api_user_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. // Add api_user_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.
@@ -38,7 +38,7 @@ func (s *UserApiService) CreateUser(ctx context.Context, user User) (ImplRespons
} }
// CreateUsersWithArrayInput - Creates list of users with given input array // CreateUsersWithArrayInput - Creates list of users with given input array
func (s *UserApiService) CreateUsersWithArrayInput(ctx context.Context, user []User) (ImplResponse, error) { func (s *UserAPIService) CreateUsersWithArrayInput(ctx context.Context, user []User) (ImplResponse, error) {
// TODO - update CreateUsersWithArrayInput with the required logic for this service method. // TODO - update CreateUsersWithArrayInput with the required logic for this service method.
// Add api_user_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. // Add api_user_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.
@@ -49,7 +49,7 @@ func (s *UserApiService) CreateUsersWithArrayInput(ctx context.Context, user []U
} }
// CreateUsersWithListInput - Creates list of users with given input array // CreateUsersWithListInput - Creates list of users with given input array
func (s *UserApiService) CreateUsersWithListInput(ctx context.Context, user []User) (ImplResponse, error) { func (s *UserAPIService) CreateUsersWithListInput(ctx context.Context, user []User) (ImplResponse, error) {
// TODO - update CreateUsersWithListInput with the required logic for this service method. // TODO - update CreateUsersWithListInput with the required logic for this service method.
// Add api_user_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. // Add api_user_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.
@@ -60,7 +60,7 @@ func (s *UserApiService) CreateUsersWithListInput(ctx context.Context, user []Us
} }
// DeleteUser - Delete user // DeleteUser - Delete user
func (s *UserApiService) DeleteUser(ctx context.Context, username string) (ImplResponse, error) { func (s *UserAPIService) DeleteUser(ctx context.Context, username string) (ImplResponse, error) {
// TODO - update DeleteUser with the required logic for this service method. // TODO - update DeleteUser with the required logic for this service method.
// Add api_user_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. // Add api_user_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.
@@ -74,7 +74,7 @@ func (s *UserApiService) DeleteUser(ctx context.Context, username string) (ImplR
} }
// GetUserByName - Get user by user name // GetUserByName - Get user by user name
func (s *UserApiService) GetUserByName(ctx context.Context, username string) (ImplResponse, error) { func (s *UserAPIService) GetUserByName(ctx context.Context, username string) (ImplResponse, error) {
// TODO - update GetUserByName with the required logic for this service method. // TODO - update GetUserByName with the required logic for this service method.
// Add api_user_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. // Add api_user_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.
@@ -91,7 +91,7 @@ func (s *UserApiService) GetUserByName(ctx context.Context, username string) (Im
} }
// LoginUser - Logs user into the system // LoginUser - Logs user into the system
func (s *UserApiService) LoginUser(ctx context.Context, username string, password string) (ImplResponse, error) { func (s *UserAPIService) LoginUser(ctx context.Context, username string, password string) (ImplResponse, error) {
// TODO - update LoginUser with the required logic for this service method. // TODO - update LoginUser with the required logic for this service method.
// Add api_user_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. // Add api_user_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.
@@ -105,7 +105,7 @@ func (s *UserApiService) LoginUser(ctx context.Context, username string, passwor
} }
// LogoutUser - Logs out current logged in user session // LogoutUser - Logs out current logged in user session
func (s *UserApiService) LogoutUser(ctx context.Context) (ImplResponse, error) { func (s *UserAPIService) LogoutUser(ctx context.Context) (ImplResponse, error) {
// TODO - update LogoutUser with the required logic for this service method. // TODO - update LogoutUser with the required logic for this service method.
// Add api_user_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. // Add api_user_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.
@@ -116,7 +116,7 @@ func (s *UserApiService) LogoutUser(ctx context.Context) (ImplResponse, error) {
} }
// UpdateUser - Updated user // UpdateUser - Updated user
func (s *UserApiService) UpdateUser(ctx context.Context, username string, user User) (ImplResponse, error) { func (s *UserAPIService) UpdateUser(ctx context.Context, username string, user User) (ImplResponse, error) {
// TODO - update UpdateUser with the required logic for this service method. // TODO - update UpdateUser with the required logic for this service method.
// Add api_user_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. // Add api_user_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.

Some files were not shown because too many files have changed in this diff Show More