diff --git a/bin/configs/go-experimental-go-petstore-oas2.yaml b/bin/configs/go-experimental-go-petstore-oas2.yaml
index 64c6bfbebc3b..5542bedcf332 100644
--- a/bin/configs/go-experimental-go-petstore-oas2.yaml
+++ b/bin/configs/go-experimental-go-petstore-oas2.yaml
@@ -4,3 +4,4 @@ inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-e
templateDir: modules/openapi-generator/src/main/resources/go-experimental
additionalProperties:
packageName: petstore
+ generateInterfaces: true
diff --git a/bin/configs/go-experimental-go-petstore.yaml b/bin/configs/go-experimental-go-petstore.yaml
index 5b81f347ca56..ca3e95e80ec3 100644
--- a/bin/configs/go-experimental-go-petstore.yaml
+++ b/bin/configs/go-experimental-go-petstore.yaml
@@ -6,3 +6,4 @@ additionalProperties:
enumClassPrefix: "true"
packageName: petstore
disallowAdditionalPropertiesIfNotPresent: false
+ generateInterfaces: true
diff --git a/bin/configs/go-petstore-withXml.yaml b/bin/configs/go-petstore-withXml.yaml
index f80df1e76814..618d59e016ba 100644
--- a/bin/configs/go-petstore-withXml.yaml
+++ b/bin/configs/go-petstore-withXml.yaml
@@ -6,3 +6,4 @@ additionalProperties:
packageName: petstore
withXml: "true"
withGoCodegenComment: "true"
+ generateInterfaces: true
diff --git a/docs/generators/go-experimental.md b/docs/generators/go-experimental.md
index e4c738c0e3c7..a2a1b1df2b1f 100644
--- a/docs/generators/go-experimental.md
+++ b/docs/generators/go-experimental.md
@@ -7,6 +7,7 @@ sidebar_label: go-experimental
| ------ | ----------- | ------ | ------- |
|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document. If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|enumClassPrefix|Prefix enum with class name| |false|
+|generateInterfaces|Generate interfaces for api classes| |false|
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true|
|isGoSubmodule|whether the generated Go module is a submodule| |false|
|packageName|Go package name (convention: lowercase).| |openapi|
diff --git a/docs/generators/go.md b/docs/generators/go.md
index 68985fbea688..6a8ad90d7f16 100644
--- a/docs/generators/go.md
+++ b/docs/generators/go.md
@@ -6,6 +6,7 @@ sidebar_label: go
| Option | Description | Values | Default |
| ------ | ----------- | ------ | ------- |
|enumClassPrefix|Prefix enum with class name| |false|
+|generateInterfaces|Generate interfaces for api classes| |false|
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true|
|isGoSubmodule|whether the generated Go module is a submodule| |false|
|packageName|Go package name (convention: lowercase).| |openapi|
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java
index c9cb89877774..c64bfa64f81d 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java
@@ -42,6 +42,7 @@ public abstract class AbstractGoCodegen extends DefaultCodegen implements Codege
protected boolean withXml = false;
protected boolean enumClassPrefix = false;
protected boolean structPrefix = false;
+ protected boolean generateInterfaces = false;
protected String packageName = "openapi";
protected Set numberTypes;
@@ -780,6 +781,10 @@ public void setStructPrefix(boolean structPrefix) {
this.structPrefix = structPrefix;
}
+ public void setGenerateInterfaces(boolean generateInterfaces) {
+ this.generateInterfaces = generateInterfaces;
+ }
+
@Override
public String toDefaultValue(Schema schema) {
if (schema.getDefault() != null) {
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientCodegen.java
index 33dda391ee54..4f2dbf0fbeef 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientCodegen.java
@@ -40,6 +40,7 @@ public class GoClientCodegen extends AbstractGoCodegen {
public static final String WITH_XML = "withXml";
public static final String STRUCT_PREFIX = "structPrefix";
public static final String WITH_AWSV4_SIGNATURE = "withAWSV4Signature";
+ public static final String GENERATE_INTERFACES = "generateInterfaces";
public GoClientCodegen() {
super();
@@ -91,6 +92,7 @@ public GoClientCodegen() {
cliOptions.add(CliOption.newBoolean(CodegenConstants.ENUM_CLASS_PREFIX, CodegenConstants.ENUM_CLASS_PREFIX_DESC));
cliOptions.add(CliOption.newBoolean(STRUCT_PREFIX, "whether to prefix struct with the class name. e.g. DeletePetOpts => PetApiDeletePetOpts"));
cliOptions.add(CliOption.newBoolean(WITH_AWSV4_SIGNATURE, "whether to include AWS v4 signature support"));
+ cliOptions.add(CliOption.newBoolean(GENERATE_INTERFACES, "Generate interfaces for api classes"));
// option to change the order of form/body parameter
cliOptions.add(CliOption.newBoolean(
@@ -164,6 +166,11 @@ public void processOpts() {
setStructPrefix(Boolean.parseBoolean(additionalProperties.get(STRUCT_PREFIX).toString()));
additionalProperties.put(STRUCT_PREFIX, structPrefix);
}
+
+ if (additionalProperties.containsKey(GENERATE_INTERFACES)) {
+ setGenerateInterfaces(Boolean.parseBoolean(additionalProperties.get(GENERATE_INTERFACES).toString()));
+ additionalProperties.put(GENERATE_INTERFACES, generateInterfaces);
+ }
}
/**
diff --git a/modules/openapi-generator/src/main/resources/go-experimental/api.mustache b/modules/openapi-generator/src/main/resources/go-experimental/api.mustache
index d887bddecc5b..e36af63f78fb 100644
--- a/modules/openapi-generator/src/main/resources/go-experimental/api.mustache
+++ b/modules/openapi-generator/src/main/resources/go-experimental/api.mustache
@@ -15,49 +15,77 @@ import (
var (
_ _context.Context
)
+{{#generateInterfaces}}
+
+type {{classname}} interface {
+ {{#operation}}
+
+ /*
+ * {{operationId}}{{#summary}} {{{.}}}{{/summary}}{{^summary}} Method for {{operationId}}{{/summary}}
+ {{#notes}}
+ * {{{unescapedNotes}}}
+ {{/notes}}
+ * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().{{#pathParams}}
+ * @param {{paramName}}{{#description}} {{{.}}}{{/description}}{{/pathParams}}
+ * @return Api{{operationId}}Request
+ */
+ {{{nickname}}}(ctx _context.Context{{#pathParams}}, {{paramName}} {{{dataType}}}{{/pathParams}}) Api{{operationId}}Request
+
+ /*
+ * {{nickname}}Execute executes the request{{#returnType}}
+ * @return {{{.}}}{{/returnType}}
+ */
+ {{nickname}}Execute(r Api{{operationId}}Request) ({{#returnType}}{{{.}}}, {{/returnType}}*_nethttp.Response, error)
+ {{/operation}}
+}
+{{/generateInterfaces}}
// {{classname}}Service {{classname}} service
type {{classname}}Service service
-
{{#operation}}
-type api{{operationId}}Request struct {
- ctx _context.Context
- apiService *{{classname}}Service{{#allParams}}
- {{paramName}} {{^isPathParam}}*{{/isPathParam}}{{{dataType}}}{{/allParams}}
-}
+type Api{{operationId}}Request struct {
+ ctx _context.Context{{#generateInterfaces}}
+ ApiService {{classname}}
+{{/generateInterfaces}}{{^generateInterfaces}}
+ ApiService *{{classname}}Service
+{{/generateInterfaces}}
{{#allParams}}
-{{^isPathParam}}
-func (r api{{operationId}}Request) {{vendorExtensions.x-export-param-name}}({{paramName}} {{{dataType}}}) api{{operationId}}Request {
+ {{paramName}} {{^isPathParam}}*{{/isPathParam}}{{{dataType}}}
+{{/allParams}}
+}
+{{#allParams}}{{^isPathParam}}
+func (r Api{{operationId}}Request) {{vendorExtensions.x-export-param-name}}({{paramName}} {{{dataType}}}) Api{{operationId}}Request {
r.{{paramName}} = &{{paramName}}
return r
+}{{/isPathParam}}{{/allParams}}
+
+func (r Api{{operationId}}Request) Execute() ({{#returnType}}{{{.}}}, {{/returnType}}*_nethttp.Response, error) {
+ return r.ApiService.{{nickname}}Execute(r)
}
-{{/isPathParam}}
-{{/allParams}}
+
/*
-{{operationId}}{{#summary}} {{{.}}}{{/summary}}{{^summary}} Method for {{operationId}}{{/summary}}
+ * {{operationId}}{{#summary}} {{{.}}}{{/summary}}{{^summary}} Method for {{operationId}}{{/summary}}
{{#notes}}
-{{{unescapedNotes}}}
+ * {{{unescapedNotes}}}
{{/notes}}
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().{{#pathParams}}
* @param {{paramName}}{{#description}} {{{.}}}{{/description}}{{/pathParams}}
-@return api{{operationId}}Request
-*/
-func (a *{{{classname}}}Service) {{{nickname}}}(ctx _context.Context{{#pathParams}}, {{paramName}} {{{dataType}}}{{/pathParams}}) api{{operationId}}Request {
- return api{{operationId}}Request{
- apiService: a,
+ * @return Api{{operationId}}Request
+ */
+func (a *{{{classname}}}Service) {{{nickname}}}(ctx _context.Context{{#pathParams}}, {{paramName}} {{{dataType}}}{{/pathParams}}) Api{{operationId}}Request {
+ return Api{{operationId}}Request{
+ ApiService: a,
ctx: ctx,{{#pathParams}}
{{paramName}}: {{paramName}},{{/pathParams}}
}
}
/*
-Execute executes the request
-{{#returnType}}
-@return {{{.}}}
-{{/returnType}}
-*/
-func (r api{{operationId}}Request) Execute() ({{#returnType}}{{{.}}}, {{/returnType}}*_nethttp.Response, error) {
+ * Execute executes the request{{#returnType}}
+ * @return {{{.}}}{{/returnType}}
+ */
+func (a *{{{classname}}}Service) {{nickname}}Execute(r Api{{operationId}}Request) ({{#returnType}}{{{.}}}, {{/returnType}}*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.Method{{httpMethod}}
localVarPostBody interface{}
@@ -69,7 +97,7 @@ func (r api{{operationId}}Request) Execute() ({{#returnType}}{{{.}}}, {{/returnT
{{/returnType}}
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "{{{classname}}}Service.{{{nickname}}}")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "{{{classname}}}Service.{{{nickname}}}")
if err != nil {
return {{#returnType}}localVarReturnValue, {{/returnType}}nil, GenericOpenAPIError{error: err.Error()}
}
@@ -282,12 +310,12 @@ func (r api{{operationId}}Request) Execute() ({{#returnType}}{{{.}}}, {{/returnT
{{/isKeyInCookie}}
{{/isApiKey}}
{{/authMethods}}
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return {{#returnType}}localVarReturnValue, {{/returnType}}nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return {{#returnType}}localVarReturnValue, {{/returnType}}localVarHTTPResponse, err
}
@@ -311,7 +339,7 @@ func (r api{{operationId}}Request) Execute() ({{#returnType}}{{{.}}}, {{/returnT
if localVarHTTPResponse.StatusCode == {{{code}}} {
{{/wildcard}}
var v {{{dataType}}}
- err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr.error = err.Error()
return {{#returnType}}localVarReturnValue, {{/returnType}}localVarHTTPResponse, newErr
@@ -331,7 +359,7 @@ func (r api{{operationId}}Request) Execute() ({{#returnType}}{{{.}}}, {{/returnT
}
{{#returnType}}
- err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
body: localVarBody,
diff --git a/modules/openapi-generator/src/main/resources/go-experimental/client.mustache b/modules/openapi-generator/src/main/resources/go-experimental/client.mustache
index 6fe63dcfdf97..5bd19cdbe59f 100644
--- a/modules/openapi-generator/src/main/resources/go-experimental/client.mustache
+++ b/modules/openapi-generator/src/main/resources/go-experimental/client.mustache
@@ -42,7 +42,12 @@ type APIClient struct {
{{#apis}}
{{#operations}}
+ {{#generateInterfaces}}
+ {{classname}} {{classname}}
+ {{/generateInterfaces}}
+ {{^generateInterfaces}}
{{classname}} *{{classname}}Service
+ {{/generateInterfaces}}
{{/operations}}
{{/apis}}
{{/apiInfo}}
diff --git a/modules/openapi-generator/src/main/resources/go/api.mustache b/modules/openapi-generator/src/main/resources/go/api.mustache
index e5d81ff292a4..95875da699b5 100644
--- a/modules/openapi-generator/src/main/resources/go/api.mustache
+++ b/modules/openapi-generator/src/main/resources/go/api.mustache
@@ -17,6 +17,40 @@ var (
_ _context.Context
)
+{{#generateInterfaces}}
+type {{classname}} interface {
+{{#operation}}
+
+ /*
+ * {{operationId}}{{#summary}} {{{.}}}{{/summary}}{{^summary}} Method for {{operationId}}{{/summary}}
+ *
+ {{#notes}}
+ * {{notes}}
+ *
+ {{/notes}}
+ * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ {{#allParams}}
+ {{#required}}
+ * @param {{paramName}}{{#description}} {{{.}}}{{/description}}
+ {{/required}}
+ {{/allParams}}
+ {{#hasOptionalParams}}
+ * @param optional nil or *{{#structPrefix}}{{&classname}}{{/structPrefix}}{{{nickname}}}Opts - Optional Parameters:
+ {{#allParams}}
+ {{^required}}
+ * @param "{{vendorExtensions.x-export-param-name}}" ({{#isPrimitiveType}}{{^isBinary}}optional.{{vendorExtensions.x-optional-data-type}}{{/isBinary}}{{#isBinary}}optional.Interface of {{dataType}}{{/isBinary}}{{/isPrimitiveType}}{{^isPrimitiveType}}optional.Interface of {{dataType}}{{/isPrimitiveType}}) - {{#description}} {{{.}}}{{/description}}
+ {{/required}}
+ {{/allParams}}
+ {{/hasOptionalParams}}
+ {{#returnType}}
+ * @return {{{returnType}}}
+ {{/returnType}}
+ */
+ {{{nickname}}}(ctx _context.Context{{#hasParams}}, {{/hasParams}}{{#allParams}}{{#required}}{{paramName}} {{{dataType}}}{{#hasMore}}, {{/hasMore}}{{/required}}{{/allParams}}{{#hasOptionalParams}}localVarOptionals *{{#structPrefix}}{{&classname}}{{/structPrefix}}{{{nickname}}}Opts{{/hasOptionalParams}}) ({{#returnType}}{{{returnType}}}, {{/returnType}}*_nethttp.Response, error)
+{{/operation}}
+}
+
+{{/generateInterfaces}}
// {{classname}}Service {{classname}} service
type {{classname}}Service service
{{#operation}}
@@ -43,9 +77,11 @@ type {{#structPrefix}}{{&classname}}{{/structPrefix}}{{{nickname}}}Opts struct {
{{/hasOptionalParams}}
/*
-{{operationId}}{{#summary}} {{{.}}}{{/summary}}{{^summary}} Method for {{operationId}}{{/summary}}
+ * {{operationId}}{{#summary}} {{{.}}}{{/summary}}{{^summary}} Method for {{operationId}}{{/summary}}
+ *
{{#notes}}
-{{notes}}
+ * {{notes}}
+ *
{{/notes}}
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
{{#allParams}}
@@ -62,9 +98,9 @@ type {{#structPrefix}}{{&classname}}{{/structPrefix}}{{{nickname}}}Opts struct {
{{/allParams}}
{{/hasOptionalParams}}
{{#returnType}}
-@return {{{returnType}}}
+ * @return {{{returnType}}}
{{/returnType}}
-*/
+ */
func (a *{{{classname}}}Service) {{{nickname}}}(ctx _context.Context{{#hasParams}}, {{/hasParams}}{{#allParams}}{{#required}}{{paramName}} {{{dataType}}}{{#hasMore}}, {{/hasMore}}{{/required}}{{/allParams}}{{#hasOptionalParams}}localVarOptionals *{{#structPrefix}}{{&classname}}{{/structPrefix}}{{{nickname}}}Opts{{/hasOptionalParams}}) ({{#returnType}}{{{returnType}}}, {{/returnType}}*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.Method{{httpMethod}}
diff --git a/modules/openapi-generator/src/main/resources/go/client.mustache b/modules/openapi-generator/src/main/resources/go/client.mustache
index 8dcefae5f865..a3723b68602c 100644
--- a/modules/openapi-generator/src/main/resources/go/client.mustache
+++ b/modules/openapi-generator/src/main/resources/go/client.mustache
@@ -47,7 +47,12 @@ type APIClient struct {
{{#apis}}
{{#operations}}
+{{#generateInterfaces}}
+ {{classname}} {{classname}}
+{{/generateInterfaces}}
+{{^generateInterfaces}}
{{classname}} *{{classname}}Service
+{{/generateInterfaces}}
{{/operations}}
{{/apis}}
{{/apiInfo}}
diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/go/GoClientOptionsTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/go/GoClientOptionsTest.java
index e6a65d953a9a..386b9f808d96 100644
--- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/go/GoClientOptionsTest.java
+++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/go/GoClientOptionsTest.java
@@ -45,10 +45,11 @@ protected void verifyOptions() {
verify(clientCodegen).setPackageName(GoClientOptionsProvider.PACKAGE_NAME_VALUE);
verify(clientCodegen).setWithGoCodegenComment(GoClientOptionsProvider.WITH_GO_CODEGEN_COMMENT_VALUE);
verify(clientCodegen).setWithXml(GoClientOptionsProvider.WITH_XML_VALUE);
- verify(clientCodegen).setWithXml(GoClientOptionsProvider.ENUM_CLASS_PREFIX_VALUE);
+ verify(clientCodegen).setEnumClassPrefix(GoClientOptionsProvider.ENUM_CLASS_PREFIX_VALUE);
verify(clientCodegen).setPrependFormOrBodyParameters(GoClientOptionsProvider.PREPEND_FORM_OR_BODY_PARAMETERS_VALUE);
verify(clientCodegen).setIsGoSubmodule(GoClientOptionsProvider.IS_GO_SUBMODULE_VALUE);
verify(clientCodegen).setStructPrefix(GoClientOptionsProvider.STRUCT_PREFIX_VALUE);
verify(clientCodegen).setWithAWSV4Signature(GoClientOptionsProvider.WITH_AWSV4_SIGNATURE);
+ verify(clientCodegen).setGenerateInterfaces(GoClientOptionsProvider.GENERATE_INTERFACES_VALUE);
}
}
diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/GoClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/GoClientOptionsProvider.java
index 6345595d8e53..3ac5e44cf9ac 100644
--- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/GoClientOptionsProvider.java
+++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/GoClientOptionsProvider.java
@@ -33,6 +33,7 @@ public class GoClientOptionsProvider implements OptionsProvider {
public static final boolean IS_GO_SUBMODULE_VALUE = true;
public static final boolean STRUCT_PREFIX_VALUE = true;
public static final boolean WITH_AWSV4_SIGNATURE = true;
+ public static final boolean GENERATE_INTERFACES_VALUE = true;
@Override
public String getLanguage() {
@@ -52,6 +53,7 @@ public Map createOptions() {
.put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, "true")
.put(CodegenConstants.IS_GO_SUBMODULE, "true")
.put(CodegenConstants.WITH_AWSV4_SIGNATURE_COMMENT, "true")
+ .put("generateInterfaces", "true")
.put("structPrefix", "true")
.build();
}
diff --git a/samples/client/petstore/go-experimental/go-petstore/api_another_fake.go b/samples/client/petstore/go-experimental/go-petstore/api_another_fake.go
index cbcbcd620d28..4c7310dd505a 100644
--- a/samples/client/petstore/go-experimental/go-petstore/api_another_fake.go
+++ b/samples/client/petstore/go-experimental/go-petstore/api_another_fake.go
@@ -21,37 +21,59 @@ var (
_ _context.Context
)
+type AnotherFakeApi interface {
+
+ /*
+ * Call123TestSpecialTags To test special tags
+ * 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().
+ * @return ApiCall123TestSpecialTagsRequest
+ */
+ Call123TestSpecialTags(ctx _context.Context) ApiCall123TestSpecialTagsRequest
+
+ /*
+ * Call123TestSpecialTagsExecute executes the request
+ * @return Client
+ */
+ Call123TestSpecialTagsExecute(r ApiCall123TestSpecialTagsRequest) (Client, *_nethttp.Response, error)
+}
+
// AnotherFakeApiService AnotherFakeApi service
type AnotherFakeApiService service
-type apiCall123TestSpecialTagsRequest struct {
+type ApiCall123TestSpecialTagsRequest struct {
ctx _context.Context
- apiService *AnotherFakeApiService
+ ApiService AnotherFakeApi
body *Client
}
-func (r apiCall123TestSpecialTagsRequest) Body(body Client) apiCall123TestSpecialTagsRequest {
+func (r ApiCall123TestSpecialTagsRequest) Body(body Client) ApiCall123TestSpecialTagsRequest {
r.body = &body
return r
}
+
+func (r ApiCall123TestSpecialTagsRequest) Execute() (Client, *_nethttp.Response, error) {
+ return r.ApiService.Call123TestSpecialTagsExecute(r)
+}
+
/*
-Call123TestSpecialTags To test special tags
-To test special tags and operation ID starting with number
+ * Call123TestSpecialTags To test special tags
+ * 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().
-@return apiCall123TestSpecialTagsRequest
-*/
-func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx _context.Context) apiCall123TestSpecialTagsRequest {
- return apiCall123TestSpecialTagsRequest{
- apiService: a,
+ * @return ApiCall123TestSpecialTagsRequest
+ */
+func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx _context.Context) ApiCall123TestSpecialTagsRequest {
+ return ApiCall123TestSpecialTagsRequest{
+ ApiService: a,
ctx: ctx,
}
}
/*
-Execute executes the request
-@return Client
-*/
-func (r apiCall123TestSpecialTagsRequest) Execute() (Client, *_nethttp.Response, error) {
+ * Execute executes the request
+ * @return Client
+ */
+func (a *AnotherFakeApiService) Call123TestSpecialTagsExecute(r ApiCall123TestSpecialTagsRequest) (Client, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPatch
localVarPostBody interface{}
@@ -61,7 +83,7 @@ func (r apiCall123TestSpecialTagsRequest) Execute() (Client, *_nethttp.Response,
localVarReturnValue Client
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "AnotherFakeApiService.Call123TestSpecialTags")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AnotherFakeApiService.Call123TestSpecialTags")
if err != nil {
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
}
@@ -94,12 +116,12 @@ func (r apiCall123TestSpecialTagsRequest) Execute() (Client, *_nethttp.Response,
}
// body params
localVarPostBody = r.body
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return localVarReturnValue, nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarReturnValue, localVarHTTPResponse, err
}
@@ -118,7 +140,7 @@ func (r apiCall123TestSpecialTagsRequest) Execute() (Client, *_nethttp.Response,
return localVarReturnValue, localVarHTTPResponse, newErr
}
- err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
body: localVarBody,
diff --git a/samples/client/petstore/go-experimental/go-petstore/api_fake.go b/samples/client/petstore/go-experimental/go-petstore/api_fake.go
index 773eb594fbf6..845d911cacf3 100644
--- a/samples/client/petstore/go-experimental/go-petstore/api_fake.go
+++ b/samples/client/petstore/go-experimental/go-petstore/api_fake.go
@@ -24,36 +24,231 @@ var (
_ _context.Context
)
+type FakeApi interface {
+
+ /*
+ * CreateXmlItem creates an XmlItem
+ * this route creates an XmlItem
+ * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @return ApiCreateXmlItemRequest
+ */
+ CreateXmlItem(ctx _context.Context) ApiCreateXmlItemRequest
+
+ /*
+ * CreateXmlItemExecute executes the request
+ */
+ CreateXmlItemExecute(r ApiCreateXmlItemRequest) (*_nethttp.Response, error)
+
+ /*
+ * FakeOuterBooleanSerialize Method for FakeOuterBooleanSerialize
+ * Test serialization of outer boolean types
+ * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @return ApiFakeOuterBooleanSerializeRequest
+ */
+ FakeOuterBooleanSerialize(ctx _context.Context) ApiFakeOuterBooleanSerializeRequest
+
+ /*
+ * FakeOuterBooleanSerializeExecute executes the request
+ * @return bool
+ */
+ FakeOuterBooleanSerializeExecute(r ApiFakeOuterBooleanSerializeRequest) (bool, *_nethttp.Response, error)
+
+ /*
+ * FakeOuterCompositeSerialize Method for FakeOuterCompositeSerialize
+ * 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().
+ * @return ApiFakeOuterCompositeSerializeRequest
+ */
+ FakeOuterCompositeSerialize(ctx _context.Context) ApiFakeOuterCompositeSerializeRequest
+
+ /*
+ * FakeOuterCompositeSerializeExecute executes the request
+ * @return OuterComposite
+ */
+ FakeOuterCompositeSerializeExecute(r ApiFakeOuterCompositeSerializeRequest) (OuterComposite, *_nethttp.Response, error)
+
+ /*
+ * FakeOuterNumberSerialize Method for FakeOuterNumberSerialize
+ * Test serialization of outer number types
+ * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @return ApiFakeOuterNumberSerializeRequest
+ */
+ FakeOuterNumberSerialize(ctx _context.Context) ApiFakeOuterNumberSerializeRequest
+
+ /*
+ * FakeOuterNumberSerializeExecute executes the request
+ * @return float32
+ */
+ FakeOuterNumberSerializeExecute(r ApiFakeOuterNumberSerializeRequest) (float32, *_nethttp.Response, error)
+
+ /*
+ * FakeOuterStringSerialize Method for FakeOuterStringSerialize
+ * Test serialization of outer string types
+ * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @return ApiFakeOuterStringSerializeRequest
+ */
+ FakeOuterStringSerialize(ctx _context.Context) ApiFakeOuterStringSerializeRequest
+
+ /*
+ * FakeOuterStringSerializeExecute executes the request
+ * @return string
+ */
+ FakeOuterStringSerializeExecute(r ApiFakeOuterStringSerializeRequest) (string, *_nethttp.Response, error)
+
+ /*
+ * TestBodyWithFileSchema Method for TestBodyWithFileSchema
+ * 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().
+ * @return ApiTestBodyWithFileSchemaRequest
+ */
+ TestBodyWithFileSchema(ctx _context.Context) ApiTestBodyWithFileSchemaRequest
+
+ /*
+ * TestBodyWithFileSchemaExecute executes the request
+ */
+ TestBodyWithFileSchemaExecute(r ApiTestBodyWithFileSchemaRequest) (*_nethttp.Response, error)
+
+ /*
+ * TestBodyWithQueryParams Method for TestBodyWithQueryParams
+ * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @return ApiTestBodyWithQueryParamsRequest
+ */
+ TestBodyWithQueryParams(ctx _context.Context) ApiTestBodyWithQueryParamsRequest
+
+ /*
+ * TestBodyWithQueryParamsExecute executes the request
+ */
+ TestBodyWithQueryParamsExecute(r ApiTestBodyWithQueryParamsRequest) (*_nethttp.Response, error)
+
+ /*
+ * TestClientModel To test \"client\" model
+ * To test "client" model
+ * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @return ApiTestClientModelRequest
+ */
+ TestClientModel(ctx _context.Context) ApiTestClientModelRequest
+
+ /*
+ * TestClientModelExecute executes the request
+ * @return Client
+ */
+ TestClientModelExecute(r ApiTestClientModelRequest) (Client, *_nethttp.Response, error)
+
+ /*
+ * TestEndpointParameters Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+ * Fake endpoint for testing various parameters
+ 假端點
+ 偽のエンドポイント
+ 가짜 엔드 포인트
+ * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @return ApiTestEndpointParametersRequest
+ */
+ TestEndpointParameters(ctx _context.Context) ApiTestEndpointParametersRequest
+
+ /*
+ * TestEndpointParametersExecute executes the request
+ */
+ TestEndpointParametersExecute(r ApiTestEndpointParametersRequest) (*_nethttp.Response, error)
+
+ /*
+ * TestEnumParameters To test enum parameters
+ * To test enum parameters
+ * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @return ApiTestEnumParametersRequest
+ */
+ TestEnumParameters(ctx _context.Context) ApiTestEnumParametersRequest
+
+ /*
+ * TestEnumParametersExecute executes the request
+ */
+ TestEnumParametersExecute(r ApiTestEnumParametersRequest) (*_nethttp.Response, error)
+
+ /*
+ * TestGroupParameters Fake endpoint to test group parameters (optional)
+ * 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().
+ * @return ApiTestGroupParametersRequest
+ */
+ TestGroupParameters(ctx _context.Context) ApiTestGroupParametersRequest
+
+ /*
+ * TestGroupParametersExecute executes the request
+ */
+ TestGroupParametersExecute(r ApiTestGroupParametersRequest) (*_nethttp.Response, error)
+
+ /*
+ * TestInlineAdditionalProperties test inline additionalProperties
+ * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @return ApiTestInlineAdditionalPropertiesRequest
+ */
+ TestInlineAdditionalProperties(ctx _context.Context) ApiTestInlineAdditionalPropertiesRequest
+
+ /*
+ * TestInlineAdditionalPropertiesExecute executes the request
+ */
+ TestInlineAdditionalPropertiesExecute(r ApiTestInlineAdditionalPropertiesRequest) (*_nethttp.Response, error)
+
+ /*
+ * 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().
+ * @return ApiTestJsonFormDataRequest
+ */
+ TestJsonFormData(ctx _context.Context) ApiTestJsonFormDataRequest
+
+ /*
+ * TestJsonFormDataExecute executes the request
+ */
+ TestJsonFormDataExecute(r ApiTestJsonFormDataRequest) (*_nethttp.Response, error)
+
+ /*
+ * TestQueryParameterCollectionFormat Method for TestQueryParameterCollectionFormat
+ * 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().
+ * @return ApiTestQueryParameterCollectionFormatRequest
+ */
+ TestQueryParameterCollectionFormat(ctx _context.Context) ApiTestQueryParameterCollectionFormatRequest
+
+ /*
+ * TestQueryParameterCollectionFormatExecute executes the request
+ */
+ TestQueryParameterCollectionFormatExecute(r ApiTestQueryParameterCollectionFormatRequest) (*_nethttp.Response, error)
+}
+
// FakeApiService FakeApi service
type FakeApiService service
-type apiCreateXmlItemRequest struct {
+type ApiCreateXmlItemRequest struct {
ctx _context.Context
- apiService *FakeApiService
+ ApiService FakeApi
xmlItem *XmlItem
}
-func (r apiCreateXmlItemRequest) XmlItem(xmlItem XmlItem) apiCreateXmlItemRequest {
+func (r ApiCreateXmlItemRequest) XmlItem(xmlItem XmlItem) ApiCreateXmlItemRequest {
r.xmlItem = &xmlItem
return r
}
+
+func (r ApiCreateXmlItemRequest) Execute() (*_nethttp.Response, error) {
+ return r.ApiService.CreateXmlItemExecute(r)
+}
+
/*
-CreateXmlItem creates an XmlItem
-this route creates an XmlItem
+ * CreateXmlItem creates an XmlItem
+ * this route creates an XmlItem
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
-@return apiCreateXmlItemRequest
-*/
-func (a *FakeApiService) CreateXmlItem(ctx _context.Context) apiCreateXmlItemRequest {
- return apiCreateXmlItemRequest{
- apiService: a,
+ * @return ApiCreateXmlItemRequest
+ */
+func (a *FakeApiService) CreateXmlItem(ctx _context.Context) ApiCreateXmlItemRequest {
+ return ApiCreateXmlItemRequest{
+ ApiService: a,
ctx: ctx,
}
}
/*
-Execute executes the request
-*/
-func (r apiCreateXmlItemRequest) Execute() (*_nethttp.Response, error) {
+ * Execute executes the request
+ */
+func (a *FakeApiService) CreateXmlItemExecute(r ApiCreateXmlItemRequest) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
localVarPostBody interface{}
@@ -62,7 +257,7 @@ func (r apiCreateXmlItemRequest) Execute() (*_nethttp.Response, error) {
localVarFileBytes []byte
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.CreateXmlItem")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.CreateXmlItem")
if err != nil {
return nil, GenericOpenAPIError{error: err.Error()}
}
@@ -95,12 +290,12 @@ func (r apiCreateXmlItemRequest) Execute() (*_nethttp.Response, error) {
}
// body params
localVarPostBody = r.xmlItem
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarHTTPResponse, err
}
@@ -121,34 +316,40 @@ func (r apiCreateXmlItemRequest) Execute() (*_nethttp.Response, error) {
return localVarHTTPResponse, nil
}
-type apiFakeOuterBooleanSerializeRequest struct {
+
+type ApiFakeOuterBooleanSerializeRequest struct {
ctx _context.Context
- apiService *FakeApiService
+ ApiService FakeApi
body *bool
}
-func (r apiFakeOuterBooleanSerializeRequest) Body(body bool) apiFakeOuterBooleanSerializeRequest {
+func (r ApiFakeOuterBooleanSerializeRequest) Body(body bool) ApiFakeOuterBooleanSerializeRequest {
r.body = &body
return r
}
+
+func (r ApiFakeOuterBooleanSerializeRequest) Execute() (bool, *_nethttp.Response, error) {
+ return r.ApiService.FakeOuterBooleanSerializeExecute(r)
+}
+
/*
-FakeOuterBooleanSerialize Method for FakeOuterBooleanSerialize
-Test serialization of outer boolean types
+ * FakeOuterBooleanSerialize Method for FakeOuterBooleanSerialize
+ * Test serialization of outer boolean types
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
-@return apiFakeOuterBooleanSerializeRequest
-*/
-func (a *FakeApiService) FakeOuterBooleanSerialize(ctx _context.Context) apiFakeOuterBooleanSerializeRequest {
- return apiFakeOuterBooleanSerializeRequest{
- apiService: a,
+ * @return ApiFakeOuterBooleanSerializeRequest
+ */
+func (a *FakeApiService) FakeOuterBooleanSerialize(ctx _context.Context) ApiFakeOuterBooleanSerializeRequest {
+ return ApiFakeOuterBooleanSerializeRequest{
+ ApiService: a,
ctx: ctx,
}
}
/*
-Execute executes the request
-@return bool
-*/
-func (r apiFakeOuterBooleanSerializeRequest) Execute() (bool, *_nethttp.Response, error) {
+ * Execute executes the request
+ * @return bool
+ */
+func (a *FakeApiService) FakeOuterBooleanSerializeExecute(r ApiFakeOuterBooleanSerializeRequest) (bool, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
localVarPostBody interface{}
@@ -158,7 +359,7 @@ func (r apiFakeOuterBooleanSerializeRequest) Execute() (bool, *_nethttp.Response
localVarReturnValue bool
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.FakeOuterBooleanSerialize")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.FakeOuterBooleanSerialize")
if err != nil {
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
}
@@ -188,12 +389,12 @@ func (r apiFakeOuterBooleanSerializeRequest) Execute() (bool, *_nethttp.Response
}
// body params
localVarPostBody = r.body
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return localVarReturnValue, nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarReturnValue, localVarHTTPResponse, err
}
@@ -212,7 +413,7 @@ func (r apiFakeOuterBooleanSerializeRequest) Execute() (bool, *_nethttp.Response
return localVarReturnValue, localVarHTTPResponse, newErr
}
- err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
body: localVarBody,
@@ -223,34 +424,40 @@ func (r apiFakeOuterBooleanSerializeRequest) Execute() (bool, *_nethttp.Response
return localVarReturnValue, localVarHTTPResponse, nil
}
-type apiFakeOuterCompositeSerializeRequest struct {
+
+type ApiFakeOuterCompositeSerializeRequest struct {
ctx _context.Context
- apiService *FakeApiService
+ ApiService FakeApi
body *OuterComposite
}
-func (r apiFakeOuterCompositeSerializeRequest) Body(body OuterComposite) apiFakeOuterCompositeSerializeRequest {
+func (r ApiFakeOuterCompositeSerializeRequest) Body(body OuterComposite) ApiFakeOuterCompositeSerializeRequest {
r.body = &body
return r
}
+
+func (r ApiFakeOuterCompositeSerializeRequest) Execute() (OuterComposite, *_nethttp.Response, error) {
+ return r.ApiService.FakeOuterCompositeSerializeExecute(r)
+}
+
/*
-FakeOuterCompositeSerialize Method for FakeOuterCompositeSerialize
-Test serialization of object with outer number type
+ * FakeOuterCompositeSerialize Method for FakeOuterCompositeSerialize
+ * 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().
-@return apiFakeOuterCompositeSerializeRequest
-*/
-func (a *FakeApiService) FakeOuterCompositeSerialize(ctx _context.Context) apiFakeOuterCompositeSerializeRequest {
- return apiFakeOuterCompositeSerializeRequest{
- apiService: a,
+ * @return ApiFakeOuterCompositeSerializeRequest
+ */
+func (a *FakeApiService) FakeOuterCompositeSerialize(ctx _context.Context) ApiFakeOuterCompositeSerializeRequest {
+ return ApiFakeOuterCompositeSerializeRequest{
+ ApiService: a,
ctx: ctx,
}
}
/*
-Execute executes the request
-@return OuterComposite
-*/
-func (r apiFakeOuterCompositeSerializeRequest) Execute() (OuterComposite, *_nethttp.Response, error) {
+ * Execute executes the request
+ * @return OuterComposite
+ */
+func (a *FakeApiService) FakeOuterCompositeSerializeExecute(r ApiFakeOuterCompositeSerializeRequest) (OuterComposite, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
localVarPostBody interface{}
@@ -260,7 +467,7 @@ func (r apiFakeOuterCompositeSerializeRequest) Execute() (OuterComposite, *_neth
localVarReturnValue OuterComposite
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.FakeOuterCompositeSerialize")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.FakeOuterCompositeSerialize")
if err != nil {
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
}
@@ -290,12 +497,12 @@ func (r apiFakeOuterCompositeSerializeRequest) Execute() (OuterComposite, *_neth
}
// body params
localVarPostBody = r.body
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return localVarReturnValue, nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarReturnValue, localVarHTTPResponse, err
}
@@ -314,7 +521,7 @@ func (r apiFakeOuterCompositeSerializeRequest) Execute() (OuterComposite, *_neth
return localVarReturnValue, localVarHTTPResponse, newErr
}
- err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
body: localVarBody,
@@ -325,34 +532,40 @@ func (r apiFakeOuterCompositeSerializeRequest) Execute() (OuterComposite, *_neth
return localVarReturnValue, localVarHTTPResponse, nil
}
-type apiFakeOuterNumberSerializeRequest struct {
+
+type ApiFakeOuterNumberSerializeRequest struct {
ctx _context.Context
- apiService *FakeApiService
+ ApiService FakeApi
body *float32
}
-func (r apiFakeOuterNumberSerializeRequest) Body(body float32) apiFakeOuterNumberSerializeRequest {
+func (r ApiFakeOuterNumberSerializeRequest) Body(body float32) ApiFakeOuterNumberSerializeRequest {
r.body = &body
return r
}
+
+func (r ApiFakeOuterNumberSerializeRequest) Execute() (float32, *_nethttp.Response, error) {
+ return r.ApiService.FakeOuterNumberSerializeExecute(r)
+}
+
/*
-FakeOuterNumberSerialize Method for FakeOuterNumberSerialize
-Test serialization of outer number types
+ * FakeOuterNumberSerialize Method for FakeOuterNumberSerialize
+ * Test serialization of outer number types
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
-@return apiFakeOuterNumberSerializeRequest
-*/
-func (a *FakeApiService) FakeOuterNumberSerialize(ctx _context.Context) apiFakeOuterNumberSerializeRequest {
- return apiFakeOuterNumberSerializeRequest{
- apiService: a,
+ * @return ApiFakeOuterNumberSerializeRequest
+ */
+func (a *FakeApiService) FakeOuterNumberSerialize(ctx _context.Context) ApiFakeOuterNumberSerializeRequest {
+ return ApiFakeOuterNumberSerializeRequest{
+ ApiService: a,
ctx: ctx,
}
}
/*
-Execute executes the request
-@return float32
-*/
-func (r apiFakeOuterNumberSerializeRequest) Execute() (float32, *_nethttp.Response, error) {
+ * Execute executes the request
+ * @return float32
+ */
+func (a *FakeApiService) FakeOuterNumberSerializeExecute(r ApiFakeOuterNumberSerializeRequest) (float32, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
localVarPostBody interface{}
@@ -362,7 +575,7 @@ func (r apiFakeOuterNumberSerializeRequest) Execute() (float32, *_nethttp.Respon
localVarReturnValue float32
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.FakeOuterNumberSerialize")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.FakeOuterNumberSerialize")
if err != nil {
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
}
@@ -392,12 +605,12 @@ func (r apiFakeOuterNumberSerializeRequest) Execute() (float32, *_nethttp.Respon
}
// body params
localVarPostBody = r.body
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return localVarReturnValue, nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarReturnValue, localVarHTTPResponse, err
}
@@ -416,7 +629,7 @@ func (r apiFakeOuterNumberSerializeRequest) Execute() (float32, *_nethttp.Respon
return localVarReturnValue, localVarHTTPResponse, newErr
}
- err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
body: localVarBody,
@@ -427,34 +640,40 @@ func (r apiFakeOuterNumberSerializeRequest) Execute() (float32, *_nethttp.Respon
return localVarReturnValue, localVarHTTPResponse, nil
}
-type apiFakeOuterStringSerializeRequest struct {
+
+type ApiFakeOuterStringSerializeRequest struct {
ctx _context.Context
- apiService *FakeApiService
+ ApiService FakeApi
body *string
}
-func (r apiFakeOuterStringSerializeRequest) Body(body string) apiFakeOuterStringSerializeRequest {
+func (r ApiFakeOuterStringSerializeRequest) Body(body string) ApiFakeOuterStringSerializeRequest {
r.body = &body
return r
}
+
+func (r ApiFakeOuterStringSerializeRequest) Execute() (string, *_nethttp.Response, error) {
+ return r.ApiService.FakeOuterStringSerializeExecute(r)
+}
+
/*
-FakeOuterStringSerialize Method for FakeOuterStringSerialize
-Test serialization of outer string types
+ * FakeOuterStringSerialize Method for FakeOuterStringSerialize
+ * Test serialization of outer string types
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
-@return apiFakeOuterStringSerializeRequest
-*/
-func (a *FakeApiService) FakeOuterStringSerialize(ctx _context.Context) apiFakeOuterStringSerializeRequest {
- return apiFakeOuterStringSerializeRequest{
- apiService: a,
+ * @return ApiFakeOuterStringSerializeRequest
+ */
+func (a *FakeApiService) FakeOuterStringSerialize(ctx _context.Context) ApiFakeOuterStringSerializeRequest {
+ return ApiFakeOuterStringSerializeRequest{
+ ApiService: a,
ctx: ctx,
}
}
/*
-Execute executes the request
-@return string
-*/
-func (r apiFakeOuterStringSerializeRequest) Execute() (string, *_nethttp.Response, error) {
+ * Execute executes the request
+ * @return string
+ */
+func (a *FakeApiService) FakeOuterStringSerializeExecute(r ApiFakeOuterStringSerializeRequest) (string, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
localVarPostBody interface{}
@@ -464,7 +683,7 @@ func (r apiFakeOuterStringSerializeRequest) Execute() (string, *_nethttp.Respons
localVarReturnValue string
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.FakeOuterStringSerialize")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.FakeOuterStringSerialize")
if err != nil {
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
}
@@ -494,12 +713,12 @@ func (r apiFakeOuterStringSerializeRequest) Execute() (string, *_nethttp.Respons
}
// body params
localVarPostBody = r.body
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return localVarReturnValue, nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarReturnValue, localVarHTTPResponse, err
}
@@ -518,7 +737,7 @@ func (r apiFakeOuterStringSerializeRequest) Execute() (string, *_nethttp.Respons
return localVarReturnValue, localVarHTTPResponse, newErr
}
- err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
body: localVarBody,
@@ -529,33 +748,39 @@ func (r apiFakeOuterStringSerializeRequest) Execute() (string, *_nethttp.Respons
return localVarReturnValue, localVarHTTPResponse, nil
}
-type apiTestBodyWithFileSchemaRequest struct {
+
+type ApiTestBodyWithFileSchemaRequest struct {
ctx _context.Context
- apiService *FakeApiService
+ ApiService FakeApi
body *FileSchemaTestClass
}
-func (r apiTestBodyWithFileSchemaRequest) Body(body FileSchemaTestClass) apiTestBodyWithFileSchemaRequest {
+func (r ApiTestBodyWithFileSchemaRequest) Body(body FileSchemaTestClass) ApiTestBodyWithFileSchemaRequest {
r.body = &body
return r
}
+
+func (r ApiTestBodyWithFileSchemaRequest) Execute() (*_nethttp.Response, error) {
+ return r.ApiService.TestBodyWithFileSchemaExecute(r)
+}
+
/*
-TestBodyWithFileSchema Method for TestBodyWithFileSchema
-For this test, the body for this request much reference a schema named `File`.
+ * TestBodyWithFileSchema Method for TestBodyWithFileSchema
+ * 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().
-@return apiTestBodyWithFileSchemaRequest
-*/
-func (a *FakeApiService) TestBodyWithFileSchema(ctx _context.Context) apiTestBodyWithFileSchemaRequest {
- return apiTestBodyWithFileSchemaRequest{
- apiService: a,
+ * @return ApiTestBodyWithFileSchemaRequest
+ */
+func (a *FakeApiService) TestBodyWithFileSchema(ctx _context.Context) ApiTestBodyWithFileSchemaRequest {
+ return ApiTestBodyWithFileSchemaRequest{
+ ApiService: a,
ctx: ctx,
}
}
/*
-Execute executes the request
-*/
-func (r apiTestBodyWithFileSchemaRequest) Execute() (*_nethttp.Response, error) {
+ * Execute executes the request
+ */
+func (a *FakeApiService) TestBodyWithFileSchemaExecute(r ApiTestBodyWithFileSchemaRequest) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPut
localVarPostBody interface{}
@@ -564,7 +789,7 @@ func (r apiTestBodyWithFileSchemaRequest) Execute() (*_nethttp.Response, error)
localVarFileBytes []byte
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestBodyWithFileSchema")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestBodyWithFileSchema")
if err != nil {
return nil, GenericOpenAPIError{error: err.Error()}
}
@@ -597,12 +822,12 @@ func (r apiTestBodyWithFileSchemaRequest) Execute() (*_nethttp.Response, error)
}
// body params
localVarPostBody = r.body
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarHTTPResponse, err
}
@@ -623,37 +848,43 @@ func (r apiTestBodyWithFileSchemaRequest) Execute() (*_nethttp.Response, error)
return localVarHTTPResponse, nil
}
-type apiTestBodyWithQueryParamsRequest struct {
+
+type ApiTestBodyWithQueryParamsRequest struct {
ctx _context.Context
- apiService *FakeApiService
+ ApiService FakeApi
query *string
body *User
}
-func (r apiTestBodyWithQueryParamsRequest) Query(query string) apiTestBodyWithQueryParamsRequest {
+func (r ApiTestBodyWithQueryParamsRequest) Query(query string) ApiTestBodyWithQueryParamsRequest {
r.query = &query
return r
}
-func (r apiTestBodyWithQueryParamsRequest) Body(body User) apiTestBodyWithQueryParamsRequest {
+func (r ApiTestBodyWithQueryParamsRequest) Body(body User) ApiTestBodyWithQueryParamsRequest {
r.body = &body
return r
}
+
+func (r ApiTestBodyWithQueryParamsRequest) Execute() (*_nethttp.Response, error) {
+ return r.ApiService.TestBodyWithQueryParamsExecute(r)
+}
+
/*
-TestBodyWithQueryParams Method for TestBodyWithQueryParams
+ * TestBodyWithQueryParams Method for TestBodyWithQueryParams
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
-@return apiTestBodyWithQueryParamsRequest
-*/
-func (a *FakeApiService) TestBodyWithQueryParams(ctx _context.Context) apiTestBodyWithQueryParamsRequest {
- return apiTestBodyWithQueryParamsRequest{
- apiService: a,
+ * @return ApiTestBodyWithQueryParamsRequest
+ */
+func (a *FakeApiService) TestBodyWithQueryParams(ctx _context.Context) ApiTestBodyWithQueryParamsRequest {
+ return ApiTestBodyWithQueryParamsRequest{
+ ApiService: a,
ctx: ctx,
}
}
/*
-Execute executes the request
-*/
-func (r apiTestBodyWithQueryParamsRequest) Execute() (*_nethttp.Response, error) {
+ * Execute executes the request
+ */
+func (a *FakeApiService) TestBodyWithQueryParamsExecute(r ApiTestBodyWithQueryParamsRequest) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPut
localVarPostBody interface{}
@@ -662,7 +893,7 @@ func (r apiTestBodyWithQueryParamsRequest) Execute() (*_nethttp.Response, error)
localVarFileBytes []byte
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestBodyWithQueryParams")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestBodyWithQueryParams")
if err != nil {
return nil, GenericOpenAPIError{error: err.Error()}
}
@@ -699,12 +930,12 @@ func (r apiTestBodyWithQueryParamsRequest) Execute() (*_nethttp.Response, error)
}
// body params
localVarPostBody = r.body
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarHTTPResponse, err
}
@@ -725,34 +956,40 @@ func (r apiTestBodyWithQueryParamsRequest) Execute() (*_nethttp.Response, error)
return localVarHTTPResponse, nil
}
-type apiTestClientModelRequest struct {
+
+type ApiTestClientModelRequest struct {
ctx _context.Context
- apiService *FakeApiService
+ ApiService FakeApi
body *Client
}
-func (r apiTestClientModelRequest) Body(body Client) apiTestClientModelRequest {
+func (r ApiTestClientModelRequest) Body(body Client) ApiTestClientModelRequest {
r.body = &body
return r
}
+
+func (r ApiTestClientModelRequest) Execute() (Client, *_nethttp.Response, error) {
+ return r.ApiService.TestClientModelExecute(r)
+}
+
/*
-TestClientModel To test \"client\" model
-To test "client" model
+ * TestClientModel To test \"client\" model
+ * To test "client" model
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
-@return apiTestClientModelRequest
-*/
-func (a *FakeApiService) TestClientModel(ctx _context.Context) apiTestClientModelRequest {
- return apiTestClientModelRequest{
- apiService: a,
+ * @return ApiTestClientModelRequest
+ */
+func (a *FakeApiService) TestClientModel(ctx _context.Context) ApiTestClientModelRequest {
+ return ApiTestClientModelRequest{
+ ApiService: a,
ctx: ctx,
}
}
/*
-Execute executes the request
-@return Client
-*/
-func (r apiTestClientModelRequest) Execute() (Client, *_nethttp.Response, error) {
+ * Execute executes the request
+ * @return Client
+ */
+func (a *FakeApiService) TestClientModelExecute(r ApiTestClientModelRequest) (Client, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPatch
localVarPostBody interface{}
@@ -762,7 +999,7 @@ func (r apiTestClientModelRequest) Execute() (Client, *_nethttp.Response, error)
localVarReturnValue Client
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestClientModel")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestClientModel")
if err != nil {
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
}
@@ -795,12 +1032,12 @@ func (r apiTestClientModelRequest) Execute() (Client, *_nethttp.Response, error)
}
// body params
localVarPostBody = r.body
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return localVarReturnValue, nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarReturnValue, localVarHTTPResponse, err
}
@@ -819,7 +1056,7 @@ func (r apiTestClientModelRequest) Execute() (Client, *_nethttp.Response, error)
return localVarReturnValue, localVarHTTPResponse, newErr
}
- err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
body: localVarBody,
@@ -830,9 +1067,10 @@ func (r apiTestClientModelRequest) Execute() (Client, *_nethttp.Response, error)
return localVarReturnValue, localVarHTTPResponse, nil
}
-type apiTestEndpointParametersRequest struct {
+
+type ApiTestEndpointParametersRequest struct {
ctx _context.Context
- apiService *FakeApiService
+ ApiService FakeApi
number *float32
double *float64
patternWithoutDelimiter *string
@@ -849,82 +1087,87 @@ type apiTestEndpointParametersRequest struct {
callback *string
}
-func (r apiTestEndpointParametersRequest) Number(number float32) apiTestEndpointParametersRequest {
+func (r ApiTestEndpointParametersRequest) Number(number float32) ApiTestEndpointParametersRequest {
r.number = &number
return r
}
-func (r apiTestEndpointParametersRequest) Double(double float64) apiTestEndpointParametersRequest {
+func (r ApiTestEndpointParametersRequest) Double(double float64) ApiTestEndpointParametersRequest {
r.double = &double
return r
}
-func (r apiTestEndpointParametersRequest) PatternWithoutDelimiter(patternWithoutDelimiter string) apiTestEndpointParametersRequest {
+func (r ApiTestEndpointParametersRequest) PatternWithoutDelimiter(patternWithoutDelimiter string) ApiTestEndpointParametersRequest {
r.patternWithoutDelimiter = &patternWithoutDelimiter
return r
}
-func (r apiTestEndpointParametersRequest) Byte_(byte_ string) apiTestEndpointParametersRequest {
+func (r ApiTestEndpointParametersRequest) Byte_(byte_ string) ApiTestEndpointParametersRequest {
r.byte_ = &byte_
return r
}
-func (r apiTestEndpointParametersRequest) Integer(integer int32) apiTestEndpointParametersRequest {
+func (r ApiTestEndpointParametersRequest) Integer(integer int32) ApiTestEndpointParametersRequest {
r.integer = &integer
return r
}
-func (r apiTestEndpointParametersRequest) Int32_(int32_ int32) apiTestEndpointParametersRequest {
+func (r ApiTestEndpointParametersRequest) Int32_(int32_ int32) ApiTestEndpointParametersRequest {
r.int32_ = &int32_
return r
}
-func (r apiTestEndpointParametersRequest) Int64_(int64_ int64) apiTestEndpointParametersRequest {
+func (r ApiTestEndpointParametersRequest) Int64_(int64_ int64) ApiTestEndpointParametersRequest {
r.int64_ = &int64_
return r
}
-func (r apiTestEndpointParametersRequest) Float(float float32) apiTestEndpointParametersRequest {
+func (r ApiTestEndpointParametersRequest) Float(float float32) ApiTestEndpointParametersRequest {
r.float = &float
return r
}
-func (r apiTestEndpointParametersRequest) String_(string_ string) apiTestEndpointParametersRequest {
+func (r ApiTestEndpointParametersRequest) String_(string_ string) ApiTestEndpointParametersRequest {
r.string_ = &string_
return r
}
-func (r apiTestEndpointParametersRequest) Binary(binary *os.File) apiTestEndpointParametersRequest {
+func (r ApiTestEndpointParametersRequest) Binary(binary *os.File) ApiTestEndpointParametersRequest {
r.binary = &binary
return r
}
-func (r apiTestEndpointParametersRequest) Date(date string) apiTestEndpointParametersRequest {
+func (r ApiTestEndpointParametersRequest) Date(date string) ApiTestEndpointParametersRequest {
r.date = &date
return r
}
-func (r apiTestEndpointParametersRequest) DateTime(dateTime time.Time) apiTestEndpointParametersRequest {
+func (r ApiTestEndpointParametersRequest) DateTime(dateTime time.Time) ApiTestEndpointParametersRequest {
r.dateTime = &dateTime
return r
}
-func (r apiTestEndpointParametersRequest) Password(password string) apiTestEndpointParametersRequest {
+func (r ApiTestEndpointParametersRequest) Password(password string) ApiTestEndpointParametersRequest {
r.password = &password
return r
}
-func (r apiTestEndpointParametersRequest) Callback(callback string) apiTestEndpointParametersRequest {
+func (r ApiTestEndpointParametersRequest) Callback(callback string) ApiTestEndpointParametersRequest {
r.callback = &callback
return r
}
+
+func (r ApiTestEndpointParametersRequest) Execute() (*_nethttp.Response, error) {
+ return r.ApiService.TestEndpointParametersExecute(r)
+}
+
/*
-TestEndpointParameters Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
-Fake endpoint for testing various parameters
+ * TestEndpointParameters Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+ * Fake endpoint for testing various parameters
假端點
偽のエンドポイント
가짜 엔드 포인트
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
-@return apiTestEndpointParametersRequest
-*/
-func (a *FakeApiService) TestEndpointParameters(ctx _context.Context) apiTestEndpointParametersRequest {
- return apiTestEndpointParametersRequest{
- apiService: a,
+ * @return ApiTestEndpointParametersRequest
+ */
+func (a *FakeApiService) TestEndpointParameters(ctx _context.Context) ApiTestEndpointParametersRequest {
+ return ApiTestEndpointParametersRequest{
+ ApiService: a,
ctx: ctx,
}
}
/*
-Execute executes the request
-*/
-func (r apiTestEndpointParametersRequest) Execute() (*_nethttp.Response, error) {
+ * Execute executes the request
+ */
+func (a *FakeApiService) TestEndpointParametersExecute(r ApiTestEndpointParametersRequest) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
localVarPostBody interface{}
@@ -933,7 +1176,7 @@ func (r apiTestEndpointParametersRequest) Execute() (*_nethttp.Response, error)
localVarFileBytes []byte
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestEndpointParameters")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestEndpointParameters")
if err != nil {
return nil, GenericOpenAPIError{error: err.Error()}
}
@@ -1027,12 +1270,12 @@ func (r apiTestEndpointParametersRequest) Execute() (*_nethttp.Response, error)
if r.callback != nil {
localVarFormParams.Add("callback", parameterToString(*r.callback, ""))
}
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarHTTPResponse, err
}
@@ -1053,9 +1296,10 @@ func (r apiTestEndpointParametersRequest) Execute() (*_nethttp.Response, error)
return localVarHTTPResponse, nil
}
-type apiTestEnumParametersRequest struct {
+
+type ApiTestEnumParametersRequest struct {
ctx _context.Context
- apiService *FakeApiService
+ ApiService FakeApi
enumHeaderStringArray *[]string
enumHeaderString *string
enumQueryStringArray *[]string
@@ -1066,55 +1310,60 @@ type apiTestEnumParametersRequest struct {
enumFormString *string
}
-func (r apiTestEnumParametersRequest) EnumHeaderStringArray(enumHeaderStringArray []string) apiTestEnumParametersRequest {
+func (r ApiTestEnumParametersRequest) EnumHeaderStringArray(enumHeaderStringArray []string) ApiTestEnumParametersRequest {
r.enumHeaderStringArray = &enumHeaderStringArray
return r
}
-func (r apiTestEnumParametersRequest) EnumHeaderString(enumHeaderString string) apiTestEnumParametersRequest {
+func (r ApiTestEnumParametersRequest) EnumHeaderString(enumHeaderString string) ApiTestEnumParametersRequest {
r.enumHeaderString = &enumHeaderString
return r
}
-func (r apiTestEnumParametersRequest) EnumQueryStringArray(enumQueryStringArray []string) apiTestEnumParametersRequest {
+func (r ApiTestEnumParametersRequest) EnumQueryStringArray(enumQueryStringArray []string) ApiTestEnumParametersRequest {
r.enumQueryStringArray = &enumQueryStringArray
return r
}
-func (r apiTestEnumParametersRequest) EnumQueryString(enumQueryString string) apiTestEnumParametersRequest {
+func (r ApiTestEnumParametersRequest) EnumQueryString(enumQueryString string) ApiTestEnumParametersRequest {
r.enumQueryString = &enumQueryString
return r
}
-func (r apiTestEnumParametersRequest) EnumQueryInteger(enumQueryInteger int32) apiTestEnumParametersRequest {
+func (r ApiTestEnumParametersRequest) EnumQueryInteger(enumQueryInteger int32) ApiTestEnumParametersRequest {
r.enumQueryInteger = &enumQueryInteger
return r
}
-func (r apiTestEnumParametersRequest) EnumQueryDouble(enumQueryDouble float64) apiTestEnumParametersRequest {
+func (r ApiTestEnumParametersRequest) EnumQueryDouble(enumQueryDouble float64) ApiTestEnumParametersRequest {
r.enumQueryDouble = &enumQueryDouble
return r
}
-func (r apiTestEnumParametersRequest) EnumFormStringArray(enumFormStringArray []string) apiTestEnumParametersRequest {
+func (r ApiTestEnumParametersRequest) EnumFormStringArray(enumFormStringArray []string) ApiTestEnumParametersRequest {
r.enumFormStringArray = &enumFormStringArray
return r
}
-func (r apiTestEnumParametersRequest) EnumFormString(enumFormString string) apiTestEnumParametersRequest {
+func (r ApiTestEnumParametersRequest) EnumFormString(enumFormString string) ApiTestEnumParametersRequest {
r.enumFormString = &enumFormString
return r
}
+
+func (r ApiTestEnumParametersRequest) Execute() (*_nethttp.Response, error) {
+ return r.ApiService.TestEnumParametersExecute(r)
+}
+
/*
-TestEnumParameters To test enum parameters
-To test enum parameters
+ * TestEnumParameters To test enum parameters
+ * To test enum parameters
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
-@return apiTestEnumParametersRequest
-*/
-func (a *FakeApiService) TestEnumParameters(ctx _context.Context) apiTestEnumParametersRequest {
- return apiTestEnumParametersRequest{
- apiService: a,
+ * @return ApiTestEnumParametersRequest
+ */
+func (a *FakeApiService) TestEnumParameters(ctx _context.Context) ApiTestEnumParametersRequest {
+ return ApiTestEnumParametersRequest{
+ ApiService: a,
ctx: ctx,
}
}
/*
-Execute executes the request
-*/
-func (r apiTestEnumParametersRequest) Execute() (*_nethttp.Response, error) {
+ * Execute executes the request
+ */
+func (a *FakeApiService) TestEnumParametersExecute(r ApiTestEnumParametersRequest) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarPostBody interface{}
@@ -1123,7 +1372,7 @@ func (r apiTestEnumParametersRequest) Execute() (*_nethttp.Response, error) {
localVarFileBytes []byte
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestEnumParameters")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestEnumParameters")
if err != nil {
return nil, GenericOpenAPIError{error: err.Error()}
}
@@ -1175,12 +1424,12 @@ func (r apiTestEnumParametersRequest) Execute() (*_nethttp.Response, error) {
if r.enumFormString != nil {
localVarFormParams.Add("enum_form_string", parameterToString(*r.enumFormString, ""))
}
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarHTTPResponse, err
}
@@ -1201,9 +1450,10 @@ func (r apiTestEnumParametersRequest) Execute() (*_nethttp.Response, error) {
return localVarHTTPResponse, nil
}
-type apiTestGroupParametersRequest struct {
+
+type ApiTestGroupParametersRequest struct {
ctx _context.Context
- apiService *FakeApiService
+ ApiService FakeApi
requiredStringGroup *int32
requiredBooleanGroup *bool
requiredInt64Group *int64
@@ -1212,47 +1462,52 @@ type apiTestGroupParametersRequest struct {
int64Group *int64
}
-func (r apiTestGroupParametersRequest) RequiredStringGroup(requiredStringGroup int32) apiTestGroupParametersRequest {
+func (r ApiTestGroupParametersRequest) RequiredStringGroup(requiredStringGroup int32) ApiTestGroupParametersRequest {
r.requiredStringGroup = &requiredStringGroup
return r
}
-func (r apiTestGroupParametersRequest) RequiredBooleanGroup(requiredBooleanGroup bool) apiTestGroupParametersRequest {
+func (r ApiTestGroupParametersRequest) RequiredBooleanGroup(requiredBooleanGroup bool) ApiTestGroupParametersRequest {
r.requiredBooleanGroup = &requiredBooleanGroup
return r
}
-func (r apiTestGroupParametersRequest) RequiredInt64Group(requiredInt64Group int64) apiTestGroupParametersRequest {
+func (r ApiTestGroupParametersRequest) RequiredInt64Group(requiredInt64Group int64) ApiTestGroupParametersRequest {
r.requiredInt64Group = &requiredInt64Group
return r
}
-func (r apiTestGroupParametersRequest) StringGroup(stringGroup int32) apiTestGroupParametersRequest {
+func (r ApiTestGroupParametersRequest) StringGroup(stringGroup int32) ApiTestGroupParametersRequest {
r.stringGroup = &stringGroup
return r
}
-func (r apiTestGroupParametersRequest) BooleanGroup(booleanGroup bool) apiTestGroupParametersRequest {
+func (r ApiTestGroupParametersRequest) BooleanGroup(booleanGroup bool) ApiTestGroupParametersRequest {
r.booleanGroup = &booleanGroup
return r
}
-func (r apiTestGroupParametersRequest) Int64Group(int64Group int64) apiTestGroupParametersRequest {
+func (r ApiTestGroupParametersRequest) Int64Group(int64Group int64) ApiTestGroupParametersRequest {
r.int64Group = &int64Group
return r
}
+
+func (r ApiTestGroupParametersRequest) Execute() (*_nethttp.Response, error) {
+ return r.ApiService.TestGroupParametersExecute(r)
+}
+
/*
-TestGroupParameters Fake endpoint to test group parameters (optional)
-Fake endpoint to test group parameters (optional)
+ * TestGroupParameters Fake endpoint to test group parameters (optional)
+ * 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().
-@return apiTestGroupParametersRequest
-*/
-func (a *FakeApiService) TestGroupParameters(ctx _context.Context) apiTestGroupParametersRequest {
- return apiTestGroupParametersRequest{
- apiService: a,
+ * @return ApiTestGroupParametersRequest
+ */
+func (a *FakeApiService) TestGroupParameters(ctx _context.Context) ApiTestGroupParametersRequest {
+ return ApiTestGroupParametersRequest{
+ ApiService: a,
ctx: ctx,
}
}
/*
-Execute executes the request
-*/
-func (r apiTestGroupParametersRequest) Execute() (*_nethttp.Response, error) {
+ * Execute executes the request
+ */
+func (a *FakeApiService) TestGroupParametersExecute(r ApiTestGroupParametersRequest) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodDelete
localVarPostBody interface{}
@@ -1261,7 +1516,7 @@ func (r apiTestGroupParametersRequest) Execute() (*_nethttp.Response, error) {
localVarFileBytes []byte
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestGroupParameters")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestGroupParameters")
if err != nil {
return nil, GenericOpenAPIError{error: err.Error()}
}
@@ -1310,12 +1565,12 @@ func (r apiTestGroupParametersRequest) Execute() (*_nethttp.Response, error) {
if r.booleanGroup != nil {
localVarHeaderParams["boolean_group"] = parameterToString(*r.booleanGroup, "")
}
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarHTTPResponse, err
}
@@ -1336,32 +1591,38 @@ func (r apiTestGroupParametersRequest) Execute() (*_nethttp.Response, error) {
return localVarHTTPResponse, nil
}
-type apiTestInlineAdditionalPropertiesRequest struct {
+
+type ApiTestInlineAdditionalPropertiesRequest struct {
ctx _context.Context
- apiService *FakeApiService
+ ApiService FakeApi
param *map[string]string
}
-func (r apiTestInlineAdditionalPropertiesRequest) Param(param map[string]string) apiTestInlineAdditionalPropertiesRequest {
+func (r ApiTestInlineAdditionalPropertiesRequest) Param(param map[string]string) ApiTestInlineAdditionalPropertiesRequest {
r.param = ¶m
return r
}
+
+func (r ApiTestInlineAdditionalPropertiesRequest) Execute() (*_nethttp.Response, error) {
+ return r.ApiService.TestInlineAdditionalPropertiesExecute(r)
+}
+
/*
-TestInlineAdditionalProperties test inline additionalProperties
+ * TestInlineAdditionalProperties test inline additionalProperties
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
-@return apiTestInlineAdditionalPropertiesRequest
-*/
-func (a *FakeApiService) TestInlineAdditionalProperties(ctx _context.Context) apiTestInlineAdditionalPropertiesRequest {
- return apiTestInlineAdditionalPropertiesRequest{
- apiService: a,
+ * @return ApiTestInlineAdditionalPropertiesRequest
+ */
+func (a *FakeApiService) TestInlineAdditionalProperties(ctx _context.Context) ApiTestInlineAdditionalPropertiesRequest {
+ return ApiTestInlineAdditionalPropertiesRequest{
+ ApiService: a,
ctx: ctx,
}
}
/*
-Execute executes the request
-*/
-func (r apiTestInlineAdditionalPropertiesRequest) Execute() (*_nethttp.Response, error) {
+ * Execute executes the request
+ */
+func (a *FakeApiService) TestInlineAdditionalPropertiesExecute(r ApiTestInlineAdditionalPropertiesRequest) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
localVarPostBody interface{}
@@ -1370,7 +1631,7 @@ func (r apiTestInlineAdditionalPropertiesRequest) Execute() (*_nethttp.Response,
localVarFileBytes []byte
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestInlineAdditionalProperties")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestInlineAdditionalProperties")
if err != nil {
return nil, GenericOpenAPIError{error: err.Error()}
}
@@ -1403,12 +1664,12 @@ func (r apiTestInlineAdditionalPropertiesRequest) Execute() (*_nethttp.Response,
}
// body params
localVarPostBody = r.param
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarHTTPResponse, err
}
@@ -1429,37 +1690,43 @@ func (r apiTestInlineAdditionalPropertiesRequest) Execute() (*_nethttp.Response,
return localVarHTTPResponse, nil
}
-type apiTestJsonFormDataRequest struct {
+
+type ApiTestJsonFormDataRequest struct {
ctx _context.Context
- apiService *FakeApiService
+ ApiService FakeApi
param *string
param2 *string
}
-func (r apiTestJsonFormDataRequest) Param(param string) apiTestJsonFormDataRequest {
+func (r ApiTestJsonFormDataRequest) Param(param string) ApiTestJsonFormDataRequest {
r.param = ¶m
return r
}
-func (r apiTestJsonFormDataRequest) Param2(param2 string) apiTestJsonFormDataRequest {
+func (r ApiTestJsonFormDataRequest) Param2(param2 string) ApiTestJsonFormDataRequest {
r.param2 = ¶m2
return r
}
+
+func (r ApiTestJsonFormDataRequest) Execute() (*_nethttp.Response, error) {
+ return r.ApiService.TestJsonFormDataExecute(r)
+}
+
/*
-TestJsonFormData test json serialization of form data
+ * 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().
-@return apiTestJsonFormDataRequest
-*/
-func (a *FakeApiService) TestJsonFormData(ctx _context.Context) apiTestJsonFormDataRequest {
- return apiTestJsonFormDataRequest{
- apiService: a,
+ * @return ApiTestJsonFormDataRequest
+ */
+func (a *FakeApiService) TestJsonFormData(ctx _context.Context) ApiTestJsonFormDataRequest {
+ return ApiTestJsonFormDataRequest{
+ ApiService: a,
ctx: ctx,
}
}
/*
-Execute executes the request
-*/
-func (r apiTestJsonFormDataRequest) Execute() (*_nethttp.Response, error) {
+ * Execute executes the request
+ */
+func (a *FakeApiService) TestJsonFormDataExecute(r ApiTestJsonFormDataRequest) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarPostBody interface{}
@@ -1468,7 +1735,7 @@ func (r apiTestJsonFormDataRequest) Execute() (*_nethttp.Response, error) {
localVarFileBytes []byte
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestJsonFormData")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestJsonFormData")
if err != nil {
return nil, GenericOpenAPIError{error: err.Error()}
}
@@ -1504,12 +1771,12 @@ func (r apiTestJsonFormDataRequest) Execute() (*_nethttp.Response, error) {
}
localVarFormParams.Add("param", parameterToString(*r.param, ""))
localVarFormParams.Add("param2", parameterToString(*r.param2, ""))
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarHTTPResponse, err
}
@@ -1530,9 +1797,10 @@ func (r apiTestJsonFormDataRequest) Execute() (*_nethttp.Response, error) {
return localVarHTTPResponse, nil
}
-type apiTestQueryParameterCollectionFormatRequest struct {
+
+type ApiTestQueryParameterCollectionFormatRequest struct {
ctx _context.Context
- apiService *FakeApiService
+ ApiService FakeApi
pipe *[]string
ioutil *[]string
http *[]string
@@ -1540,43 +1808,48 @@ type apiTestQueryParameterCollectionFormatRequest struct {
context *[]string
}
-func (r apiTestQueryParameterCollectionFormatRequest) Pipe(pipe []string) apiTestQueryParameterCollectionFormatRequest {
+func (r ApiTestQueryParameterCollectionFormatRequest) Pipe(pipe []string) ApiTestQueryParameterCollectionFormatRequest {
r.pipe = &pipe
return r
}
-func (r apiTestQueryParameterCollectionFormatRequest) Ioutil(ioutil []string) apiTestQueryParameterCollectionFormatRequest {
+func (r ApiTestQueryParameterCollectionFormatRequest) Ioutil(ioutil []string) ApiTestQueryParameterCollectionFormatRequest {
r.ioutil = &ioutil
return r
}
-func (r apiTestQueryParameterCollectionFormatRequest) Http(http []string) apiTestQueryParameterCollectionFormatRequest {
+func (r ApiTestQueryParameterCollectionFormatRequest) Http(http []string) ApiTestQueryParameterCollectionFormatRequest {
r.http = &http
return r
}
-func (r apiTestQueryParameterCollectionFormatRequest) Url(url []string) apiTestQueryParameterCollectionFormatRequest {
+func (r ApiTestQueryParameterCollectionFormatRequest) Url(url []string) ApiTestQueryParameterCollectionFormatRequest {
r.url = &url
return r
}
-func (r apiTestQueryParameterCollectionFormatRequest) Context(context []string) apiTestQueryParameterCollectionFormatRequest {
+func (r ApiTestQueryParameterCollectionFormatRequest) Context(context []string) ApiTestQueryParameterCollectionFormatRequest {
r.context = &context
return r
}
+
+func (r ApiTestQueryParameterCollectionFormatRequest) Execute() (*_nethttp.Response, error) {
+ return r.ApiService.TestQueryParameterCollectionFormatExecute(r)
+}
+
/*
-TestQueryParameterCollectionFormat Method for TestQueryParameterCollectionFormat
-To test the collection format in query parameters
+ * TestQueryParameterCollectionFormat Method for TestQueryParameterCollectionFormat
+ * 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().
-@return apiTestQueryParameterCollectionFormatRequest
-*/
-func (a *FakeApiService) TestQueryParameterCollectionFormat(ctx _context.Context) apiTestQueryParameterCollectionFormatRequest {
- return apiTestQueryParameterCollectionFormatRequest{
- apiService: a,
+ * @return ApiTestQueryParameterCollectionFormatRequest
+ */
+func (a *FakeApiService) TestQueryParameterCollectionFormat(ctx _context.Context) ApiTestQueryParameterCollectionFormatRequest {
+ return ApiTestQueryParameterCollectionFormatRequest{
+ ApiService: a,
ctx: ctx,
}
}
/*
-Execute executes the request
-*/
-func (r apiTestQueryParameterCollectionFormatRequest) Execute() (*_nethttp.Response, error) {
+ * Execute executes the request
+ */
+func (a *FakeApiService) TestQueryParameterCollectionFormatExecute(r ApiTestQueryParameterCollectionFormatRequest) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPut
localVarPostBody interface{}
@@ -1585,7 +1858,7 @@ func (r apiTestQueryParameterCollectionFormatRequest) Execute() (*_nethttp.Respo
localVarFileBytes []byte
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestQueryParameterCollectionFormat")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestQueryParameterCollectionFormat")
if err != nil {
return nil, GenericOpenAPIError{error: err.Error()}
}
@@ -1643,12 +1916,12 @@ func (r apiTestQueryParameterCollectionFormatRequest) Execute() (*_nethttp.Respo
if localVarHTTPHeaderAccept != "" {
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
}
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarHTTPResponse, err
}
diff --git a/samples/client/petstore/go-experimental/go-petstore/api_fake_classname_tags123.go b/samples/client/petstore/go-experimental/go-petstore/api_fake_classname_tags123.go
index 85275b451382..ff524d1d4718 100644
--- a/samples/client/petstore/go-experimental/go-petstore/api_fake_classname_tags123.go
+++ b/samples/client/petstore/go-experimental/go-petstore/api_fake_classname_tags123.go
@@ -21,37 +21,59 @@ var (
_ _context.Context
)
+type FakeClassnameTags123Api interface {
+
+ /*
+ * TestClassname To test class name in snake case
+ * 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().
+ * @return ApiTestClassnameRequest
+ */
+ TestClassname(ctx _context.Context) ApiTestClassnameRequest
+
+ /*
+ * TestClassnameExecute executes the request
+ * @return Client
+ */
+ TestClassnameExecute(r ApiTestClassnameRequest) (Client, *_nethttp.Response, error)
+}
+
// FakeClassnameTags123ApiService FakeClassnameTags123Api service
type FakeClassnameTags123ApiService service
-type apiTestClassnameRequest struct {
+type ApiTestClassnameRequest struct {
ctx _context.Context
- apiService *FakeClassnameTags123ApiService
+ ApiService FakeClassnameTags123Api
body *Client
}
-func (r apiTestClassnameRequest) Body(body Client) apiTestClassnameRequest {
+func (r ApiTestClassnameRequest) Body(body Client) ApiTestClassnameRequest {
r.body = &body
return r
}
+
+func (r ApiTestClassnameRequest) Execute() (Client, *_nethttp.Response, error) {
+ return r.ApiService.TestClassnameExecute(r)
+}
+
/*
-TestClassname To test class name in snake case
-To test class name in snake case
+ * TestClassname To test class name in snake case
+ * 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().
-@return apiTestClassnameRequest
-*/
-func (a *FakeClassnameTags123ApiService) TestClassname(ctx _context.Context) apiTestClassnameRequest {
- return apiTestClassnameRequest{
- apiService: a,
+ * @return ApiTestClassnameRequest
+ */
+func (a *FakeClassnameTags123ApiService) TestClassname(ctx _context.Context) ApiTestClassnameRequest {
+ return ApiTestClassnameRequest{
+ ApiService: a,
ctx: ctx,
}
}
/*
-Execute executes the request
-@return Client
-*/
-func (r apiTestClassnameRequest) Execute() (Client, *_nethttp.Response, error) {
+ * Execute executes the request
+ * @return Client
+ */
+func (a *FakeClassnameTags123ApiService) TestClassnameExecute(r ApiTestClassnameRequest) (Client, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPatch
localVarPostBody interface{}
@@ -61,7 +83,7 @@ func (r apiTestClassnameRequest) Execute() (Client, *_nethttp.Response, error) {
localVarReturnValue Client
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "FakeClassnameTags123ApiService.TestClassname")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeClassnameTags123ApiService.TestClassname")
if err != nil {
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
}
@@ -108,12 +130,12 @@ func (r apiTestClassnameRequest) Execute() (Client, *_nethttp.Response, error) {
}
}
}
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return localVarReturnValue, nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarReturnValue, localVarHTTPResponse, err
}
@@ -132,7 +154,7 @@ func (r apiTestClassnameRequest) Execute() (Client, *_nethttp.Response, error) {
return localVarReturnValue, localVarHTTPResponse, newErr
}
- err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
body: localVarBody,
diff --git a/samples/client/petstore/go-experimental/go-petstore/api_pet.go b/samples/client/petstore/go-experimental/go-petstore/api_pet.go
index 65b9d66ad2b5..36cd6b445523 100644
--- a/samples/client/petstore/go-experimental/go-petstore/api_pet.go
+++ b/samples/client/petstore/go-experimental/go-petstore/api_pet.go
@@ -23,35 +23,164 @@ var (
_ _context.Context
)
+type PetApi interface {
+
+ /*
+ * 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().
+ * @return ApiAddPetRequest
+ */
+ AddPet(ctx _context.Context) ApiAddPetRequest
+
+ /*
+ * AddPetExecute executes the request
+ */
+ AddPetExecute(r ApiAddPetRequest) (*_nethttp.Response, error)
+
+ /*
+ * DeletePet Deletes a pet
+ * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param petId Pet id to delete
+ * @return ApiDeletePetRequest
+ */
+ DeletePet(ctx _context.Context, petId int64) ApiDeletePetRequest
+
+ /*
+ * DeletePetExecute executes the request
+ */
+ DeletePetExecute(r ApiDeletePetRequest) (*_nethttp.Response, error)
+
+ /*
+ * FindPetsByStatus Finds Pets by status
+ * 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().
+ * @return ApiFindPetsByStatusRequest
+ */
+ FindPetsByStatus(ctx _context.Context) ApiFindPetsByStatusRequest
+
+ /*
+ * FindPetsByStatusExecute executes the request
+ * @return []Pet
+ */
+ FindPetsByStatusExecute(r ApiFindPetsByStatusRequest) ([]Pet, *_nethttp.Response, error)
+
+ /*
+ * FindPetsByTags Finds Pets by tags
+ * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
+ * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @return ApiFindPetsByTagsRequest
+ */
+ FindPetsByTags(ctx _context.Context) ApiFindPetsByTagsRequest
+
+ /*
+ * FindPetsByTagsExecute executes the request
+ * @return []Pet
+ */
+ FindPetsByTagsExecute(r ApiFindPetsByTagsRequest) ([]Pet, *_nethttp.Response, error)
+
+ /*
+ * GetPetById Find pet by ID
+ * Returns a single pet
+ * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param petId ID of pet to return
+ * @return ApiGetPetByIdRequest
+ */
+ GetPetById(ctx _context.Context, petId int64) ApiGetPetByIdRequest
+
+ /*
+ * GetPetByIdExecute executes the request
+ * @return Pet
+ */
+ GetPetByIdExecute(r ApiGetPetByIdRequest) (Pet, *_nethttp.Response, error)
+
+ /*
+ * UpdatePet Update an existing pet
+ * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @return ApiUpdatePetRequest
+ */
+ UpdatePet(ctx _context.Context) ApiUpdatePetRequest
+
+ /*
+ * UpdatePetExecute executes the request
+ */
+ UpdatePetExecute(r ApiUpdatePetRequest) (*_nethttp.Response, error)
+
+ /*
+ * UpdatePetWithForm Updates a pet in the store with form data
+ * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param petId ID of pet that needs to be updated
+ * @return ApiUpdatePetWithFormRequest
+ */
+ UpdatePetWithForm(ctx _context.Context, petId int64) ApiUpdatePetWithFormRequest
+
+ /*
+ * UpdatePetWithFormExecute executes the request
+ */
+ UpdatePetWithFormExecute(r ApiUpdatePetWithFormRequest) (*_nethttp.Response, error)
+
+ /*
+ * UploadFile uploads an image
+ * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param petId ID of pet to update
+ * @return ApiUploadFileRequest
+ */
+ UploadFile(ctx _context.Context, petId int64) ApiUploadFileRequest
+
+ /*
+ * UploadFileExecute executes the request
+ * @return ApiResponse
+ */
+ UploadFileExecute(r ApiUploadFileRequest) (ApiResponse, *_nethttp.Response, error)
+
+ /*
+ * UploadFileWithRequiredFile uploads an image (required)
+ * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param petId ID of pet to update
+ * @return ApiUploadFileWithRequiredFileRequest
+ */
+ UploadFileWithRequiredFile(ctx _context.Context, petId int64) ApiUploadFileWithRequiredFileRequest
+
+ /*
+ * UploadFileWithRequiredFileExecute executes the request
+ * @return ApiResponse
+ */
+ UploadFileWithRequiredFileExecute(r ApiUploadFileWithRequiredFileRequest) (ApiResponse, *_nethttp.Response, error)
+}
+
// PetApiService PetApi service
type PetApiService service
-type apiAddPetRequest struct {
+type ApiAddPetRequest struct {
ctx _context.Context
- apiService *PetApiService
+ ApiService PetApi
body *Pet
}
-func (r apiAddPetRequest) Body(body Pet) apiAddPetRequest {
+func (r ApiAddPetRequest) Body(body Pet) ApiAddPetRequest {
r.body = &body
return r
}
+
+func (r ApiAddPetRequest) Execute() (*_nethttp.Response, error) {
+ return r.ApiService.AddPetExecute(r)
+}
+
/*
-AddPet Add a new pet to the store
+ * 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().
-@return apiAddPetRequest
-*/
-func (a *PetApiService) AddPet(ctx _context.Context) apiAddPetRequest {
- return apiAddPetRequest{
- apiService: a,
+ * @return ApiAddPetRequest
+ */
+func (a *PetApiService) AddPet(ctx _context.Context) ApiAddPetRequest {
+ return ApiAddPetRequest{
+ ApiService: a,
ctx: ctx,
}
}
/*
-Execute executes the request
-*/
-func (r apiAddPetRequest) Execute() (*_nethttp.Response, error) {
+ * Execute executes the request
+ */
+func (a *PetApiService) AddPetExecute(r ApiAddPetRequest) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
localVarPostBody interface{}
@@ -60,7 +189,7 @@ func (r apiAddPetRequest) Execute() (*_nethttp.Response, error) {
localVarFileBytes []byte
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.AddPet")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.AddPet")
if err != nil {
return nil, GenericOpenAPIError{error: err.Error()}
}
@@ -93,12 +222,12 @@ func (r apiAddPetRequest) Execute() (*_nethttp.Response, error) {
}
// body params
localVarPostBody = r.body
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarHTTPResponse, err
}
@@ -119,35 +248,41 @@ func (r apiAddPetRequest) Execute() (*_nethttp.Response, error) {
return localVarHTTPResponse, nil
}
-type apiDeletePetRequest struct {
+
+type ApiDeletePetRequest struct {
ctx _context.Context
- apiService *PetApiService
+ ApiService PetApi
petId int64
apiKey *string
}
-func (r apiDeletePetRequest) ApiKey(apiKey string) apiDeletePetRequest {
+func (r ApiDeletePetRequest) ApiKey(apiKey string) ApiDeletePetRequest {
r.apiKey = &apiKey
return r
}
+
+func (r ApiDeletePetRequest) Execute() (*_nethttp.Response, error) {
+ return r.ApiService.DeletePetExecute(r)
+}
+
/*
-DeletePet Deletes a pet
+ * DeletePet Deletes a pet
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param petId Pet id to delete
-@return apiDeletePetRequest
-*/
-func (a *PetApiService) DeletePet(ctx _context.Context, petId int64) apiDeletePetRequest {
- return apiDeletePetRequest{
- apiService: a,
+ * @return ApiDeletePetRequest
+ */
+func (a *PetApiService) DeletePet(ctx _context.Context, petId int64) ApiDeletePetRequest {
+ return ApiDeletePetRequest{
+ ApiService: a,
ctx: ctx,
petId: petId,
}
}
/*
-Execute executes the request
-*/
-func (r apiDeletePetRequest) Execute() (*_nethttp.Response, error) {
+ * Execute executes the request
+ */
+func (a *PetApiService) DeletePetExecute(r ApiDeletePetRequest) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodDelete
localVarPostBody interface{}
@@ -156,7 +291,7 @@ func (r apiDeletePetRequest) Execute() (*_nethttp.Response, error) {
localVarFileBytes []byte
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.DeletePet")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.DeletePet")
if err != nil {
return nil, GenericOpenAPIError{error: err.Error()}
}
@@ -188,12 +323,12 @@ func (r apiDeletePetRequest) Execute() (*_nethttp.Response, error) {
if r.apiKey != nil {
localVarHeaderParams["api_key"] = parameterToString(*r.apiKey, "")
}
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarHTTPResponse, err
}
@@ -214,34 +349,40 @@ func (r apiDeletePetRequest) Execute() (*_nethttp.Response, error) {
return localVarHTTPResponse, nil
}
-type apiFindPetsByStatusRequest struct {
+
+type ApiFindPetsByStatusRequest struct {
ctx _context.Context
- apiService *PetApiService
+ ApiService PetApi
status *[]string
}
-func (r apiFindPetsByStatusRequest) Status(status []string) apiFindPetsByStatusRequest {
+func (r ApiFindPetsByStatusRequest) Status(status []string) ApiFindPetsByStatusRequest {
r.status = &status
return r
}
+
+func (r ApiFindPetsByStatusRequest) Execute() ([]Pet, *_nethttp.Response, error) {
+ return r.ApiService.FindPetsByStatusExecute(r)
+}
+
/*
-FindPetsByStatus Finds Pets by status
-Multiple status values can be provided with comma separated strings
+ * FindPetsByStatus Finds Pets by status
+ * 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().
-@return apiFindPetsByStatusRequest
-*/
-func (a *PetApiService) FindPetsByStatus(ctx _context.Context) apiFindPetsByStatusRequest {
- return apiFindPetsByStatusRequest{
- apiService: a,
+ * @return ApiFindPetsByStatusRequest
+ */
+func (a *PetApiService) FindPetsByStatus(ctx _context.Context) ApiFindPetsByStatusRequest {
+ return ApiFindPetsByStatusRequest{
+ ApiService: a,
ctx: ctx,
}
}
/*
-Execute executes the request
-@return []Pet
-*/
-func (r apiFindPetsByStatusRequest) Execute() ([]Pet, *_nethttp.Response, error) {
+ * Execute executes the request
+ * @return []Pet
+ */
+func (a *PetApiService) FindPetsByStatusExecute(r ApiFindPetsByStatusRequest) ([]Pet, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarPostBody interface{}
@@ -251,7 +392,7 @@ func (r apiFindPetsByStatusRequest) Execute() ([]Pet, *_nethttp.Response, error)
localVarReturnValue []Pet
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.FindPetsByStatus")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.FindPetsByStatus")
if err != nil {
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
}
@@ -283,12 +424,12 @@ func (r apiFindPetsByStatusRequest) Execute() ([]Pet, *_nethttp.Response, error)
if localVarHTTPHeaderAccept != "" {
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
}
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return localVarReturnValue, nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarReturnValue, localVarHTTPResponse, err
}
@@ -307,7 +448,7 @@ func (r apiFindPetsByStatusRequest) Execute() ([]Pet, *_nethttp.Response, error)
return localVarReturnValue, localVarHTTPResponse, newErr
}
- err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
body: localVarBody,
@@ -318,34 +459,40 @@ func (r apiFindPetsByStatusRequest) Execute() ([]Pet, *_nethttp.Response, error)
return localVarReturnValue, localVarHTTPResponse, nil
}
-type apiFindPetsByTagsRequest struct {
+
+type ApiFindPetsByTagsRequest struct {
ctx _context.Context
- apiService *PetApiService
+ ApiService PetApi
tags *[]string
}
-func (r apiFindPetsByTagsRequest) Tags(tags []string) apiFindPetsByTagsRequest {
+func (r ApiFindPetsByTagsRequest) Tags(tags []string) ApiFindPetsByTagsRequest {
r.tags = &tags
return r
}
+
+func (r ApiFindPetsByTagsRequest) Execute() ([]Pet, *_nethttp.Response, error) {
+ return r.ApiService.FindPetsByTagsExecute(r)
+}
+
/*
-FindPetsByTags Finds Pets by tags
-Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
+ * FindPetsByTags Finds Pets by tags
+ * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
-@return apiFindPetsByTagsRequest
-*/
-func (a *PetApiService) FindPetsByTags(ctx _context.Context) apiFindPetsByTagsRequest {
- return apiFindPetsByTagsRequest{
- apiService: a,
+ * @return ApiFindPetsByTagsRequest
+ */
+func (a *PetApiService) FindPetsByTags(ctx _context.Context) ApiFindPetsByTagsRequest {
+ return ApiFindPetsByTagsRequest{
+ ApiService: a,
ctx: ctx,
}
}
/*
-Execute executes the request
-@return []Pet
-*/
-func (r apiFindPetsByTagsRequest) Execute() ([]Pet, *_nethttp.Response, error) {
+ * Execute executes the request
+ * @return []Pet
+ */
+func (a *PetApiService) FindPetsByTagsExecute(r ApiFindPetsByTagsRequest) ([]Pet, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarPostBody interface{}
@@ -355,7 +502,7 @@ func (r apiFindPetsByTagsRequest) Execute() ([]Pet, *_nethttp.Response, error) {
localVarReturnValue []Pet
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.FindPetsByTags")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.FindPetsByTags")
if err != nil {
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
}
@@ -387,12 +534,12 @@ func (r apiFindPetsByTagsRequest) Execute() ([]Pet, *_nethttp.Response, error) {
if localVarHTTPHeaderAccept != "" {
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
}
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return localVarReturnValue, nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarReturnValue, localVarHTTPResponse, err
}
@@ -411,7 +558,7 @@ func (r apiFindPetsByTagsRequest) Execute() ([]Pet, *_nethttp.Response, error) {
return localVarReturnValue, localVarHTTPResponse, newErr
}
- err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
body: localVarBody,
@@ -422,32 +569,38 @@ func (r apiFindPetsByTagsRequest) Execute() ([]Pet, *_nethttp.Response, error) {
return localVarReturnValue, localVarHTTPResponse, nil
}
-type apiGetPetByIdRequest struct {
+
+type ApiGetPetByIdRequest struct {
ctx _context.Context
- apiService *PetApiService
+ ApiService PetApi
petId int64
}
+
+func (r ApiGetPetByIdRequest) Execute() (Pet, *_nethttp.Response, error) {
+ return r.ApiService.GetPetByIdExecute(r)
+}
+
/*
-GetPetById Find pet by ID
-Returns a single pet
+ * GetPetById Find pet by ID
+ * Returns a single pet
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param petId ID of pet to return
-@return apiGetPetByIdRequest
-*/
-func (a *PetApiService) GetPetById(ctx _context.Context, petId int64) apiGetPetByIdRequest {
- return apiGetPetByIdRequest{
- apiService: a,
+ * @return ApiGetPetByIdRequest
+ */
+func (a *PetApiService) GetPetById(ctx _context.Context, petId int64) ApiGetPetByIdRequest {
+ return ApiGetPetByIdRequest{
+ ApiService: a,
ctx: ctx,
petId: petId,
}
}
/*
-Execute executes the request
-@return Pet
-*/
-func (r apiGetPetByIdRequest) Execute() (Pet, *_nethttp.Response, error) {
+ * Execute executes the request
+ * @return Pet
+ */
+func (a *PetApiService) GetPetByIdExecute(r ApiGetPetByIdRequest) (Pet, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarPostBody interface{}
@@ -457,7 +610,7 @@ func (r apiGetPetByIdRequest) Execute() (Pet, *_nethttp.Response, error) {
localVarReturnValue Pet
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.GetPetById")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.GetPetById")
if err != nil {
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
}
@@ -500,12 +653,12 @@ func (r apiGetPetByIdRequest) Execute() (Pet, *_nethttp.Response, error) {
}
}
}
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return localVarReturnValue, nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarReturnValue, localVarHTTPResponse, err
}
@@ -524,7 +677,7 @@ func (r apiGetPetByIdRequest) Execute() (Pet, *_nethttp.Response, error) {
return localVarReturnValue, localVarHTTPResponse, newErr
}
- err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
body: localVarBody,
@@ -535,32 +688,38 @@ func (r apiGetPetByIdRequest) Execute() (Pet, *_nethttp.Response, error) {
return localVarReturnValue, localVarHTTPResponse, nil
}
-type apiUpdatePetRequest struct {
+
+type ApiUpdatePetRequest struct {
ctx _context.Context
- apiService *PetApiService
+ ApiService PetApi
body *Pet
}
-func (r apiUpdatePetRequest) Body(body Pet) apiUpdatePetRequest {
+func (r ApiUpdatePetRequest) Body(body Pet) ApiUpdatePetRequest {
r.body = &body
return r
}
+
+func (r ApiUpdatePetRequest) Execute() (*_nethttp.Response, error) {
+ return r.ApiService.UpdatePetExecute(r)
+}
+
/*
-UpdatePet Update an existing pet
+ * UpdatePet Update an existing pet
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
-@return apiUpdatePetRequest
-*/
-func (a *PetApiService) UpdatePet(ctx _context.Context) apiUpdatePetRequest {
- return apiUpdatePetRequest{
- apiService: a,
+ * @return ApiUpdatePetRequest
+ */
+func (a *PetApiService) UpdatePet(ctx _context.Context) ApiUpdatePetRequest {
+ return ApiUpdatePetRequest{
+ ApiService: a,
ctx: ctx,
}
}
/*
-Execute executes the request
-*/
-func (r apiUpdatePetRequest) Execute() (*_nethttp.Response, error) {
+ * Execute executes the request
+ */
+func (a *PetApiService) UpdatePetExecute(r ApiUpdatePetRequest) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPut
localVarPostBody interface{}
@@ -569,7 +728,7 @@ func (r apiUpdatePetRequest) Execute() (*_nethttp.Response, error) {
localVarFileBytes []byte
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.UpdatePet")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.UpdatePet")
if err != nil {
return nil, GenericOpenAPIError{error: err.Error()}
}
@@ -602,12 +761,12 @@ func (r apiUpdatePetRequest) Execute() (*_nethttp.Response, error) {
}
// body params
localVarPostBody = r.body
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarHTTPResponse, err
}
@@ -628,40 +787,46 @@ func (r apiUpdatePetRequest) Execute() (*_nethttp.Response, error) {
return localVarHTTPResponse, nil
}
-type apiUpdatePetWithFormRequest struct {
+
+type ApiUpdatePetWithFormRequest struct {
ctx _context.Context
- apiService *PetApiService
+ ApiService PetApi
petId int64
name *string
status *string
}
-func (r apiUpdatePetWithFormRequest) Name(name string) apiUpdatePetWithFormRequest {
+func (r ApiUpdatePetWithFormRequest) Name(name string) ApiUpdatePetWithFormRequest {
r.name = &name
return r
}
-func (r apiUpdatePetWithFormRequest) Status(status string) apiUpdatePetWithFormRequest {
+func (r ApiUpdatePetWithFormRequest) Status(status string) ApiUpdatePetWithFormRequest {
r.status = &status
return r
}
+
+func (r ApiUpdatePetWithFormRequest) Execute() (*_nethttp.Response, error) {
+ return r.ApiService.UpdatePetWithFormExecute(r)
+}
+
/*
-UpdatePetWithForm Updates a pet in the store with form data
+ * UpdatePetWithForm Updates a pet in the store with form data
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param petId ID of pet that needs to be updated
-@return apiUpdatePetWithFormRequest
-*/
-func (a *PetApiService) UpdatePetWithForm(ctx _context.Context, petId int64) apiUpdatePetWithFormRequest {
- return apiUpdatePetWithFormRequest{
- apiService: a,
+ * @return ApiUpdatePetWithFormRequest
+ */
+func (a *PetApiService) UpdatePetWithForm(ctx _context.Context, petId int64) ApiUpdatePetWithFormRequest {
+ return ApiUpdatePetWithFormRequest{
+ ApiService: a,
ctx: ctx,
petId: petId,
}
}
/*
-Execute executes the request
-*/
-func (r apiUpdatePetWithFormRequest) Execute() (*_nethttp.Response, error) {
+ * Execute executes the request
+ */
+func (a *PetApiService) UpdatePetWithFormExecute(r ApiUpdatePetWithFormRequest) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
localVarPostBody interface{}
@@ -670,7 +835,7 @@ func (r apiUpdatePetWithFormRequest) Execute() (*_nethttp.Response, error) {
localVarFileBytes []byte
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.UpdatePetWithForm")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.UpdatePetWithForm")
if err != nil {
return nil, GenericOpenAPIError{error: err.Error()}
}
@@ -705,12 +870,12 @@ func (r apiUpdatePetWithFormRequest) Execute() (*_nethttp.Response, error) {
if r.status != nil {
localVarFormParams.Add("status", parameterToString(*r.status, ""))
}
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarHTTPResponse, err
}
@@ -731,41 +896,47 @@ func (r apiUpdatePetWithFormRequest) Execute() (*_nethttp.Response, error) {
return localVarHTTPResponse, nil
}
-type apiUploadFileRequest struct {
+
+type ApiUploadFileRequest struct {
ctx _context.Context
- apiService *PetApiService
+ ApiService PetApi
petId int64
additionalMetadata *string
file **os.File
}
-func (r apiUploadFileRequest) AdditionalMetadata(additionalMetadata string) apiUploadFileRequest {
+func (r ApiUploadFileRequest) AdditionalMetadata(additionalMetadata string) ApiUploadFileRequest {
r.additionalMetadata = &additionalMetadata
return r
}
-func (r apiUploadFileRequest) File(file *os.File) apiUploadFileRequest {
+func (r ApiUploadFileRequest) File(file *os.File) ApiUploadFileRequest {
r.file = &file
return r
}
+
+func (r ApiUploadFileRequest) Execute() (ApiResponse, *_nethttp.Response, error) {
+ return r.ApiService.UploadFileExecute(r)
+}
+
/*
-UploadFile uploads an image
+ * UploadFile uploads an image
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param petId ID of pet to update
-@return apiUploadFileRequest
-*/
-func (a *PetApiService) UploadFile(ctx _context.Context, petId int64) apiUploadFileRequest {
- return apiUploadFileRequest{
- apiService: a,
+ * @return ApiUploadFileRequest
+ */
+func (a *PetApiService) UploadFile(ctx _context.Context, petId int64) ApiUploadFileRequest {
+ return ApiUploadFileRequest{
+ ApiService: a,
ctx: ctx,
petId: petId,
}
}
/*
-Execute executes the request
-@return ApiResponse
-*/
-func (r apiUploadFileRequest) Execute() (ApiResponse, *_nethttp.Response, error) {
+ * Execute executes the request
+ * @return ApiResponse
+ */
+func (a *PetApiService) UploadFileExecute(r ApiUploadFileRequest) (ApiResponse, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
localVarPostBody interface{}
@@ -775,7 +946,7 @@ func (r apiUploadFileRequest) Execute() (ApiResponse, *_nethttp.Response, error)
localVarReturnValue ApiResponse
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.UploadFile")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.UploadFile")
if err != nil {
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
}
@@ -818,12 +989,12 @@ func (r apiUploadFileRequest) Execute() (ApiResponse, *_nethttp.Response, error)
localVarFileName = localVarFile.Name()
localVarFile.Close()
}
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return localVarReturnValue, nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarReturnValue, localVarHTTPResponse, err
}
@@ -842,7 +1013,7 @@ func (r apiUploadFileRequest) Execute() (ApiResponse, *_nethttp.Response, error)
return localVarReturnValue, localVarHTTPResponse, newErr
}
- err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
body: localVarBody,
@@ -853,41 +1024,47 @@ func (r apiUploadFileRequest) Execute() (ApiResponse, *_nethttp.Response, error)
return localVarReturnValue, localVarHTTPResponse, nil
}
-type apiUploadFileWithRequiredFileRequest struct {
+
+type ApiUploadFileWithRequiredFileRequest struct {
ctx _context.Context
- apiService *PetApiService
+ ApiService PetApi
petId int64
requiredFile **os.File
additionalMetadata *string
}
-func (r apiUploadFileWithRequiredFileRequest) RequiredFile(requiredFile *os.File) apiUploadFileWithRequiredFileRequest {
+func (r ApiUploadFileWithRequiredFileRequest) RequiredFile(requiredFile *os.File) ApiUploadFileWithRequiredFileRequest {
r.requiredFile = &requiredFile
return r
}
-func (r apiUploadFileWithRequiredFileRequest) AdditionalMetadata(additionalMetadata string) apiUploadFileWithRequiredFileRequest {
+func (r ApiUploadFileWithRequiredFileRequest) AdditionalMetadata(additionalMetadata string) ApiUploadFileWithRequiredFileRequest {
r.additionalMetadata = &additionalMetadata
return r
}
+
+func (r ApiUploadFileWithRequiredFileRequest) Execute() (ApiResponse, *_nethttp.Response, error) {
+ return r.ApiService.UploadFileWithRequiredFileExecute(r)
+}
+
/*
-UploadFileWithRequiredFile uploads an image (required)
+ * UploadFileWithRequiredFile uploads an image (required)
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param petId ID of pet to update
-@return apiUploadFileWithRequiredFileRequest
-*/
-func (a *PetApiService) UploadFileWithRequiredFile(ctx _context.Context, petId int64) apiUploadFileWithRequiredFileRequest {
- return apiUploadFileWithRequiredFileRequest{
- apiService: a,
+ * @return ApiUploadFileWithRequiredFileRequest
+ */
+func (a *PetApiService) UploadFileWithRequiredFile(ctx _context.Context, petId int64) ApiUploadFileWithRequiredFileRequest {
+ return ApiUploadFileWithRequiredFileRequest{
+ ApiService: a,
ctx: ctx,
petId: petId,
}
}
/*
-Execute executes the request
-@return ApiResponse
-*/
-func (r apiUploadFileWithRequiredFileRequest) Execute() (ApiResponse, *_nethttp.Response, error) {
+ * Execute executes the request
+ * @return ApiResponse
+ */
+func (a *PetApiService) UploadFileWithRequiredFileExecute(r ApiUploadFileWithRequiredFileRequest) (ApiResponse, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
localVarPostBody interface{}
@@ -897,7 +1074,7 @@ func (r apiUploadFileWithRequiredFileRequest) Execute() (ApiResponse, *_nethttp.
localVarReturnValue ApiResponse
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.UploadFileWithRequiredFile")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.UploadFileWithRequiredFile")
if err != nil {
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
}
@@ -940,12 +1117,12 @@ func (r apiUploadFileWithRequiredFileRequest) Execute() (ApiResponse, *_nethttp.
localVarFileName = localVarFile.Name()
localVarFile.Close()
}
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return localVarReturnValue, nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarReturnValue, localVarHTTPResponse, err
}
@@ -964,7 +1141,7 @@ func (r apiUploadFileWithRequiredFileRequest) Execute() (ApiResponse, *_nethttp.
return localVarReturnValue, localVarHTTPResponse, newErr
}
- err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
body: localVarBody,
diff --git a/samples/client/petstore/go-experimental/go-petstore/api_store.go b/samples/client/petstore/go-experimental/go-petstore/api_store.go
index 7780395b95bc..1fc4000ac4ec 100644
--- a/samples/client/petstore/go-experimental/go-petstore/api_store.go
+++ b/samples/client/petstore/go-experimental/go-petstore/api_store.go
@@ -22,34 +22,98 @@ var (
_ _context.Context
)
+type StoreApi interface {
+
+ /*
+ * DeleteOrder Delete purchase order by ID
+ * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
+ * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param orderId ID of the order that needs to be deleted
+ * @return ApiDeleteOrderRequest
+ */
+ DeleteOrder(ctx _context.Context, orderId string) ApiDeleteOrderRequest
+
+ /*
+ * DeleteOrderExecute executes the request
+ */
+ DeleteOrderExecute(r ApiDeleteOrderRequest) (*_nethttp.Response, error)
+
+ /*
+ * GetInventory Returns pet inventories by status
+ * 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().
+ * @return ApiGetInventoryRequest
+ */
+ GetInventory(ctx _context.Context) ApiGetInventoryRequest
+
+ /*
+ * GetInventoryExecute executes the request
+ * @return map[string]int32
+ */
+ GetInventoryExecute(r ApiGetInventoryRequest) (map[string]int32, *_nethttp.Response, error)
+
+ /*
+ * GetOrderById Find purchase order by ID
+ * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
+ * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param orderId ID of pet that needs to be fetched
+ * @return ApiGetOrderByIdRequest
+ */
+ GetOrderById(ctx _context.Context, orderId int64) ApiGetOrderByIdRequest
+
+ /*
+ * GetOrderByIdExecute executes the request
+ * @return Order
+ */
+ GetOrderByIdExecute(r ApiGetOrderByIdRequest) (Order, *_nethttp.Response, error)
+
+ /*
+ * 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().
+ * @return ApiPlaceOrderRequest
+ */
+ PlaceOrder(ctx _context.Context) ApiPlaceOrderRequest
+
+ /*
+ * PlaceOrderExecute executes the request
+ * @return Order
+ */
+ PlaceOrderExecute(r ApiPlaceOrderRequest) (Order, *_nethttp.Response, error)
+}
+
// StoreApiService StoreApi service
type StoreApiService service
-type apiDeleteOrderRequest struct {
+type ApiDeleteOrderRequest struct {
ctx _context.Context
- apiService *StoreApiService
+ ApiService StoreApi
orderId string
}
+
+func (r ApiDeleteOrderRequest) Execute() (*_nethttp.Response, error) {
+ return r.ApiService.DeleteOrderExecute(r)
+}
+
/*
-DeleteOrder Delete purchase order by ID
-For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
+ * DeleteOrder Delete purchase order by ID
+ * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param orderId ID of the order that needs to be deleted
-@return apiDeleteOrderRequest
-*/
-func (a *StoreApiService) DeleteOrder(ctx _context.Context, orderId string) apiDeleteOrderRequest {
- return apiDeleteOrderRequest{
- apiService: a,
+ * @return ApiDeleteOrderRequest
+ */
+func (a *StoreApiService) DeleteOrder(ctx _context.Context, orderId string) ApiDeleteOrderRequest {
+ return ApiDeleteOrderRequest{
+ ApiService: a,
ctx: ctx,
orderId: orderId,
}
}
/*
-Execute executes the request
-*/
-func (r apiDeleteOrderRequest) Execute() (*_nethttp.Response, error) {
+ * Execute executes the request
+ */
+func (a *StoreApiService) DeleteOrderExecute(r ApiDeleteOrderRequest) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodDelete
localVarPostBody interface{}
@@ -58,7 +122,7 @@ func (r apiDeleteOrderRequest) Execute() (*_nethttp.Response, error) {
localVarFileBytes []byte
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "StoreApiService.DeleteOrder")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StoreApiService.DeleteOrder")
if err != nil {
return nil, GenericOpenAPIError{error: err.Error()}
}
@@ -87,12 +151,12 @@ func (r apiDeleteOrderRequest) Execute() (*_nethttp.Response, error) {
if localVarHTTPHeaderAccept != "" {
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
}
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarHTTPResponse, err
}
@@ -113,29 +177,35 @@ func (r apiDeleteOrderRequest) Execute() (*_nethttp.Response, error) {
return localVarHTTPResponse, nil
}
-type apiGetInventoryRequest struct {
+
+type ApiGetInventoryRequest struct {
ctx _context.Context
- apiService *StoreApiService
+ ApiService StoreApi
+}
+
+
+func (r ApiGetInventoryRequest) Execute() (map[string]int32, *_nethttp.Response, error) {
+ return r.ApiService.GetInventoryExecute(r)
}
/*
-GetInventory Returns pet inventories by status
-Returns a map of status codes to quantities
+ * GetInventory Returns pet inventories by status
+ * 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().
-@return apiGetInventoryRequest
-*/
-func (a *StoreApiService) GetInventory(ctx _context.Context) apiGetInventoryRequest {
- return apiGetInventoryRequest{
- apiService: a,
+ * @return ApiGetInventoryRequest
+ */
+func (a *StoreApiService) GetInventory(ctx _context.Context) ApiGetInventoryRequest {
+ return ApiGetInventoryRequest{
+ ApiService: a,
ctx: ctx,
}
}
/*
-Execute executes the request
-@return map[string]int32
-*/
-func (r apiGetInventoryRequest) Execute() (map[string]int32, *_nethttp.Response, error) {
+ * Execute executes the request
+ * @return map[string]int32
+ */
+func (a *StoreApiService) GetInventoryExecute(r ApiGetInventoryRequest) (map[string]int32, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarPostBody interface{}
@@ -145,7 +215,7 @@ func (r apiGetInventoryRequest) Execute() (map[string]int32, *_nethttp.Response,
localVarReturnValue map[string]int32
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "StoreApiService.GetInventory")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StoreApiService.GetInventory")
if err != nil {
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
}
@@ -187,12 +257,12 @@ func (r apiGetInventoryRequest) Execute() (map[string]int32, *_nethttp.Response,
}
}
}
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return localVarReturnValue, nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarReturnValue, localVarHTTPResponse, err
}
@@ -211,7 +281,7 @@ func (r apiGetInventoryRequest) Execute() (map[string]int32, *_nethttp.Response,
return localVarReturnValue, localVarHTTPResponse, newErr
}
- err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
body: localVarBody,
@@ -222,32 +292,38 @@ func (r apiGetInventoryRequest) Execute() (map[string]int32, *_nethttp.Response,
return localVarReturnValue, localVarHTTPResponse, nil
}
-type apiGetOrderByIdRequest struct {
+
+type ApiGetOrderByIdRequest struct {
ctx _context.Context
- apiService *StoreApiService
+ ApiService StoreApi
orderId int64
}
+
+func (r ApiGetOrderByIdRequest) Execute() (Order, *_nethttp.Response, error) {
+ return r.ApiService.GetOrderByIdExecute(r)
+}
+
/*
-GetOrderById Find purchase order by ID
-For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
+ * GetOrderById Find purchase order by ID
+ * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param orderId ID of pet that needs to be fetched
-@return apiGetOrderByIdRequest
-*/
-func (a *StoreApiService) GetOrderById(ctx _context.Context, orderId int64) apiGetOrderByIdRequest {
- return apiGetOrderByIdRequest{
- apiService: a,
+ * @return ApiGetOrderByIdRequest
+ */
+func (a *StoreApiService) GetOrderById(ctx _context.Context, orderId int64) ApiGetOrderByIdRequest {
+ return ApiGetOrderByIdRequest{
+ ApiService: a,
ctx: ctx,
orderId: orderId,
}
}
/*
-Execute executes the request
-@return Order
-*/
-func (r apiGetOrderByIdRequest) Execute() (Order, *_nethttp.Response, error) {
+ * Execute executes the request
+ * @return Order
+ */
+func (a *StoreApiService) GetOrderByIdExecute(r ApiGetOrderByIdRequest) (Order, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarPostBody interface{}
@@ -257,7 +333,7 @@ func (r apiGetOrderByIdRequest) Execute() (Order, *_nethttp.Response, error) {
localVarReturnValue Order
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "StoreApiService.GetOrderById")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StoreApiService.GetOrderById")
if err != nil {
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
}
@@ -292,12 +368,12 @@ func (r apiGetOrderByIdRequest) Execute() (Order, *_nethttp.Response, error) {
if localVarHTTPHeaderAccept != "" {
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
}
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return localVarReturnValue, nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarReturnValue, localVarHTTPResponse, err
}
@@ -316,7 +392,7 @@ func (r apiGetOrderByIdRequest) Execute() (Order, *_nethttp.Response, error) {
return localVarReturnValue, localVarHTTPResponse, newErr
}
- err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
body: localVarBody,
@@ -327,33 +403,39 @@ func (r apiGetOrderByIdRequest) Execute() (Order, *_nethttp.Response, error) {
return localVarReturnValue, localVarHTTPResponse, nil
}
-type apiPlaceOrderRequest struct {
+
+type ApiPlaceOrderRequest struct {
ctx _context.Context
- apiService *StoreApiService
+ ApiService StoreApi
body *Order
}
-func (r apiPlaceOrderRequest) Body(body Order) apiPlaceOrderRequest {
+func (r ApiPlaceOrderRequest) Body(body Order) ApiPlaceOrderRequest {
r.body = &body
return r
}
+
+func (r ApiPlaceOrderRequest) Execute() (Order, *_nethttp.Response, error) {
+ return r.ApiService.PlaceOrderExecute(r)
+}
+
/*
-PlaceOrder Place an order for a pet
+ * 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().
-@return apiPlaceOrderRequest
-*/
-func (a *StoreApiService) PlaceOrder(ctx _context.Context) apiPlaceOrderRequest {
- return apiPlaceOrderRequest{
- apiService: a,
+ * @return ApiPlaceOrderRequest
+ */
+func (a *StoreApiService) PlaceOrder(ctx _context.Context) ApiPlaceOrderRequest {
+ return ApiPlaceOrderRequest{
+ ApiService: a,
ctx: ctx,
}
}
/*
-Execute executes the request
-@return Order
-*/
-func (r apiPlaceOrderRequest) Execute() (Order, *_nethttp.Response, error) {
+ * Execute executes the request
+ * @return Order
+ */
+func (a *StoreApiService) PlaceOrderExecute(r ApiPlaceOrderRequest) (Order, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
localVarPostBody interface{}
@@ -363,7 +445,7 @@ func (r apiPlaceOrderRequest) Execute() (Order, *_nethttp.Response, error) {
localVarReturnValue Order
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "StoreApiService.PlaceOrder")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StoreApiService.PlaceOrder")
if err != nil {
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
}
@@ -396,12 +478,12 @@ func (r apiPlaceOrderRequest) Execute() (Order, *_nethttp.Response, error) {
}
// body params
localVarPostBody = r.body
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return localVarReturnValue, nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarReturnValue, localVarHTTPResponse, err
}
@@ -420,7 +502,7 @@ func (r apiPlaceOrderRequest) Execute() (Order, *_nethttp.Response, error) {
return localVarReturnValue, localVarHTTPResponse, newErr
}
- err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
body: localVarBody,
diff --git a/samples/client/petstore/go-experimental/go-petstore/api_user.go b/samples/client/petstore/go-experimental/go-petstore/api_user.go
index 6bee2f19b7e8..52216e06040d 100644
--- a/samples/client/petstore/go-experimental/go-petstore/api_user.go
+++ b/samples/client/petstore/go-experimental/go-petstore/api_user.go
@@ -22,36 +22,148 @@ var (
_ _context.Context
)
+type UserApi interface {
+
+ /*
+ * CreateUser Create user
+ * 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().
+ * @return ApiCreateUserRequest
+ */
+ CreateUser(ctx _context.Context) ApiCreateUserRequest
+
+ /*
+ * CreateUserExecute executes the request
+ */
+ CreateUserExecute(r ApiCreateUserRequest) (*_nethttp.Response, error)
+
+ /*
+ * 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().
+ * @return ApiCreateUsersWithArrayInputRequest
+ */
+ CreateUsersWithArrayInput(ctx _context.Context) ApiCreateUsersWithArrayInputRequest
+
+ /*
+ * CreateUsersWithArrayInputExecute executes the request
+ */
+ CreateUsersWithArrayInputExecute(r ApiCreateUsersWithArrayInputRequest) (*_nethttp.Response, error)
+
+ /*
+ * 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().
+ * @return ApiCreateUsersWithListInputRequest
+ */
+ CreateUsersWithListInput(ctx _context.Context) ApiCreateUsersWithListInputRequest
+
+ /*
+ * CreateUsersWithListInputExecute executes the request
+ */
+ CreateUsersWithListInputExecute(r ApiCreateUsersWithListInputRequest) (*_nethttp.Response, error)
+
+ /*
+ * DeleteUser Delete user
+ * 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 username The name that needs to be deleted
+ * @return ApiDeleteUserRequest
+ */
+ DeleteUser(ctx _context.Context, username string) ApiDeleteUserRequest
+
+ /*
+ * DeleteUserExecute executes the request
+ */
+ DeleteUserExecute(r ApiDeleteUserRequest) (*_nethttp.Response, error)
+
+ /*
+ * GetUserByName Get user by user name
+ * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param username The name that needs to be fetched. Use user1 for testing.
+ * @return ApiGetUserByNameRequest
+ */
+ GetUserByName(ctx _context.Context, username string) ApiGetUserByNameRequest
+
+ /*
+ * GetUserByNameExecute executes the request
+ * @return User
+ */
+ GetUserByNameExecute(r ApiGetUserByNameRequest) (User, *_nethttp.Response, error)
+
+ /*
+ * LoginUser Logs user into the system
+ * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @return ApiLoginUserRequest
+ */
+ LoginUser(ctx _context.Context) ApiLoginUserRequest
+
+ /*
+ * LoginUserExecute executes the request
+ * @return string
+ */
+ LoginUserExecute(r ApiLoginUserRequest) (string, *_nethttp.Response, error)
+
+ /*
+ * 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().
+ * @return ApiLogoutUserRequest
+ */
+ LogoutUser(ctx _context.Context) ApiLogoutUserRequest
+
+ /*
+ * LogoutUserExecute executes the request
+ */
+ LogoutUserExecute(r ApiLogoutUserRequest) (*_nethttp.Response, error)
+
+ /*
+ * UpdateUser Updated user
+ * 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 username name that need to be deleted
+ * @return ApiUpdateUserRequest
+ */
+ UpdateUser(ctx _context.Context, username string) ApiUpdateUserRequest
+
+ /*
+ * UpdateUserExecute executes the request
+ */
+ UpdateUserExecute(r ApiUpdateUserRequest) (*_nethttp.Response, error)
+}
+
// UserApiService UserApi service
type UserApiService service
-type apiCreateUserRequest struct {
+type ApiCreateUserRequest struct {
ctx _context.Context
- apiService *UserApiService
+ ApiService UserApi
body *User
}
-func (r apiCreateUserRequest) Body(body User) apiCreateUserRequest {
+func (r ApiCreateUserRequest) Body(body User) ApiCreateUserRequest {
r.body = &body
return r
}
+
+func (r ApiCreateUserRequest) Execute() (*_nethttp.Response, error) {
+ return r.ApiService.CreateUserExecute(r)
+}
+
/*
-CreateUser Create user
-This can only be done by the logged in user.
+ * CreateUser Create user
+ * 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().
-@return apiCreateUserRequest
-*/
-func (a *UserApiService) CreateUser(ctx _context.Context) apiCreateUserRequest {
- return apiCreateUserRequest{
- apiService: a,
+ * @return ApiCreateUserRequest
+ */
+func (a *UserApiService) CreateUser(ctx _context.Context) ApiCreateUserRequest {
+ return ApiCreateUserRequest{
+ ApiService: a,
ctx: ctx,
}
}
/*
-Execute executes the request
-*/
-func (r apiCreateUserRequest) Execute() (*_nethttp.Response, error) {
+ * Execute executes the request
+ */
+func (a *UserApiService) CreateUserExecute(r ApiCreateUserRequest) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
localVarPostBody interface{}
@@ -60,7 +172,7 @@ func (r apiCreateUserRequest) Execute() (*_nethttp.Response, error) {
localVarFileBytes []byte
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.CreateUser")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.CreateUser")
if err != nil {
return nil, GenericOpenAPIError{error: err.Error()}
}
@@ -93,12 +205,12 @@ func (r apiCreateUserRequest) Execute() (*_nethttp.Response, error) {
}
// body params
localVarPostBody = r.body
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarHTTPResponse, err
}
@@ -119,32 +231,38 @@ func (r apiCreateUserRequest) Execute() (*_nethttp.Response, error) {
return localVarHTTPResponse, nil
}
-type apiCreateUsersWithArrayInputRequest struct {
+
+type ApiCreateUsersWithArrayInputRequest struct {
ctx _context.Context
- apiService *UserApiService
+ ApiService UserApi
body *[]User
}
-func (r apiCreateUsersWithArrayInputRequest) Body(body []User) apiCreateUsersWithArrayInputRequest {
+func (r ApiCreateUsersWithArrayInputRequest) Body(body []User) ApiCreateUsersWithArrayInputRequest {
r.body = &body
return r
}
+
+func (r ApiCreateUsersWithArrayInputRequest) Execute() (*_nethttp.Response, error) {
+ return r.ApiService.CreateUsersWithArrayInputExecute(r)
+}
+
/*
-CreateUsersWithArrayInput Creates list of users with given input array
+ * 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().
-@return apiCreateUsersWithArrayInputRequest
-*/
-func (a *UserApiService) CreateUsersWithArrayInput(ctx _context.Context) apiCreateUsersWithArrayInputRequest {
- return apiCreateUsersWithArrayInputRequest{
- apiService: a,
+ * @return ApiCreateUsersWithArrayInputRequest
+ */
+func (a *UserApiService) CreateUsersWithArrayInput(ctx _context.Context) ApiCreateUsersWithArrayInputRequest {
+ return ApiCreateUsersWithArrayInputRequest{
+ ApiService: a,
ctx: ctx,
}
}
/*
-Execute executes the request
-*/
-func (r apiCreateUsersWithArrayInputRequest) Execute() (*_nethttp.Response, error) {
+ * Execute executes the request
+ */
+func (a *UserApiService) CreateUsersWithArrayInputExecute(r ApiCreateUsersWithArrayInputRequest) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
localVarPostBody interface{}
@@ -153,7 +271,7 @@ func (r apiCreateUsersWithArrayInputRequest) Execute() (*_nethttp.Response, erro
localVarFileBytes []byte
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.CreateUsersWithArrayInput")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.CreateUsersWithArrayInput")
if err != nil {
return nil, GenericOpenAPIError{error: err.Error()}
}
@@ -186,12 +304,12 @@ func (r apiCreateUsersWithArrayInputRequest) Execute() (*_nethttp.Response, erro
}
// body params
localVarPostBody = r.body
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarHTTPResponse, err
}
@@ -212,32 +330,38 @@ func (r apiCreateUsersWithArrayInputRequest) Execute() (*_nethttp.Response, erro
return localVarHTTPResponse, nil
}
-type apiCreateUsersWithListInputRequest struct {
+
+type ApiCreateUsersWithListInputRequest struct {
ctx _context.Context
- apiService *UserApiService
+ ApiService UserApi
body *[]User
}
-func (r apiCreateUsersWithListInputRequest) Body(body []User) apiCreateUsersWithListInputRequest {
+func (r ApiCreateUsersWithListInputRequest) Body(body []User) ApiCreateUsersWithListInputRequest {
r.body = &body
return r
}
+
+func (r ApiCreateUsersWithListInputRequest) Execute() (*_nethttp.Response, error) {
+ return r.ApiService.CreateUsersWithListInputExecute(r)
+}
+
/*
-CreateUsersWithListInput Creates list of users with given input array
+ * 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().
-@return apiCreateUsersWithListInputRequest
-*/
-func (a *UserApiService) CreateUsersWithListInput(ctx _context.Context) apiCreateUsersWithListInputRequest {
- return apiCreateUsersWithListInputRequest{
- apiService: a,
+ * @return ApiCreateUsersWithListInputRequest
+ */
+func (a *UserApiService) CreateUsersWithListInput(ctx _context.Context) ApiCreateUsersWithListInputRequest {
+ return ApiCreateUsersWithListInputRequest{
+ ApiService: a,
ctx: ctx,
}
}
/*
-Execute executes the request
-*/
-func (r apiCreateUsersWithListInputRequest) Execute() (*_nethttp.Response, error) {
+ * Execute executes the request
+ */
+func (a *UserApiService) CreateUsersWithListInputExecute(r ApiCreateUsersWithListInputRequest) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
localVarPostBody interface{}
@@ -246,7 +370,7 @@ func (r apiCreateUsersWithListInputRequest) Execute() (*_nethttp.Response, error
localVarFileBytes []byte
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.CreateUsersWithListInput")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.CreateUsersWithListInput")
if err != nil {
return nil, GenericOpenAPIError{error: err.Error()}
}
@@ -279,12 +403,12 @@ func (r apiCreateUsersWithListInputRequest) Execute() (*_nethttp.Response, error
}
// body params
localVarPostBody = r.body
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarHTTPResponse, err
}
@@ -305,31 +429,37 @@ func (r apiCreateUsersWithListInputRequest) Execute() (*_nethttp.Response, error
return localVarHTTPResponse, nil
}
-type apiDeleteUserRequest struct {
+
+type ApiDeleteUserRequest struct {
ctx _context.Context
- apiService *UserApiService
+ ApiService UserApi
username string
}
+
+func (r ApiDeleteUserRequest) Execute() (*_nethttp.Response, error) {
+ return r.ApiService.DeleteUserExecute(r)
+}
+
/*
-DeleteUser Delete user
-This can only be done by the logged in user.
+ * DeleteUser Delete user
+ * 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 username The name that needs to be deleted
-@return apiDeleteUserRequest
-*/
-func (a *UserApiService) DeleteUser(ctx _context.Context, username string) apiDeleteUserRequest {
- return apiDeleteUserRequest{
- apiService: a,
+ * @return ApiDeleteUserRequest
+ */
+func (a *UserApiService) DeleteUser(ctx _context.Context, username string) ApiDeleteUserRequest {
+ return ApiDeleteUserRequest{
+ ApiService: a,
ctx: ctx,
username: username,
}
}
/*
-Execute executes the request
-*/
-func (r apiDeleteUserRequest) Execute() (*_nethttp.Response, error) {
+ * Execute executes the request
+ */
+func (a *UserApiService) DeleteUserExecute(r ApiDeleteUserRequest) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodDelete
localVarPostBody interface{}
@@ -338,7 +468,7 @@ func (r apiDeleteUserRequest) Execute() (*_nethttp.Response, error) {
localVarFileBytes []byte
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.DeleteUser")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.DeleteUser")
if err != nil {
return nil, GenericOpenAPIError{error: err.Error()}
}
@@ -367,12 +497,12 @@ func (r apiDeleteUserRequest) Execute() (*_nethttp.Response, error) {
if localVarHTTPHeaderAccept != "" {
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
}
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarHTTPResponse, err
}
@@ -393,31 +523,37 @@ func (r apiDeleteUserRequest) Execute() (*_nethttp.Response, error) {
return localVarHTTPResponse, nil
}
-type apiGetUserByNameRequest struct {
+
+type ApiGetUserByNameRequest struct {
ctx _context.Context
- apiService *UserApiService
+ ApiService UserApi
username string
}
+
+func (r ApiGetUserByNameRequest) Execute() (User, *_nethttp.Response, error) {
+ return r.ApiService.GetUserByNameExecute(r)
+}
+
/*
-GetUserByName Get user by user name
+ * GetUserByName Get user by user name
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param username The name that needs to be fetched. Use user1 for testing.
-@return apiGetUserByNameRequest
-*/
-func (a *UserApiService) GetUserByName(ctx _context.Context, username string) apiGetUserByNameRequest {
- return apiGetUserByNameRequest{
- apiService: a,
+ * @return ApiGetUserByNameRequest
+ */
+func (a *UserApiService) GetUserByName(ctx _context.Context, username string) ApiGetUserByNameRequest {
+ return ApiGetUserByNameRequest{
+ ApiService: a,
ctx: ctx,
username: username,
}
}
/*
-Execute executes the request
-@return User
-*/
-func (r apiGetUserByNameRequest) Execute() (User, *_nethttp.Response, error) {
+ * Execute executes the request
+ * @return User
+ */
+func (a *UserApiService) GetUserByNameExecute(r ApiGetUserByNameRequest) (User, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarPostBody interface{}
@@ -427,7 +563,7 @@ func (r apiGetUserByNameRequest) Execute() (User, *_nethttp.Response, error) {
localVarReturnValue User
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.GetUserByName")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.GetUserByName")
if err != nil {
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
}
@@ -456,12 +592,12 @@ func (r apiGetUserByNameRequest) Execute() (User, *_nethttp.Response, error) {
if localVarHTTPHeaderAccept != "" {
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
}
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return localVarReturnValue, nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarReturnValue, localVarHTTPResponse, err
}
@@ -480,7 +616,7 @@ func (r apiGetUserByNameRequest) Execute() (User, *_nethttp.Response, error) {
return localVarReturnValue, localVarHTTPResponse, newErr
}
- err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
body: localVarBody,
@@ -491,38 +627,44 @@ func (r apiGetUserByNameRequest) Execute() (User, *_nethttp.Response, error) {
return localVarReturnValue, localVarHTTPResponse, nil
}
-type apiLoginUserRequest struct {
+
+type ApiLoginUserRequest struct {
ctx _context.Context
- apiService *UserApiService
+ ApiService UserApi
username *string
password *string
}
-func (r apiLoginUserRequest) Username(username string) apiLoginUserRequest {
+func (r ApiLoginUserRequest) Username(username string) ApiLoginUserRequest {
r.username = &username
return r
}
-func (r apiLoginUserRequest) Password(password string) apiLoginUserRequest {
+func (r ApiLoginUserRequest) Password(password string) ApiLoginUserRequest {
r.password = &password
return r
}
+
+func (r ApiLoginUserRequest) Execute() (string, *_nethttp.Response, error) {
+ return r.ApiService.LoginUserExecute(r)
+}
+
/*
-LoginUser Logs user into the system
+ * LoginUser Logs user into the system
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
-@return apiLoginUserRequest
-*/
-func (a *UserApiService) LoginUser(ctx _context.Context) apiLoginUserRequest {
- return apiLoginUserRequest{
- apiService: a,
+ * @return ApiLoginUserRequest
+ */
+func (a *UserApiService) LoginUser(ctx _context.Context) ApiLoginUserRequest {
+ return ApiLoginUserRequest{
+ ApiService: a,
ctx: ctx,
}
}
/*
-Execute executes the request
-@return string
-*/
-func (r apiLoginUserRequest) Execute() (string, *_nethttp.Response, error) {
+ * Execute executes the request
+ * @return string
+ */
+func (a *UserApiService) LoginUserExecute(r ApiLoginUserRequest) (string, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarPostBody interface{}
@@ -532,7 +674,7 @@ func (r apiLoginUserRequest) Execute() (string, *_nethttp.Response, error) {
localVarReturnValue string
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.LoginUser")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.LoginUser")
if err != nil {
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
}
@@ -568,12 +710,12 @@ func (r apiLoginUserRequest) Execute() (string, *_nethttp.Response, error) {
if localVarHTTPHeaderAccept != "" {
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
}
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return localVarReturnValue, nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarReturnValue, localVarHTTPResponse, err
}
@@ -592,7 +734,7 @@ func (r apiLoginUserRequest) Execute() (string, *_nethttp.Response, error) {
return localVarReturnValue, localVarHTTPResponse, newErr
}
- err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
body: localVarBody,
@@ -603,27 +745,33 @@ func (r apiLoginUserRequest) Execute() (string, *_nethttp.Response, error) {
return localVarReturnValue, localVarHTTPResponse, nil
}
-type apiLogoutUserRequest struct {
+
+type ApiLogoutUserRequest struct {
ctx _context.Context
- apiService *UserApiService
+ ApiService UserApi
+}
+
+
+func (r ApiLogoutUserRequest) Execute() (*_nethttp.Response, error) {
+ return r.ApiService.LogoutUserExecute(r)
}
/*
-LogoutUser Logs out current logged in user session
+ * 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().
-@return apiLogoutUserRequest
-*/
-func (a *UserApiService) LogoutUser(ctx _context.Context) apiLogoutUserRequest {
- return apiLogoutUserRequest{
- apiService: a,
+ * @return ApiLogoutUserRequest
+ */
+func (a *UserApiService) LogoutUser(ctx _context.Context) ApiLogoutUserRequest {
+ return ApiLogoutUserRequest{
+ ApiService: a,
ctx: ctx,
}
}
/*
-Execute executes the request
-*/
-func (r apiLogoutUserRequest) Execute() (*_nethttp.Response, error) {
+ * Execute executes the request
+ */
+func (a *UserApiService) LogoutUserExecute(r ApiLogoutUserRequest) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarPostBody interface{}
@@ -632,7 +780,7 @@ func (r apiLogoutUserRequest) Execute() (*_nethttp.Response, error) {
localVarFileBytes []byte
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.LogoutUser")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.LogoutUser")
if err != nil {
return nil, GenericOpenAPIError{error: err.Error()}
}
@@ -660,12 +808,12 @@ func (r apiLogoutUserRequest) Execute() (*_nethttp.Response, error) {
if localVarHTTPHeaderAccept != "" {
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
}
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarHTTPResponse, err
}
@@ -686,36 +834,42 @@ func (r apiLogoutUserRequest) Execute() (*_nethttp.Response, error) {
return localVarHTTPResponse, nil
}
-type apiUpdateUserRequest struct {
+
+type ApiUpdateUserRequest struct {
ctx _context.Context
- apiService *UserApiService
+ ApiService UserApi
username string
body *User
}
-func (r apiUpdateUserRequest) Body(body User) apiUpdateUserRequest {
+func (r ApiUpdateUserRequest) Body(body User) ApiUpdateUserRequest {
r.body = &body
return r
}
+
+func (r ApiUpdateUserRequest) Execute() (*_nethttp.Response, error) {
+ return r.ApiService.UpdateUserExecute(r)
+}
+
/*
-UpdateUser Updated user
-This can only be done by the logged in user.
+ * UpdateUser Updated user
+ * 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 username name that need to be deleted
-@return apiUpdateUserRequest
-*/
-func (a *UserApiService) UpdateUser(ctx _context.Context, username string) apiUpdateUserRequest {
- return apiUpdateUserRequest{
- apiService: a,
+ * @return ApiUpdateUserRequest
+ */
+func (a *UserApiService) UpdateUser(ctx _context.Context, username string) ApiUpdateUserRequest {
+ return ApiUpdateUserRequest{
+ ApiService: a,
ctx: ctx,
username: username,
}
}
/*
-Execute executes the request
-*/
-func (r apiUpdateUserRequest) Execute() (*_nethttp.Response, error) {
+ * Execute executes the request
+ */
+func (a *UserApiService) UpdateUserExecute(r ApiUpdateUserRequest) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPut
localVarPostBody interface{}
@@ -724,7 +878,7 @@ func (r apiUpdateUserRequest) Execute() (*_nethttp.Response, error) {
localVarFileBytes []byte
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.UpdateUser")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.UpdateUser")
if err != nil {
return nil, GenericOpenAPIError{error: err.Error()}
}
@@ -758,12 +912,12 @@ func (r apiUpdateUserRequest) Execute() (*_nethttp.Response, error) {
}
// body params
localVarPostBody = r.body
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarHTTPResponse, err
}
diff --git a/samples/client/petstore/go-experimental/go-petstore/client.go b/samples/client/petstore/go-experimental/go-petstore/client.go
index a9bd76d61238..09eb6b64596c 100644
--- a/samples/client/petstore/go-experimental/go-petstore/client.go
+++ b/samples/client/petstore/go-experimental/go-petstore/client.go
@@ -47,17 +47,17 @@ type APIClient struct {
// API Services
- AnotherFakeApi *AnotherFakeApiService
+ AnotherFakeApi AnotherFakeApi
- FakeApi *FakeApiService
+ FakeApi FakeApi
- FakeClassnameTags123Api *FakeClassnameTags123ApiService
+ FakeClassnameTags123Api FakeClassnameTags123Api
- PetApi *PetApiService
+ PetApi PetApi
- StoreApi *StoreApiService
+ StoreApi StoreApi
- UserApi *UserApiService
+ UserApi UserApi
}
type service struct {
diff --git a/samples/client/petstore/go-experimental/mock/mock_api_pet.go b/samples/client/petstore/go-experimental/mock/mock_api_pet.go
new file mode 100644
index 000000000000..84686bb5f2e5
--- /dev/null
+++ b/samples/client/petstore/go-experimental/mock/mock_api_pet.go
@@ -0,0 +1,89 @@
+package mock
+
+import (
+ "context"
+ "net/http"
+
+ sw "../go-petstore"
+)
+
+// MockPetApi is a mock of the PetApi interface
+type MockPetApi struct {
+}
+
+// NewMockPetApi creates a new mock instance
+func NewMockPetApi() *MockPetApi {
+ return &MockPetApi{}
+}
+
+func (m *MockPetApi) AddPet(ctx context.Context) sw.ApiAddPetRequest {
+ return sw.ApiAddPetRequest{ApiService: m}
+}
+
+func (m *MockPetApi) AddPetExecute(r sw.ApiAddPetRequest) (*http.Response, error) {
+ return &http.Response{StatusCode:200}, nil
+}
+
+func (m *MockPetApi) DeletePet(ctx context.Context, petId int64) sw.ApiDeletePetRequest {
+ return sw.ApiDeletePetRequest{ApiService: m}
+}
+
+func (m *MockPetApi) DeletePetExecute(r sw.ApiDeletePetRequest) (*http.Response, error) {
+ return &http.Response{StatusCode:200}, nil
+}
+
+func (m *MockPetApi) FindPetsByStatus(ctx context.Context) sw.ApiFindPetsByStatusRequest {
+ return sw.ApiFindPetsByStatusRequest{ApiService: m}
+}
+
+func (m *MockPetApi) FindPetsByStatusExecute(r sw.ApiFindPetsByStatusRequest) ([]sw.Pet, *http.Response, error) {
+ return []sw.Pet{}, &http.Response{StatusCode:200}, nil
+}
+
+func (m *MockPetApi) FindPetsByTags(ctx context.Context) sw.ApiFindPetsByTagsRequest {
+ return sw.ApiFindPetsByTagsRequest{ApiService: m}
+}
+
+func (m *MockPetApi) FindPetsByTagsExecute(r sw.ApiFindPetsByTagsRequest) ([]sw.Pet, *http.Response, error) {
+ return []sw.Pet{}, &http.Response{StatusCode:200}, nil
+}
+
+func (m *MockPetApi) GetPetById(ctx context.Context, petId int64) sw.ApiGetPetByIdRequest {
+ return sw.ApiGetPetByIdRequest{ApiService: m}
+}
+
+func (m *MockPetApi) GetPetByIdExecute(r sw.ApiGetPetByIdRequest) (sw.Pet, *http.Response, error) {
+ return sw.Pet{}, &http.Response{StatusCode:200}, nil
+}
+
+func (m *MockPetApi) UpdatePet(ctx context.Context) sw.ApiUpdatePetRequest {
+ return sw.ApiUpdatePetRequest{ApiService: m}
+}
+
+func (m *MockPetApi) UpdatePetExecute(r sw.ApiUpdatePetRequest) (*http.Response, error) {
+ return &http.Response{StatusCode:200}, nil
+}
+
+func (m *MockPetApi) UpdatePetWithForm(ctx context.Context, petId int64) sw.ApiUpdatePetWithFormRequest {
+ return sw.ApiUpdatePetWithFormRequest{ApiService: m}
+}
+
+func (m *MockPetApi) UpdatePetWithFormExecute(r sw.ApiUpdatePetWithFormRequest) (*http.Response, error) {
+ return &http.Response{StatusCode:200}, nil
+}
+
+func (m *MockPetApi) UploadFile(ctx context.Context, petId int64) sw.ApiUploadFileRequest {
+ return sw.ApiUploadFileRequest{ApiService: m}
+}
+
+func (m *MockPetApi) UploadFileExecute(r sw.ApiUploadFileRequest) (sw.ApiResponse, *http.Response, error) {
+ return sw.ApiResponse{}, &http.Response{StatusCode:200}, nil
+}
+
+func (m *MockPetApi) UploadFileWithRequiredFile(ctx context.Context, petId int64) sw.ApiUploadFileWithRequiredFileRequest {
+ return sw.ApiUploadFileWithRequiredFileRequest{ApiService: m}
+}
+
+func (m *MockPetApi) UploadFileWithRequiredFileExecute(r sw.ApiUploadFileWithRequiredFileRequest) (sw.ApiResponse, *http.Response, error) {
+ return sw.ApiResponse{}, &http.Response{StatusCode:200}, nil
+}
diff --git a/samples/client/petstore/go-experimental/pet_api_test.go b/samples/client/petstore/go-experimental/pet_api_test.go
index 57afd2923c50..0868c4b96ccb 100644
--- a/samples/client/petstore/go-experimental/pet_api_test.go
+++ b/samples/client/petstore/go-experimental/pet_api_test.go
@@ -9,6 +9,7 @@ import (
"github.com/stretchr/testify/assert"
sw "./go-petstore"
+ mock "./mock"
)
var client *sw.APIClient
@@ -41,6 +42,15 @@ func TestAddPet(t *testing.T) {
}
}
+func TestAddPetMock(t *testing.T) {
+ actualApi := client.PetApi
+
+ mockApi := mock.NewMockPetApi()
+ client.PetApi = mockApi
+ TestAddPet(t)
+ client.PetApi = actualApi
+}
+
func TestFindPetsByStatusWithMissingParam(t *testing.T) {
_, r, err := client.PetApi.FindPetsByStatus(context.Background()).Status(nil).Execute()
diff --git a/samples/client/petstore/go/go-petstore-withXml/api_another_fake.go b/samples/client/petstore/go/go-petstore-withXml/api_another_fake.go
index e7e0b2d0c99e..fa9845ac61be 100644
--- a/samples/client/petstore/go/go-petstore-withXml/api_another_fake.go
+++ b/samples/client/petstore/go/go-petstore-withXml/api_another_fake.go
@@ -23,16 +23,32 @@ var (
_ _context.Context
)
+type AnotherFakeApi interface {
+
+ /*
+ * Call123TestSpecialTags To test special tags
+ *
+ * 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 body client model
+ * @return Client
+ */
+ Call123TestSpecialTags(ctx _context.Context, body Client) (Client, *_nethttp.Response, error)
+}
+
// AnotherFakeApiService AnotherFakeApi service
type AnotherFakeApiService service
/*
-Call123TestSpecialTags To test special tags
-To test special tags and operation ID starting with number
+ * Call123TestSpecialTags To test special tags
+ *
+ * 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 body client model
-@return Client
-*/
+ * @return Client
+ */
func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx _context.Context, body Client) (Client, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPatch
diff --git a/samples/client/petstore/go/go-petstore-withXml/api_fake.go b/samples/client/petstore/go/go-petstore-withXml/api_fake.go
index 764ec664e3d8..afc6908431bc 100644
--- a/samples/client/petstore/go/go-petstore-withXml/api_fake.go
+++ b/samples/client/petstore/go/go-petstore-withXml/api_fake.go
@@ -26,15 +26,197 @@ var (
_ _context.Context
)
+type FakeApi interface {
+
+ /*
+ * CreateXmlItem creates an XmlItem
+ *
+ * this route creates an XmlItem
+ *
+ * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param xmlItem XmlItem Body
+ */
+ CreateXmlItem(ctx _context.Context, xmlItem XmlItem) (*_nethttp.Response, error)
+
+ /*
+ * FakeOuterBooleanSerialize Method for FakeOuterBooleanSerialize
+ *
+ * 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 optional nil or *FakeOuterBooleanSerializeOpts - Optional Parameters:
+ * @param "Body" (optional.Bool) - Input boolean as post body
+ * @return bool
+ */
+ FakeOuterBooleanSerialize(ctx _context.Context, localVarOptionals *FakeOuterBooleanSerializeOpts) (bool, *_nethttp.Response, error)
+
+ /*
+ * FakeOuterCompositeSerialize Method for FakeOuterCompositeSerialize
+ *
+ * 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 optional nil or *FakeOuterCompositeSerializeOpts - Optional Parameters:
+ * @param "Body" (optional.Interface of OuterComposite) - Input composite as post body
+ * @return OuterComposite
+ */
+ FakeOuterCompositeSerialize(ctx _context.Context, localVarOptionals *FakeOuterCompositeSerializeOpts) (OuterComposite, *_nethttp.Response, error)
+
+ /*
+ * FakeOuterNumberSerialize Method for FakeOuterNumberSerialize
+ *
+ * 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 optional nil or *FakeOuterNumberSerializeOpts - Optional Parameters:
+ * @param "Body" (optional.Float32) - Input number as post body
+ * @return float32
+ */
+ FakeOuterNumberSerialize(ctx _context.Context, localVarOptionals *FakeOuterNumberSerializeOpts) (float32, *_nethttp.Response, error)
+
+ /*
+ * FakeOuterStringSerialize Method for FakeOuterStringSerialize
+ *
+ * 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 optional nil or *FakeOuterStringSerializeOpts - Optional Parameters:
+ * @param "Body" (optional.String) - Input string as post body
+ * @return string
+ */
+ FakeOuterStringSerialize(ctx _context.Context, localVarOptionals *FakeOuterStringSerializeOpts) (string, *_nethttp.Response, error)
+
+ /*
+ * TestBodyWithFileSchema Method for TestBodyWithFileSchema
+ *
+ * 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 body
+ */
+ TestBodyWithFileSchema(ctx _context.Context, body FileSchemaTestClass) (*_nethttp.Response, error)
+
+ /*
+ * TestBodyWithQueryParams Method for TestBodyWithQueryParams
+ *
+ * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param query
+ * @param body
+ */
+ TestBodyWithQueryParams(ctx _context.Context, query string, body User) (*_nethttp.Response, error)
+
+ /*
+ * TestClientModel To test \"client\" model
+ *
+ * To test \"client\" model
+ *
+ * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param body client model
+ * @return Client
+ */
+ TestClientModel(ctx _context.Context, body Client) (Client, *_nethttp.Response, error)
+
+ /*
+ * TestEndpointParameters Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+ *
+ * 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 number None
+ * @param double None
+ * @param patternWithoutDelimiter None
+ * @param byte_ None
+ * @param optional nil or *TestEndpointParametersOpts - Optional Parameters:
+ * @param "Integer" (optional.Int32) - None
+ * @param "Int32_" (optional.Int32) - None
+ * @param "Int64_" (optional.Int64) - None
+ * @param "Float" (optional.Float32) - None
+ * @param "String_" (optional.String) - None
+ * @param "Binary" (optional.Interface of *os.File) - None
+ * @param "Date" (optional.String) - None
+ * @param "DateTime" (optional.Time) - None
+ * @param "Password" (optional.String) - None
+ * @param "Callback" (optional.String) - None
+ */
+ TestEndpointParameters(ctx _context.Context, number float32, double float64, patternWithoutDelimiter string, byte_ string, localVarOptionals *TestEndpointParametersOpts) (*_nethttp.Response, error)
+
+ /*
+ * TestEnumParameters To test enum parameters
+ *
+ * To test enum parameters
+ *
+ * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param optional nil or *TestEnumParametersOpts - Optional Parameters:
+ * @param "EnumHeaderStringArray" (optional.Interface of []string) - Header parameter enum test (string array)
+ * @param "EnumHeaderString" (optional.String) - Header parameter enum test (string)
+ * @param "EnumQueryStringArray" (optional.Interface of []string) - Query parameter enum test (string array)
+ * @param "EnumQueryString" (optional.String) - Query parameter enum test (string)
+ * @param "EnumQueryInteger" (optional.Int32) - Query parameter enum test (double)
+ * @param "EnumQueryDouble" (optional.Float64) - Query parameter enum test (double)
+ * @param "EnumFormStringArray" (optional.Interface of []string) - Form parameter enum test (string array)
+ * @param "EnumFormString" (optional.String) - Form parameter enum test (string)
+ */
+ TestEnumParameters(ctx _context.Context, localVarOptionals *TestEnumParametersOpts) (*_nethttp.Response, error)
+
+ /*
+ * TestGroupParameters Fake endpoint to test group parameters (optional)
+ *
+ * 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 requiredStringGroup Required String in group parameters
+ * @param requiredBooleanGroup Required Boolean in group parameters
+ * @param requiredInt64Group Required Integer in group parameters
+ * @param optional nil or *TestGroupParametersOpts - Optional Parameters:
+ * @param "StringGroup" (optional.Int32) - String in group parameters
+ * @param "BooleanGroup" (optional.Bool) - Boolean in group parameters
+ * @param "Int64Group" (optional.Int64) - Integer in group parameters
+ */
+ TestGroupParameters(ctx _context.Context, requiredStringGroup int32, requiredBooleanGroup bool, requiredInt64Group int64, localVarOptionals *TestGroupParametersOpts) (*_nethttp.Response, error)
+
+ /*
+ * TestInlineAdditionalProperties test inline additionalProperties
+ *
+ * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param param request body
+ */
+ TestInlineAdditionalProperties(ctx _context.Context, param map[string]string) (*_nethttp.Response, error)
+
+ /*
+ * 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 param field1
+ * @param param2 field2
+ */
+ TestJsonFormData(ctx _context.Context, param string, param2 string) (*_nethttp.Response, error)
+
+ /*
+ * TestQueryParameterCollectionFormat Method for TestQueryParameterCollectionFormat
+ *
+ * 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 pipe
+ * @param ioutil
+ * @param http
+ * @param url
+ * @param context
+ */
+ TestQueryParameterCollectionFormat(ctx _context.Context, pipe []string, ioutil []string, http []string, url []string, context []string) (*_nethttp.Response, error)
+}
+
// FakeApiService FakeApi service
type FakeApiService service
/*
-CreateXmlItem creates an XmlItem
-this route creates an XmlItem
+ * CreateXmlItem creates an XmlItem
+ *
+ * this route creates an XmlItem
+ *
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param xmlItem XmlItem Body
-*/
+ */
func (a *FakeApiService) CreateXmlItem(ctx _context.Context, xmlItem XmlItem) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
@@ -103,13 +285,15 @@ type FakeOuterBooleanSerializeOpts struct {
}
/*
-FakeOuterBooleanSerialize Method for FakeOuterBooleanSerialize
-Test serialization of outer boolean types
+ * FakeOuterBooleanSerialize Method for FakeOuterBooleanSerialize
+ *
+ * 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 optional nil or *FakeOuterBooleanSerializeOpts - Optional Parameters:
* @param "Body" (optional.Bool) - Input boolean as post body
-@return bool
-*/
+ * @return bool
+ */
func (a *FakeApiService) FakeOuterBooleanSerialize(ctx _context.Context, localVarOptionals *FakeOuterBooleanSerializeOpts) (bool, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
@@ -191,13 +375,15 @@ type FakeOuterCompositeSerializeOpts struct {
}
/*
-FakeOuterCompositeSerialize Method for FakeOuterCompositeSerialize
-Test serialization of object with outer number type
+ * FakeOuterCompositeSerialize Method for FakeOuterCompositeSerialize
+ *
+ * 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 optional nil or *FakeOuterCompositeSerializeOpts - Optional Parameters:
* @param "Body" (optional.Interface of OuterComposite) - Input composite as post body
-@return OuterComposite
-*/
+ * @return OuterComposite
+ */
func (a *FakeApiService) FakeOuterCompositeSerialize(ctx _context.Context, localVarOptionals *FakeOuterCompositeSerializeOpts) (OuterComposite, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
@@ -283,13 +469,15 @@ type FakeOuterNumberSerializeOpts struct {
}
/*
-FakeOuterNumberSerialize Method for FakeOuterNumberSerialize
-Test serialization of outer number types
+ * FakeOuterNumberSerialize Method for FakeOuterNumberSerialize
+ *
+ * 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 optional nil or *FakeOuterNumberSerializeOpts - Optional Parameters:
* @param "Body" (optional.Float32) - Input number as post body
-@return float32
-*/
+ * @return float32
+ */
func (a *FakeApiService) FakeOuterNumberSerialize(ctx _context.Context, localVarOptionals *FakeOuterNumberSerializeOpts) (float32, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
@@ -371,13 +559,15 @@ type FakeOuterStringSerializeOpts struct {
}
/*
-FakeOuterStringSerialize Method for FakeOuterStringSerialize
-Test serialization of outer string types
+ * FakeOuterStringSerialize Method for FakeOuterStringSerialize
+ *
+ * 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 optional nil or *FakeOuterStringSerializeOpts - Optional Parameters:
* @param "Body" (optional.String) - Input string as post body
-@return string
-*/
+ * @return string
+ */
func (a *FakeApiService) FakeOuterStringSerialize(ctx _context.Context, localVarOptionals *FakeOuterStringSerializeOpts) (string, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
@@ -454,11 +644,13 @@ func (a *FakeApiService) FakeOuterStringSerialize(ctx _context.Context, localVar
}
/*
-TestBodyWithFileSchema Method for TestBodyWithFileSchema
-For this test, the body for this request much reference a schema named `File`.
+ * TestBodyWithFileSchema Method for TestBodyWithFileSchema
+ *
+ * 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 body
-*/
+ */
func (a *FakeApiService) TestBodyWithFileSchema(ctx _context.Context, body FileSchemaTestClass) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPut
@@ -522,11 +714,12 @@ func (a *FakeApiService) TestBodyWithFileSchema(ctx _context.Context, body FileS
}
/*
-TestBodyWithQueryParams Method for TestBodyWithQueryParams
+ * TestBodyWithQueryParams Method for TestBodyWithQueryParams
+ *
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param query
* @param body
-*/
+ */
func (a *FakeApiService) TestBodyWithQueryParams(ctx _context.Context, query string, body User) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPut
@@ -591,12 +784,14 @@ func (a *FakeApiService) TestBodyWithQueryParams(ctx _context.Context, query str
}
/*
-TestClientModel To test \"client\" model
-To test \"client\" model
+ * TestClientModel To test \"client\" model
+ *
+ * To test \"client\" model
+ *
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param body client model
-@return Client
-*/
+ * @return Client
+ */
func (a *FakeApiService) TestClientModel(ctx _context.Context, body Client) (Client, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPatch
@@ -684,8 +879,10 @@ type TestEndpointParametersOpts struct {
}
/*
-TestEndpointParameters Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
-Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+ * TestEndpointParameters Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+ *
+ * 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 number None
* @param double None
@@ -702,7 +899,7 @@ Fake endpoint for testing various parameters 假端點 偽のエンドポイ
* @param "DateTime" (optional.Time) - None
* @param "Password" (optional.String) - None
* @param "Callback" (optional.String) - None
-*/
+ */
func (a *FakeApiService) TestEndpointParameters(ctx _context.Context, number float32, double float64, patternWithoutDelimiter string, byte_ string, localVarOptionals *TestEndpointParametersOpts) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
@@ -834,8 +1031,10 @@ type TestEnumParametersOpts struct {
}
/*
-TestEnumParameters To test enum parameters
-To test enum parameters
+ * TestEnumParameters To test enum parameters
+ *
+ * To test enum parameters
+ *
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param optional nil or *TestEnumParametersOpts - Optional Parameters:
* @param "EnumHeaderStringArray" (optional.Interface of []string) - Header parameter enum test (string array)
@@ -846,7 +1045,7 @@ To test enum parameters
* @param "EnumQueryDouble" (optional.Float64) - Query parameter enum test (double)
* @param "EnumFormStringArray" (optional.Interface of []string) - Form parameter enum test (string array)
* @param "EnumFormString" (optional.String) - Form parameter enum test (string)
-*/
+ */
func (a *FakeApiService) TestEnumParameters(ctx _context.Context, localVarOptionals *TestEnumParametersOpts) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
@@ -939,8 +1138,10 @@ type TestGroupParametersOpts struct {
}
/*
-TestGroupParameters Fake endpoint to test group parameters (optional)
-Fake endpoint to test group parameters (optional)
+ * TestGroupParameters Fake endpoint to test group parameters (optional)
+ *
+ * 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 requiredStringGroup Required String in group parameters
* @param requiredBooleanGroup Required Boolean in group parameters
@@ -949,7 +1150,7 @@ Fake endpoint to test group parameters (optional)
* @param "StringGroup" (optional.Int32) - String in group parameters
* @param "BooleanGroup" (optional.Bool) - Boolean in group parameters
* @param "Int64Group" (optional.Int64) - Integer in group parameters
-*/
+ */
func (a *FakeApiService) TestGroupParameters(ctx _context.Context, requiredStringGroup int32, requiredBooleanGroup bool, requiredInt64Group int64, localVarOptionals *TestGroupParametersOpts) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodDelete
@@ -1023,10 +1224,11 @@ func (a *FakeApiService) TestGroupParameters(ctx _context.Context, requiredStrin
}
/*
-TestInlineAdditionalProperties test inline additionalProperties
+ * TestInlineAdditionalProperties test inline additionalProperties
+ *
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param param request body
-*/
+ */
func (a *FakeApiService) TestInlineAdditionalProperties(ctx _context.Context, param map[string]string) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
@@ -1090,11 +1292,12 @@ func (a *FakeApiService) TestInlineAdditionalProperties(ctx _context.Context, pa
}
/*
-TestJsonFormData test json serialization of form data
+ * 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 param field1
* @param param2 field2
-*/
+ */
func (a *FakeApiService) TestJsonFormData(ctx _context.Context, param string, param2 string) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
@@ -1158,15 +1361,17 @@ func (a *FakeApiService) TestJsonFormData(ctx _context.Context, param string, pa
}
/*
-TestQueryParameterCollectionFormat Method for TestQueryParameterCollectionFormat
-To test the collection format in query parameters
+ * TestQueryParameterCollectionFormat Method for TestQueryParameterCollectionFormat
+ *
+ * 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 pipe
* @param ioutil
* @param http
* @param url
* @param context
-*/
+ */
func (a *FakeApiService) TestQueryParameterCollectionFormat(ctx _context.Context, pipe []string, ioutil []string, http []string, url []string, context []string) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPut
diff --git a/samples/client/petstore/go/go-petstore-withXml/api_fake_classname_tags123.go b/samples/client/petstore/go/go-petstore-withXml/api_fake_classname_tags123.go
index f45ad39eb2af..2125090eeba7 100644
--- a/samples/client/petstore/go/go-petstore-withXml/api_fake_classname_tags123.go
+++ b/samples/client/petstore/go/go-petstore-withXml/api_fake_classname_tags123.go
@@ -23,16 +23,32 @@ var (
_ _context.Context
)
+type FakeClassnameTags123Api interface {
+
+ /*
+ * TestClassname To test class name in snake case
+ *
+ * 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 body client model
+ * @return Client
+ */
+ TestClassname(ctx _context.Context, body Client) (Client, *_nethttp.Response, error)
+}
+
// FakeClassnameTags123ApiService FakeClassnameTags123Api service
type FakeClassnameTags123ApiService service
/*
-TestClassname To test class name in snake case
-To test class name in snake case
+ * TestClassname To test class name in snake case
+ *
+ * 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 body client model
-@return Client
-*/
+ * @return Client
+ */
func (a *FakeClassnameTags123ApiService) TestClassname(ctx _context.Context, body Client) (Client, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPatch
diff --git a/samples/client/petstore/go/go-petstore-withXml/api_pet.go b/samples/client/petstore/go/go-petstore-withXml/api_pet.go
index bd5e210fadca..e10c2a4db464 100644
--- a/samples/client/petstore/go/go-petstore-withXml/api_pet.go
+++ b/samples/client/petstore/go/go-petstore-withXml/api_pet.go
@@ -26,14 +26,112 @@ var (
_ _context.Context
)
+type PetApi interface {
+
+ /*
+ * 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 body Pet object that needs to be added to the store
+ */
+ AddPet(ctx _context.Context, body Pet) (*_nethttp.Response, error)
+
+ /*
+ * DeletePet Deletes a pet
+ *
+ * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param petId Pet id to delete
+ * @param optional nil or *DeletePetOpts - Optional Parameters:
+ * @param "ApiKey" (optional.String) -
+ */
+ DeletePet(ctx _context.Context, petId int64, localVarOptionals *DeletePetOpts) (*_nethttp.Response, error)
+
+ /*
+ * FindPetsByStatus Finds Pets by status
+ *
+ * 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 status Status values that need to be considered for filter
+ * @return []Pet
+ */
+ FindPetsByStatus(ctx _context.Context, status []string) ([]Pet, *_nethttp.Response, error)
+
+ /*
+ * FindPetsByTags Finds Pets by tags
+ *
+ * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
+ *
+ * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param tags Tags to filter by
+ * @return []Pet
+ */
+ FindPetsByTags(ctx _context.Context, tags []string) ([]Pet, *_nethttp.Response, error)
+
+ /*
+ * GetPetById Find pet by ID
+ *
+ * Returns a single pet
+ *
+ * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param petId ID of pet to return
+ * @return Pet
+ */
+ GetPetById(ctx _context.Context, petId int64) (Pet, *_nethttp.Response, error)
+
+ /*
+ * UpdatePet Update an existing pet
+ *
+ * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param body Pet object that needs to be added to the store
+ */
+ UpdatePet(ctx _context.Context, body Pet) (*_nethttp.Response, error)
+
+ /*
+ * UpdatePetWithForm Updates a pet in the store with form data
+ *
+ * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param petId ID of pet that needs to be updated
+ * @param optional nil or *UpdatePetWithFormOpts - Optional Parameters:
+ * @param "Name" (optional.String) - Updated name of the pet
+ * @param "Status" (optional.String) - Updated status of the pet
+ */
+ UpdatePetWithForm(ctx _context.Context, petId int64, localVarOptionals *UpdatePetWithFormOpts) (*_nethttp.Response, error)
+
+ /*
+ * UploadFile uploads an image
+ *
+ * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param petId ID of pet to update
+ * @param optional nil or *UploadFileOpts - Optional Parameters:
+ * @param "AdditionalMetadata" (optional.String) - Additional data to pass to server
+ * @param "File" (optional.Interface of *os.File) - file to upload
+ * @return ApiResponse
+ */
+ UploadFile(ctx _context.Context, petId int64, localVarOptionals *UploadFileOpts) (ApiResponse, *_nethttp.Response, error)
+
+ /*
+ * UploadFileWithRequiredFile uploads an image (required)
+ *
+ * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param petId ID of pet to update
+ * @param requiredFile file to upload
+ * @param optional nil or *UploadFileWithRequiredFileOpts - Optional Parameters:
+ * @param "AdditionalMetadata" (optional.String) - Additional data to pass to server
+ * @return ApiResponse
+ */
+ UploadFileWithRequiredFile(ctx _context.Context, petId int64, requiredFile *os.File, localVarOptionals *UploadFileWithRequiredFileOpts) (ApiResponse, *_nethttp.Response, error)
+}
+
// PetApiService PetApi service
type PetApiService service
/*
-AddPet Add a new pet to the store
+ * 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 body Pet object that needs to be added to the store
-*/
+ */
func (a *PetApiService) AddPet(ctx _context.Context, body Pet) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
@@ -102,12 +200,13 @@ type DeletePetOpts struct {
}
/*
-DeletePet Deletes a pet
+ * DeletePet Deletes a pet
+ *
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param petId Pet id to delete
* @param optional nil or *DeletePetOpts - Optional Parameters:
* @param "ApiKey" (optional.String) -
-*/
+ */
func (a *PetApiService) DeletePet(ctx _context.Context, petId int64, localVarOptionals *DeletePetOpts) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodDelete
@@ -174,12 +273,14 @@ func (a *PetApiService) DeletePet(ctx _context.Context, petId int64, localVarOpt
}
/*
-FindPetsByStatus Finds Pets by status
-Multiple status values can be provided with comma separated strings
+ * FindPetsByStatus Finds Pets by status
+ *
+ * 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 status Status values that need to be considered for filter
-@return []Pet
-*/
+ * @return []Pet
+ */
func (a *PetApiService) FindPetsByStatus(ctx _context.Context, status []string) ([]Pet, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
@@ -252,12 +353,14 @@ func (a *PetApiService) FindPetsByStatus(ctx _context.Context, status []string)
}
/*
-FindPetsByTags Finds Pets by tags
-Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
+ * FindPetsByTags Finds Pets by tags
+ *
+ * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
+ *
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param tags Tags to filter by
-@return []Pet
-*/
+ * @return []Pet
+ */
func (a *PetApiService) FindPetsByTags(ctx _context.Context, tags []string) ([]Pet, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
@@ -330,12 +433,14 @@ func (a *PetApiService) FindPetsByTags(ctx _context.Context, tags []string) ([]P
}
/*
-GetPetById Find pet by ID
-Returns a single pet
+ * GetPetById Find pet by ID
+ *
+ * Returns a single pet
+ *
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param petId ID of pet to return
-@return Pet
-*/
+ * @return Pet
+ */
func (a *PetApiService) GetPetById(ctx _context.Context, petId int64) (Pet, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
@@ -421,10 +526,11 @@ func (a *PetApiService) GetPetById(ctx _context.Context, petId int64) (Pet, *_ne
}
/*
-UpdatePet Update an existing pet
+ * UpdatePet Update an existing pet
+ *
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param body Pet object that needs to be added to the store
-*/
+ */
func (a *PetApiService) UpdatePet(ctx _context.Context, body Pet) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPut
@@ -494,13 +600,14 @@ type UpdatePetWithFormOpts struct {
}
/*
-UpdatePetWithForm Updates a pet in the store with form data
+ * UpdatePetWithForm Updates a pet in the store with form data
+ *
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param petId ID of pet that needs to be updated
* @param optional nil or *UpdatePetWithFormOpts - Optional Parameters:
* @param "Name" (optional.String) - Updated name of the pet
* @param "Status" (optional.String) - Updated status of the pet
-*/
+ */
func (a *PetApiService) UpdatePetWithForm(ctx _context.Context, petId int64, localVarOptionals *UpdatePetWithFormOpts) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
@@ -576,14 +683,15 @@ type UploadFileOpts struct {
}
/*
-UploadFile uploads an image
+ * UploadFile uploads an image
+ *
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param petId ID of pet to update
* @param optional nil or *UploadFileOpts - Optional Parameters:
* @param "AdditionalMetadata" (optional.String) - Additional data to pass to server
* @param "File" (optional.Interface of *os.File) - file to upload
-@return ApiResponse
-*/
+ * @return ApiResponse
+ */
func (a *PetApiService) UploadFile(ctx _context.Context, petId int64, localVarOptionals *UploadFileOpts) (ApiResponse, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
@@ -680,14 +788,15 @@ type UploadFileWithRequiredFileOpts struct {
}
/*
-UploadFileWithRequiredFile uploads an image (required)
+ * UploadFileWithRequiredFile uploads an image (required)
+ *
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param petId ID of pet to update
* @param requiredFile file to upload
* @param optional nil or *UploadFileWithRequiredFileOpts - Optional Parameters:
* @param "AdditionalMetadata" (optional.String) - Additional data to pass to server
-@return ApiResponse
-*/
+ * @return ApiResponse
+ */
func (a *PetApiService) UploadFileWithRequiredFile(ctx _context.Context, petId int64, requiredFile *os.File, localVarOptionals *UploadFileWithRequiredFileOpts) (ApiResponse, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
diff --git a/samples/client/petstore/go/go-petstore-withXml/api_store.go b/samples/client/petstore/go/go-petstore-withXml/api_store.go
index e66437db5dfa..9064808b3dad 100644
--- a/samples/client/petstore/go/go-petstore-withXml/api_store.go
+++ b/samples/client/petstore/go/go-petstore-withXml/api_store.go
@@ -24,15 +24,60 @@ var (
_ _context.Context
)
+type StoreApi interface {
+
+ /*
+ * DeleteOrder Delete purchase order by ID
+ *
+ * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
+ *
+ * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param orderId ID of the order that needs to be deleted
+ */
+ DeleteOrder(ctx _context.Context, orderId string) (*_nethttp.Response, error)
+
+ /*
+ * GetInventory Returns pet inventories by status
+ *
+ * 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().
+ * @return map[string]int32
+ */
+ GetInventory(ctx _context.Context) (map[string]int32, *_nethttp.Response, error)
+
+ /*
+ * GetOrderById Find purchase order by ID
+ *
+ * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
+ *
+ * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param orderId ID of pet that needs to be fetched
+ * @return Order
+ */
+ GetOrderById(ctx _context.Context, orderId int64) (Order, *_nethttp.Response, error)
+
+ /*
+ * 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 body order placed for purchasing the pet
+ * @return Order
+ */
+ PlaceOrder(ctx _context.Context, body Order) (Order, *_nethttp.Response, error)
+}
+
// StoreApiService StoreApi service
type StoreApiService service
/*
-DeleteOrder Delete purchase order by ID
-For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
+ * DeleteOrder Delete purchase order by ID
+ *
+ * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
+ *
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param orderId ID of the order that needs to be deleted
-*/
+ */
func (a *StoreApiService) DeleteOrder(ctx _context.Context, orderId string) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodDelete
@@ -96,11 +141,13 @@ func (a *StoreApiService) DeleteOrder(ctx _context.Context, orderId string) (*_n
}
/*
-GetInventory Returns pet inventories by status
-Returns a map of status codes to quantities
+ * GetInventory Returns pet inventories by status
+ *
+ * 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().
-@return map[string]int32
-*/
+ * @return map[string]int32
+ */
func (a *StoreApiService) GetInventory(ctx _context.Context) (map[string]int32, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
@@ -184,12 +231,14 @@ func (a *StoreApiService) GetInventory(ctx _context.Context) (map[string]int32,
}
/*
-GetOrderById Find purchase order by ID
-For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
+ * GetOrderById Find purchase order by ID
+ *
+ * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
+ *
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param orderId ID of pet that needs to be fetched
-@return Order
-*/
+ * @return Order
+ */
func (a *StoreApiService) GetOrderById(ctx _context.Context, orderId int64) (Order, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
@@ -269,11 +318,12 @@ func (a *StoreApiService) GetOrderById(ctx _context.Context, orderId int64) (Ord
}
/*
-PlaceOrder Place an order for a pet
+ * 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 body order placed for purchasing the pet
-@return Order
-*/
+ * @return Order
+ */
func (a *StoreApiService) PlaceOrder(ctx _context.Context, body Order) (Order, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
diff --git a/samples/client/petstore/go/go-petstore-withXml/api_user.go b/samples/client/petstore/go/go-petstore-withXml/api_user.go
index 88bdf94e6246..d5589f3d0ea6 100644
--- a/samples/client/petstore/go/go-petstore-withXml/api_user.go
+++ b/samples/client/petstore/go/go-petstore-withXml/api_user.go
@@ -24,15 +24,93 @@ var (
_ _context.Context
)
+type UserApi interface {
+
+ /*
+ * CreateUser Create user
+ *
+ * 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 body Created user object
+ */
+ CreateUser(ctx _context.Context, body User) (*_nethttp.Response, error)
+
+ /*
+ * 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 body List of user object
+ */
+ CreateUsersWithArrayInput(ctx _context.Context, body []User) (*_nethttp.Response, error)
+
+ /*
+ * 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 body List of user object
+ */
+ CreateUsersWithListInput(ctx _context.Context, body []User) (*_nethttp.Response, error)
+
+ /*
+ * DeleteUser Delete user
+ *
+ * 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 username The name that needs to be deleted
+ */
+ DeleteUser(ctx _context.Context, username string) (*_nethttp.Response, error)
+
+ /*
+ * GetUserByName Get user by user name
+ *
+ * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param username The name that needs to be fetched. Use user1 for testing.
+ * @return User
+ */
+ GetUserByName(ctx _context.Context, username string) (User, *_nethttp.Response, error)
+
+ /*
+ * 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 username The user name for login
+ * @param password The password for login in clear text
+ * @return string
+ */
+ LoginUser(ctx _context.Context, username string, password string) (string, *_nethttp.Response, error)
+
+ /*
+ * 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().
+ */
+ LogoutUser(ctx _context.Context) (*_nethttp.Response, error)
+
+ /*
+ * UpdateUser Updated user
+ *
+ * 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 username name that need to be deleted
+ * @param body Updated user object
+ */
+ UpdateUser(ctx _context.Context, username string, body User) (*_nethttp.Response, error)
+}
+
// UserApiService UserApi service
type UserApiService service
/*
-CreateUser Create user
-This can only be done by the logged in user.
+ * CreateUser Create user
+ *
+ * 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 body Created user object
-*/
+ */
func (a *UserApiService) CreateUser(ctx _context.Context, body User) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
@@ -96,10 +174,11 @@ func (a *UserApiService) CreateUser(ctx _context.Context, body User) (*_nethttp.
}
/*
-CreateUsersWithArrayInput Creates list of users with given input array
+ * 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 body List of user object
-*/
+ */
func (a *UserApiService) CreateUsersWithArrayInput(ctx _context.Context, body []User) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
@@ -163,10 +242,11 @@ func (a *UserApiService) CreateUsersWithArrayInput(ctx _context.Context, body []
}
/*
-CreateUsersWithListInput Creates list of users with given input array
+ * 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 body List of user object
-*/
+ */
func (a *UserApiService) CreateUsersWithListInput(ctx _context.Context, body []User) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
@@ -230,11 +310,13 @@ func (a *UserApiService) CreateUsersWithListInput(ctx _context.Context, body []U
}
/*
-DeleteUser Delete user
-This can only be done by the logged in user.
+ * DeleteUser Delete user
+ *
+ * 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 username The name that needs to be deleted
-*/
+ */
func (a *UserApiService) DeleteUser(ctx _context.Context, username string) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodDelete
@@ -298,11 +380,12 @@ func (a *UserApiService) DeleteUser(ctx _context.Context, username string) (*_ne
}
/*
-GetUserByName Get user by user name
+ * GetUserByName Get user by user name
+ *
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param username The name that needs to be fetched. Use user1 for testing.
-@return User
-*/
+ * @return User
+ */
func (a *UserApiService) GetUserByName(ctx _context.Context, username string) (User, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
@@ -376,12 +459,13 @@ func (a *UserApiService) GetUserByName(ctx _context.Context, username string) (U
}
/*
-LoginUser Logs user into the system
+ * 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 username The user name for login
* @param password The password for login in clear text
-@return string
-*/
+ * @return string
+ */
func (a *UserApiService) LoginUser(ctx _context.Context, username string, password string) (string, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
@@ -455,9 +539,10 @@ func (a *UserApiService) LoginUser(ctx _context.Context, username string, passwo
}
/*
-LogoutUser Logs out current logged in user session
+ * 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().
-*/
+ */
func (a *UserApiService) LogoutUser(ctx _context.Context) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
@@ -519,12 +604,14 @@ func (a *UserApiService) LogoutUser(ctx _context.Context) (*_nethttp.Response, e
}
/*
-UpdateUser Updated user
-This can only be done by the logged in user.
+ * UpdateUser Updated user
+ *
+ * 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 username name that need to be deleted
* @param body Updated user object
-*/
+ */
func (a *UserApiService) UpdateUser(ctx _context.Context, username string, body User) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPut
diff --git a/samples/client/petstore/go/go-petstore-withXml/client.go b/samples/client/petstore/go/go-petstore-withXml/client.go
index 00f4296fa6f0..5742286abc01 100644
--- a/samples/client/petstore/go/go-petstore-withXml/client.go
+++ b/samples/client/petstore/go/go-petstore-withXml/client.go
@@ -49,17 +49,17 @@ type APIClient struct {
// API Services
- AnotherFakeApi *AnotherFakeApiService
+ AnotherFakeApi AnotherFakeApi
- FakeApi *FakeApiService
+ FakeApi FakeApi
- FakeClassnameTags123Api *FakeClassnameTags123ApiService
+ FakeClassnameTags123Api FakeClassnameTags123Api
- PetApi *PetApiService
+ PetApi PetApi
- StoreApi *StoreApiService
+ StoreApi StoreApi
- UserApi *UserApiService
+ UserApi UserApi
}
type service struct {
diff --git a/samples/client/petstore/go/go-petstore/api_another_fake.go b/samples/client/petstore/go/go-petstore/api_another_fake.go
index 21d088438e8a..ab06c6e93fac 100644
--- a/samples/client/petstore/go/go-petstore/api_another_fake.go
+++ b/samples/client/petstore/go/go-petstore/api_another_fake.go
@@ -26,12 +26,14 @@ var (
type AnotherFakeApiService service
/*
-Call123TestSpecialTags To test special tags
-To test special tags and operation ID starting with number
+ * Call123TestSpecialTags To test special tags
+ *
+ * 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 body client model
-@return Client
-*/
+ * @return Client
+ */
func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx _context.Context, body Client) (Client, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPatch
diff --git a/samples/client/petstore/go/go-petstore/api_fake.go b/samples/client/petstore/go/go-petstore/api_fake.go
index da9cdaac23b1..60b5cede6bd9 100644
--- a/samples/client/petstore/go/go-petstore/api_fake.go
+++ b/samples/client/petstore/go/go-petstore/api_fake.go
@@ -29,11 +29,13 @@ var (
type FakeApiService service
/*
-CreateXmlItem creates an XmlItem
-this route creates an XmlItem
+ * CreateXmlItem creates an XmlItem
+ *
+ * this route creates an XmlItem
+ *
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param xmlItem XmlItem Body
-*/
+ */
func (a *FakeApiService) CreateXmlItem(ctx _context.Context, xmlItem XmlItem) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
@@ -102,13 +104,15 @@ type FakeOuterBooleanSerializeOpts struct {
}
/*
-FakeOuterBooleanSerialize Method for FakeOuterBooleanSerialize
-Test serialization of outer boolean types
+ * FakeOuterBooleanSerialize Method for FakeOuterBooleanSerialize
+ *
+ * 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 optional nil or *FakeOuterBooleanSerializeOpts - Optional Parameters:
* @param "Body" (optional.Bool) - Input boolean as post body
-@return bool
-*/
+ * @return bool
+ */
func (a *FakeApiService) FakeOuterBooleanSerialize(ctx _context.Context, localVarOptionals *FakeOuterBooleanSerializeOpts) (bool, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
@@ -190,13 +194,15 @@ type FakeOuterCompositeSerializeOpts struct {
}
/*
-FakeOuterCompositeSerialize Method for FakeOuterCompositeSerialize
-Test serialization of object with outer number type
+ * FakeOuterCompositeSerialize Method for FakeOuterCompositeSerialize
+ *
+ * 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 optional nil or *FakeOuterCompositeSerializeOpts - Optional Parameters:
* @param "Body" (optional.Interface of OuterComposite) - Input composite as post body
-@return OuterComposite
-*/
+ * @return OuterComposite
+ */
func (a *FakeApiService) FakeOuterCompositeSerialize(ctx _context.Context, localVarOptionals *FakeOuterCompositeSerializeOpts) (OuterComposite, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
@@ -282,13 +288,15 @@ type FakeOuterNumberSerializeOpts struct {
}
/*
-FakeOuterNumberSerialize Method for FakeOuterNumberSerialize
-Test serialization of outer number types
+ * FakeOuterNumberSerialize Method for FakeOuterNumberSerialize
+ *
+ * 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 optional nil or *FakeOuterNumberSerializeOpts - Optional Parameters:
* @param "Body" (optional.Float32) - Input number as post body
-@return float32
-*/
+ * @return float32
+ */
func (a *FakeApiService) FakeOuterNumberSerialize(ctx _context.Context, localVarOptionals *FakeOuterNumberSerializeOpts) (float32, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
@@ -370,13 +378,15 @@ type FakeOuterStringSerializeOpts struct {
}
/*
-FakeOuterStringSerialize Method for FakeOuterStringSerialize
-Test serialization of outer string types
+ * FakeOuterStringSerialize Method for FakeOuterStringSerialize
+ *
+ * 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 optional nil or *FakeOuterStringSerializeOpts - Optional Parameters:
* @param "Body" (optional.String) - Input string as post body
-@return string
-*/
+ * @return string
+ */
func (a *FakeApiService) FakeOuterStringSerialize(ctx _context.Context, localVarOptionals *FakeOuterStringSerializeOpts) (string, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
@@ -453,11 +463,13 @@ func (a *FakeApiService) FakeOuterStringSerialize(ctx _context.Context, localVar
}
/*
-TestBodyWithFileSchema Method for TestBodyWithFileSchema
-For this test, the body for this request much reference a schema named `File`.
+ * TestBodyWithFileSchema Method for TestBodyWithFileSchema
+ *
+ * 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 body
-*/
+ */
func (a *FakeApiService) TestBodyWithFileSchema(ctx _context.Context, body FileSchemaTestClass) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPut
@@ -521,11 +533,12 @@ func (a *FakeApiService) TestBodyWithFileSchema(ctx _context.Context, body FileS
}
/*
-TestBodyWithQueryParams Method for TestBodyWithQueryParams
+ * TestBodyWithQueryParams Method for TestBodyWithQueryParams
+ *
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param query
* @param body
-*/
+ */
func (a *FakeApiService) TestBodyWithQueryParams(ctx _context.Context, query string, body User) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPut
@@ -590,12 +603,14 @@ func (a *FakeApiService) TestBodyWithQueryParams(ctx _context.Context, query str
}
/*
-TestClientModel To test \"client\" model
-To test \"client\" model
+ * TestClientModel To test \"client\" model
+ *
+ * To test \"client\" model
+ *
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param body client model
-@return Client
-*/
+ * @return Client
+ */
func (a *FakeApiService) TestClientModel(ctx _context.Context, body Client) (Client, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPatch
@@ -683,8 +698,10 @@ type TestEndpointParametersOpts struct {
}
/*
-TestEndpointParameters Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
-Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+ * TestEndpointParameters Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+ *
+ * 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 number None
* @param double None
@@ -701,7 +718,7 @@ Fake endpoint for testing various parameters 假端點 偽のエンドポイ
* @param "DateTime" (optional.Time) - None
* @param "Password" (optional.String) - None
* @param "Callback" (optional.String) - None
-*/
+ */
func (a *FakeApiService) TestEndpointParameters(ctx _context.Context, number float32, double float64, patternWithoutDelimiter string, byte_ string, localVarOptionals *TestEndpointParametersOpts) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
@@ -833,8 +850,10 @@ type TestEnumParametersOpts struct {
}
/*
-TestEnumParameters To test enum parameters
-To test enum parameters
+ * TestEnumParameters To test enum parameters
+ *
+ * To test enum parameters
+ *
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param optional nil or *TestEnumParametersOpts - Optional Parameters:
* @param "EnumHeaderStringArray" (optional.Interface of []string) - Header parameter enum test (string array)
@@ -845,7 +864,7 @@ To test enum parameters
* @param "EnumQueryDouble" (optional.Float64) - Query parameter enum test (double)
* @param "EnumFormStringArray" (optional.Interface of []string) - Form parameter enum test (string array)
* @param "EnumFormString" (optional.String) - Form parameter enum test (string)
-*/
+ */
func (a *FakeApiService) TestEnumParameters(ctx _context.Context, localVarOptionals *TestEnumParametersOpts) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
@@ -938,8 +957,10 @@ type TestGroupParametersOpts struct {
}
/*
-TestGroupParameters Fake endpoint to test group parameters (optional)
-Fake endpoint to test group parameters (optional)
+ * TestGroupParameters Fake endpoint to test group parameters (optional)
+ *
+ * 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 requiredStringGroup Required String in group parameters
* @param requiredBooleanGroup Required Boolean in group parameters
@@ -948,7 +969,7 @@ Fake endpoint to test group parameters (optional)
* @param "StringGroup" (optional.Int32) - String in group parameters
* @param "BooleanGroup" (optional.Bool) - Boolean in group parameters
* @param "Int64Group" (optional.Int64) - Integer in group parameters
-*/
+ */
func (a *FakeApiService) TestGroupParameters(ctx _context.Context, requiredStringGroup int32, requiredBooleanGroup bool, requiredInt64Group int64, localVarOptionals *TestGroupParametersOpts) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodDelete
@@ -1022,10 +1043,11 @@ func (a *FakeApiService) TestGroupParameters(ctx _context.Context, requiredStrin
}
/*
-TestInlineAdditionalProperties test inline additionalProperties
+ * TestInlineAdditionalProperties test inline additionalProperties
+ *
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param param request body
-*/
+ */
func (a *FakeApiService) TestInlineAdditionalProperties(ctx _context.Context, param map[string]string) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
@@ -1089,11 +1111,12 @@ func (a *FakeApiService) TestInlineAdditionalProperties(ctx _context.Context, pa
}
/*
-TestJsonFormData test json serialization of form data
+ * 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 param field1
* @param param2 field2
-*/
+ */
func (a *FakeApiService) TestJsonFormData(ctx _context.Context, param string, param2 string) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
@@ -1157,15 +1180,17 @@ func (a *FakeApiService) TestJsonFormData(ctx _context.Context, param string, pa
}
/*
-TestQueryParameterCollectionFormat Method for TestQueryParameterCollectionFormat
-To test the collection format in query parameters
+ * TestQueryParameterCollectionFormat Method for TestQueryParameterCollectionFormat
+ *
+ * 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 pipe
* @param ioutil
* @param http
* @param url
* @param context
-*/
+ */
func (a *FakeApiService) TestQueryParameterCollectionFormat(ctx _context.Context, pipe []string, ioutil []string, http []string, url []string, context []string) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPut
diff --git a/samples/client/petstore/go/go-petstore/api_fake_classname_tags123.go b/samples/client/petstore/go/go-petstore/api_fake_classname_tags123.go
index edd549a329da..a57ae520af59 100644
--- a/samples/client/petstore/go/go-petstore/api_fake_classname_tags123.go
+++ b/samples/client/petstore/go/go-petstore/api_fake_classname_tags123.go
@@ -26,12 +26,14 @@ var (
type FakeClassnameTags123ApiService service
/*
-TestClassname To test class name in snake case
-To test class name in snake case
+ * TestClassname To test class name in snake case
+ *
+ * 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 body client model
-@return Client
-*/
+ * @return Client
+ */
func (a *FakeClassnameTags123ApiService) TestClassname(ctx _context.Context, body Client) (Client, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPatch
diff --git a/samples/client/petstore/go/go-petstore/api_pet.go b/samples/client/petstore/go/go-petstore/api_pet.go
index 0a20263a3072..e4e0b0d49829 100644
--- a/samples/client/petstore/go/go-petstore/api_pet.go
+++ b/samples/client/petstore/go/go-petstore/api_pet.go
@@ -29,10 +29,11 @@ var (
type PetApiService service
/*
-AddPet Add a new pet to the store
+ * 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 body Pet object that needs to be added to the store
-*/
+ */
func (a *PetApiService) AddPet(ctx _context.Context, body Pet) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
@@ -101,12 +102,13 @@ type DeletePetOpts struct {
}
/*
-DeletePet Deletes a pet
+ * DeletePet Deletes a pet
+ *
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param petId Pet id to delete
* @param optional nil or *DeletePetOpts - Optional Parameters:
* @param "ApiKey" (optional.String) -
-*/
+ */
func (a *PetApiService) DeletePet(ctx _context.Context, petId int64, localVarOptionals *DeletePetOpts) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodDelete
@@ -173,12 +175,14 @@ func (a *PetApiService) DeletePet(ctx _context.Context, petId int64, localVarOpt
}
/*
-FindPetsByStatus Finds Pets by status
-Multiple status values can be provided with comma separated strings
+ * FindPetsByStatus Finds Pets by status
+ *
+ * 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 status Status values that need to be considered for filter
-@return []Pet
-*/
+ * @return []Pet
+ */
func (a *PetApiService) FindPetsByStatus(ctx _context.Context, status []string) ([]Pet, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
@@ -251,12 +255,14 @@ func (a *PetApiService) FindPetsByStatus(ctx _context.Context, status []string)
}
/*
-FindPetsByTags Finds Pets by tags
-Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
+ * FindPetsByTags Finds Pets by tags
+ *
+ * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
+ *
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param tags Tags to filter by
-@return []Pet
-*/
+ * @return []Pet
+ */
func (a *PetApiService) FindPetsByTags(ctx _context.Context, tags []string) ([]Pet, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
@@ -329,12 +335,14 @@ func (a *PetApiService) FindPetsByTags(ctx _context.Context, tags []string) ([]P
}
/*
-GetPetById Find pet by ID
-Returns a single pet
+ * GetPetById Find pet by ID
+ *
+ * Returns a single pet
+ *
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param petId ID of pet to return
-@return Pet
-*/
+ * @return Pet
+ */
func (a *PetApiService) GetPetById(ctx _context.Context, petId int64) (Pet, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
@@ -420,10 +428,11 @@ func (a *PetApiService) GetPetById(ctx _context.Context, petId int64) (Pet, *_ne
}
/*
-UpdatePet Update an existing pet
+ * UpdatePet Update an existing pet
+ *
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param body Pet object that needs to be added to the store
-*/
+ */
func (a *PetApiService) UpdatePet(ctx _context.Context, body Pet) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPut
@@ -493,13 +502,14 @@ type UpdatePetWithFormOpts struct {
}
/*
-UpdatePetWithForm Updates a pet in the store with form data
+ * UpdatePetWithForm Updates a pet in the store with form data
+ *
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param petId ID of pet that needs to be updated
* @param optional nil or *UpdatePetWithFormOpts - Optional Parameters:
* @param "Name" (optional.String) - Updated name of the pet
* @param "Status" (optional.String) - Updated status of the pet
-*/
+ */
func (a *PetApiService) UpdatePetWithForm(ctx _context.Context, petId int64, localVarOptionals *UpdatePetWithFormOpts) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
@@ -575,14 +585,15 @@ type UploadFileOpts struct {
}
/*
-UploadFile uploads an image
+ * UploadFile uploads an image
+ *
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param petId ID of pet to update
* @param optional nil or *UploadFileOpts - Optional Parameters:
* @param "AdditionalMetadata" (optional.String) - Additional data to pass to server
* @param "File" (optional.Interface of *os.File) - file to upload
-@return ApiResponse
-*/
+ * @return ApiResponse
+ */
func (a *PetApiService) UploadFile(ctx _context.Context, petId int64, localVarOptionals *UploadFileOpts) (ApiResponse, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
@@ -679,14 +690,15 @@ type UploadFileWithRequiredFileOpts struct {
}
/*
-UploadFileWithRequiredFile uploads an image (required)
+ * UploadFileWithRequiredFile uploads an image (required)
+ *
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param petId ID of pet to update
* @param requiredFile file to upload
* @param optional nil or *UploadFileWithRequiredFileOpts - Optional Parameters:
* @param "AdditionalMetadata" (optional.String) - Additional data to pass to server
-@return ApiResponse
-*/
+ * @return ApiResponse
+ */
func (a *PetApiService) UploadFileWithRequiredFile(ctx _context.Context, petId int64, requiredFile *os.File, localVarOptionals *UploadFileWithRequiredFileOpts) (ApiResponse, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
diff --git a/samples/client/petstore/go/go-petstore/api_store.go b/samples/client/petstore/go/go-petstore/api_store.go
index 150168fb6ff5..d85adb592216 100644
--- a/samples/client/petstore/go/go-petstore/api_store.go
+++ b/samples/client/petstore/go/go-petstore/api_store.go
@@ -27,11 +27,13 @@ var (
type StoreApiService service
/*
-DeleteOrder Delete purchase order by ID
-For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
+ * DeleteOrder Delete purchase order by ID
+ *
+ * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
+ *
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param orderId ID of the order that needs to be deleted
-*/
+ */
func (a *StoreApiService) DeleteOrder(ctx _context.Context, orderId string) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodDelete
@@ -95,11 +97,13 @@ func (a *StoreApiService) DeleteOrder(ctx _context.Context, orderId string) (*_n
}
/*
-GetInventory Returns pet inventories by status
-Returns a map of status codes to quantities
+ * GetInventory Returns pet inventories by status
+ *
+ * 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().
-@return map[string]int32
-*/
+ * @return map[string]int32
+ */
func (a *StoreApiService) GetInventory(ctx _context.Context) (map[string]int32, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
@@ -183,12 +187,14 @@ func (a *StoreApiService) GetInventory(ctx _context.Context) (map[string]int32,
}
/*
-GetOrderById Find purchase order by ID
-For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
+ * GetOrderById Find purchase order by ID
+ *
+ * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
+ *
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param orderId ID of pet that needs to be fetched
-@return Order
-*/
+ * @return Order
+ */
func (a *StoreApiService) GetOrderById(ctx _context.Context, orderId int64) (Order, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
@@ -268,11 +274,12 @@ func (a *StoreApiService) GetOrderById(ctx _context.Context, orderId int64) (Ord
}
/*
-PlaceOrder Place an order for a pet
+ * 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 body order placed for purchasing the pet
-@return Order
-*/
+ * @return Order
+ */
func (a *StoreApiService) PlaceOrder(ctx _context.Context, body Order) (Order, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
diff --git a/samples/client/petstore/go/go-petstore/api_user.go b/samples/client/petstore/go/go-petstore/api_user.go
index e2e4871f3311..2ac2969f714e 100644
--- a/samples/client/petstore/go/go-petstore/api_user.go
+++ b/samples/client/petstore/go/go-petstore/api_user.go
@@ -27,11 +27,13 @@ var (
type UserApiService service
/*
-CreateUser Create user
-This can only be done by the logged in user.
+ * CreateUser Create user
+ *
+ * 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 body Created user object
-*/
+ */
func (a *UserApiService) CreateUser(ctx _context.Context, body User) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
@@ -95,10 +97,11 @@ func (a *UserApiService) CreateUser(ctx _context.Context, body User) (*_nethttp.
}
/*
-CreateUsersWithArrayInput Creates list of users with given input array
+ * 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 body List of user object
-*/
+ */
func (a *UserApiService) CreateUsersWithArrayInput(ctx _context.Context, body []User) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
@@ -162,10 +165,11 @@ func (a *UserApiService) CreateUsersWithArrayInput(ctx _context.Context, body []
}
/*
-CreateUsersWithListInput Creates list of users with given input array
+ * 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 body List of user object
-*/
+ */
func (a *UserApiService) CreateUsersWithListInput(ctx _context.Context, body []User) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
@@ -229,11 +233,13 @@ func (a *UserApiService) CreateUsersWithListInput(ctx _context.Context, body []U
}
/*
-DeleteUser Delete user
-This can only be done by the logged in user.
+ * DeleteUser Delete user
+ *
+ * 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 username The name that needs to be deleted
-*/
+ */
func (a *UserApiService) DeleteUser(ctx _context.Context, username string) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodDelete
@@ -297,11 +303,12 @@ func (a *UserApiService) DeleteUser(ctx _context.Context, username string) (*_ne
}
/*
-GetUserByName Get user by user name
+ * GetUserByName Get user by user name
+ *
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param username The name that needs to be fetched. Use user1 for testing.
-@return User
-*/
+ * @return User
+ */
func (a *UserApiService) GetUserByName(ctx _context.Context, username string) (User, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
@@ -375,12 +382,13 @@ func (a *UserApiService) GetUserByName(ctx _context.Context, username string) (U
}
/*
-LoginUser Logs user into the system
+ * 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 username The user name for login
* @param password The password for login in clear text
-@return string
-*/
+ * @return string
+ */
func (a *UserApiService) LoginUser(ctx _context.Context, username string, password string) (string, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
@@ -454,9 +462,10 @@ func (a *UserApiService) LoginUser(ctx _context.Context, username string, passwo
}
/*
-LogoutUser Logs out current logged in user session
+ * 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().
-*/
+ */
func (a *UserApiService) LogoutUser(ctx _context.Context) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
@@ -518,12 +527,14 @@ func (a *UserApiService) LogoutUser(ctx _context.Context) (*_nethttp.Response, e
}
/*
-UpdateUser Updated user
-This can only be done by the logged in user.
+ * UpdateUser Updated user
+ *
+ * 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 username name that need to be deleted
* @param body Updated user object
-*/
+ */
func (a *UserApiService) UpdateUser(ctx _context.Context, username string, body User) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPut
diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/api_another_fake.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_another_fake.go
index 4aed6e7c47c5..9b66a604a4fc 100644
--- a/samples/openapi3/client/petstore/go-experimental/go-petstore/api_another_fake.go
+++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_another_fake.go
@@ -21,37 +21,59 @@ var (
_ _context.Context
)
+type AnotherFakeApi interface {
+
+ /*
+ * Call123TestSpecialTags To test special tags
+ * 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().
+ * @return ApiCall123TestSpecialTagsRequest
+ */
+ Call123TestSpecialTags(ctx _context.Context) ApiCall123TestSpecialTagsRequest
+
+ /*
+ * Call123TestSpecialTagsExecute executes the request
+ * @return Client
+ */
+ Call123TestSpecialTagsExecute(r ApiCall123TestSpecialTagsRequest) (Client, *_nethttp.Response, error)
+}
+
// AnotherFakeApiService AnotherFakeApi service
type AnotherFakeApiService service
-type apiCall123TestSpecialTagsRequest struct {
+type ApiCall123TestSpecialTagsRequest struct {
ctx _context.Context
- apiService *AnotherFakeApiService
+ ApiService AnotherFakeApi
client *Client
}
-func (r apiCall123TestSpecialTagsRequest) Client(client Client) apiCall123TestSpecialTagsRequest {
+func (r ApiCall123TestSpecialTagsRequest) Client(client Client) ApiCall123TestSpecialTagsRequest {
r.client = &client
return r
}
+
+func (r ApiCall123TestSpecialTagsRequest) Execute() (Client, *_nethttp.Response, error) {
+ return r.ApiService.Call123TestSpecialTagsExecute(r)
+}
+
/*
-Call123TestSpecialTags To test special tags
-To test special tags and operation ID starting with number
+ * Call123TestSpecialTags To test special tags
+ * 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().
-@return apiCall123TestSpecialTagsRequest
-*/
-func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx _context.Context) apiCall123TestSpecialTagsRequest {
- return apiCall123TestSpecialTagsRequest{
- apiService: a,
+ * @return ApiCall123TestSpecialTagsRequest
+ */
+func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx _context.Context) ApiCall123TestSpecialTagsRequest {
+ return ApiCall123TestSpecialTagsRequest{
+ ApiService: a,
ctx: ctx,
}
}
/*
-Execute executes the request
-@return Client
-*/
-func (r apiCall123TestSpecialTagsRequest) Execute() (Client, *_nethttp.Response, error) {
+ * Execute executes the request
+ * @return Client
+ */
+func (a *AnotherFakeApiService) Call123TestSpecialTagsExecute(r ApiCall123TestSpecialTagsRequest) (Client, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPatch
localVarPostBody interface{}
@@ -61,7 +83,7 @@ func (r apiCall123TestSpecialTagsRequest) Execute() (Client, *_nethttp.Response,
localVarReturnValue Client
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "AnotherFakeApiService.Call123TestSpecialTags")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AnotherFakeApiService.Call123TestSpecialTags")
if err != nil {
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
}
@@ -94,12 +116,12 @@ func (r apiCall123TestSpecialTagsRequest) Execute() (Client, *_nethttp.Response,
}
// body params
localVarPostBody = r.client
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return localVarReturnValue, nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarReturnValue, localVarHTTPResponse, err
}
@@ -118,7 +140,7 @@ func (r apiCall123TestSpecialTagsRequest) Execute() (Client, *_nethttp.Response,
return localVarReturnValue, localVarHTTPResponse, newErr
}
- err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
body: localVarBody,
diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/api_default.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_default.go
index 85cfd5a1b4e7..ecc9658a508d 100644
--- a/samples/openapi3/client/petstore/go-experimental/go-petstore/api_default.go
+++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_default.go
@@ -21,31 +21,52 @@ var (
_ _context.Context
)
+type DefaultApi interface {
+
+ /*
+ * FooGet Method for FooGet
+ * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @return ApiFooGetRequest
+ */
+ FooGet(ctx _context.Context) ApiFooGetRequest
+
+ /*
+ * FooGetExecute executes the request
+ * @return InlineResponseDefault
+ */
+ FooGetExecute(r ApiFooGetRequest) (InlineResponseDefault, *_nethttp.Response, error)
+}
+
// DefaultApiService DefaultApi service
type DefaultApiService service
-type apiFooGetRequest struct {
+type ApiFooGetRequest struct {
ctx _context.Context
- apiService *DefaultApiService
+ ApiService DefaultApi
+}
+
+
+func (r ApiFooGetRequest) Execute() (InlineResponseDefault, *_nethttp.Response, error) {
+ return r.ApiService.FooGetExecute(r)
}
/*
-FooGet Method for FooGet
+ * FooGet Method for FooGet
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
-@return apiFooGetRequest
-*/
-func (a *DefaultApiService) FooGet(ctx _context.Context) apiFooGetRequest {
- return apiFooGetRequest{
- apiService: a,
+ * @return ApiFooGetRequest
+ */
+func (a *DefaultApiService) FooGet(ctx _context.Context) ApiFooGetRequest {
+ return ApiFooGetRequest{
+ ApiService: a,
ctx: ctx,
}
}
/*
-Execute executes the request
-@return InlineResponseDefault
-*/
-func (r apiFooGetRequest) Execute() (InlineResponseDefault, *_nethttp.Response, error) {
+ * Execute executes the request
+ * @return InlineResponseDefault
+ */
+func (a *DefaultApiService) FooGetExecute(r ApiFooGetRequest) (InlineResponseDefault, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarPostBody interface{}
@@ -55,7 +76,7 @@ func (r apiFooGetRequest) Execute() (InlineResponseDefault, *_nethttp.Response,
localVarReturnValue InlineResponseDefault
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.FooGet")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.FooGet")
if err != nil {
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
}
@@ -83,12 +104,12 @@ func (r apiFooGetRequest) Execute() (InlineResponseDefault, *_nethttp.Response,
if localVarHTTPHeaderAccept != "" {
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
}
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return localVarReturnValue, nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarReturnValue, localVarHTTPResponse, err
}
@@ -105,7 +126,7 @@ func (r apiFooGetRequest) Execute() (InlineResponseDefault, *_nethttp.Response,
error: localVarHTTPResponse.Status,
}
var v InlineResponseDefault
- err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr.error = err.Error()
return localVarReturnValue, localVarHTTPResponse, newErr
@@ -114,7 +135,7 @@ func (r apiFooGetRequest) Execute() (InlineResponseDefault, *_nethttp.Response,
return localVarReturnValue, localVarHTTPResponse, newErr
}
- err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
body: localVarBody,
diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/api_fake.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_fake.go
index 4743dcc145ae..f2423b5d887f 100644
--- a/samples/openapi3/client/petstore/go-experimental/go-petstore/api_fake.go
+++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_fake.go
@@ -24,31 +24,227 @@ var (
_ _context.Context
)
+type FakeApi interface {
+
+ /*
+ * FakeHealthGet Health check endpoint
+ * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @return ApiFakeHealthGetRequest
+ */
+ FakeHealthGet(ctx _context.Context) ApiFakeHealthGetRequest
+
+ /*
+ * FakeHealthGetExecute executes the request
+ * @return HealthCheckResult
+ */
+ FakeHealthGetExecute(r ApiFakeHealthGetRequest) (HealthCheckResult, *_nethttp.Response, error)
+
+ /*
+ * FakeOuterBooleanSerialize Method for FakeOuterBooleanSerialize
+ * Test serialization of outer boolean types
+ * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @return ApiFakeOuterBooleanSerializeRequest
+ */
+ FakeOuterBooleanSerialize(ctx _context.Context) ApiFakeOuterBooleanSerializeRequest
+
+ /*
+ * FakeOuterBooleanSerializeExecute executes the request
+ * @return bool
+ */
+ FakeOuterBooleanSerializeExecute(r ApiFakeOuterBooleanSerializeRequest) (bool, *_nethttp.Response, error)
+
+ /*
+ * FakeOuterCompositeSerialize Method for FakeOuterCompositeSerialize
+ * 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().
+ * @return ApiFakeOuterCompositeSerializeRequest
+ */
+ FakeOuterCompositeSerialize(ctx _context.Context) ApiFakeOuterCompositeSerializeRequest
+
+ /*
+ * FakeOuterCompositeSerializeExecute executes the request
+ * @return OuterComposite
+ */
+ FakeOuterCompositeSerializeExecute(r ApiFakeOuterCompositeSerializeRequest) (OuterComposite, *_nethttp.Response, error)
+
+ /*
+ * FakeOuterNumberSerialize Method for FakeOuterNumberSerialize
+ * Test serialization of outer number types
+ * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @return ApiFakeOuterNumberSerializeRequest
+ */
+ FakeOuterNumberSerialize(ctx _context.Context) ApiFakeOuterNumberSerializeRequest
+
+ /*
+ * FakeOuterNumberSerializeExecute executes the request
+ * @return float32
+ */
+ FakeOuterNumberSerializeExecute(r ApiFakeOuterNumberSerializeRequest) (float32, *_nethttp.Response, error)
+
+ /*
+ * FakeOuterStringSerialize Method for FakeOuterStringSerialize
+ * Test serialization of outer string types
+ * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @return ApiFakeOuterStringSerializeRequest
+ */
+ FakeOuterStringSerialize(ctx _context.Context) ApiFakeOuterStringSerializeRequest
+
+ /*
+ * FakeOuterStringSerializeExecute executes the request
+ * @return string
+ */
+ FakeOuterStringSerializeExecute(r ApiFakeOuterStringSerializeRequest) (string, *_nethttp.Response, error)
+
+ /*
+ * TestBodyWithFileSchema Method for TestBodyWithFileSchema
+ * 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().
+ * @return ApiTestBodyWithFileSchemaRequest
+ */
+ TestBodyWithFileSchema(ctx _context.Context) ApiTestBodyWithFileSchemaRequest
+
+ /*
+ * TestBodyWithFileSchemaExecute executes the request
+ */
+ TestBodyWithFileSchemaExecute(r ApiTestBodyWithFileSchemaRequest) (*_nethttp.Response, error)
+
+ /*
+ * TestBodyWithQueryParams Method for TestBodyWithQueryParams
+ * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @return ApiTestBodyWithQueryParamsRequest
+ */
+ TestBodyWithQueryParams(ctx _context.Context) ApiTestBodyWithQueryParamsRequest
+
+ /*
+ * TestBodyWithQueryParamsExecute executes the request
+ */
+ TestBodyWithQueryParamsExecute(r ApiTestBodyWithQueryParamsRequest) (*_nethttp.Response, error)
+
+ /*
+ * TestClientModel To test \"client\" model
+ * To test "client" model
+ * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @return ApiTestClientModelRequest
+ */
+ TestClientModel(ctx _context.Context) ApiTestClientModelRequest
+
+ /*
+ * TestClientModelExecute executes the request
+ * @return Client
+ */
+ TestClientModelExecute(r ApiTestClientModelRequest) (Client, *_nethttp.Response, error)
+
+ /*
+ * TestEndpointParameters Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+ * Fake endpoint for testing various parameters
+假端點
+偽のエンドポイント
+가짜 엔드 포인트
+
+ * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @return ApiTestEndpointParametersRequest
+ */
+ TestEndpointParameters(ctx _context.Context) ApiTestEndpointParametersRequest
+
+ /*
+ * TestEndpointParametersExecute executes the request
+ */
+ TestEndpointParametersExecute(r ApiTestEndpointParametersRequest) (*_nethttp.Response, error)
+
+ /*
+ * TestEnumParameters To test enum parameters
+ * To test enum parameters
+ * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @return ApiTestEnumParametersRequest
+ */
+ TestEnumParameters(ctx _context.Context) ApiTestEnumParametersRequest
+
+ /*
+ * TestEnumParametersExecute executes the request
+ */
+ TestEnumParametersExecute(r ApiTestEnumParametersRequest) (*_nethttp.Response, error)
+
+ /*
+ * TestGroupParameters Fake endpoint to test group parameters (optional)
+ * 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().
+ * @return ApiTestGroupParametersRequest
+ */
+ TestGroupParameters(ctx _context.Context) ApiTestGroupParametersRequest
+
+ /*
+ * TestGroupParametersExecute executes the request
+ */
+ TestGroupParametersExecute(r ApiTestGroupParametersRequest) (*_nethttp.Response, error)
+
+ /*
+ * TestInlineAdditionalProperties test inline additionalProperties
+ * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @return ApiTestInlineAdditionalPropertiesRequest
+ */
+ TestInlineAdditionalProperties(ctx _context.Context) ApiTestInlineAdditionalPropertiesRequest
+
+ /*
+ * TestInlineAdditionalPropertiesExecute executes the request
+ */
+ TestInlineAdditionalPropertiesExecute(r ApiTestInlineAdditionalPropertiesRequest) (*_nethttp.Response, error)
+
+ /*
+ * 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().
+ * @return ApiTestJsonFormDataRequest
+ */
+ TestJsonFormData(ctx _context.Context) ApiTestJsonFormDataRequest
+
+ /*
+ * TestJsonFormDataExecute executes the request
+ */
+ TestJsonFormDataExecute(r ApiTestJsonFormDataRequest) (*_nethttp.Response, error)
+
+ /*
+ * TestQueryParameterCollectionFormat Method for TestQueryParameterCollectionFormat
+ * 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().
+ * @return ApiTestQueryParameterCollectionFormatRequest
+ */
+ TestQueryParameterCollectionFormat(ctx _context.Context) ApiTestQueryParameterCollectionFormatRequest
+
+ /*
+ * TestQueryParameterCollectionFormatExecute executes the request
+ */
+ TestQueryParameterCollectionFormatExecute(r ApiTestQueryParameterCollectionFormatRequest) (*_nethttp.Response, error)
+}
+
// FakeApiService FakeApi service
type FakeApiService service
-type apiFakeHealthGetRequest struct {
+type ApiFakeHealthGetRequest struct {
ctx _context.Context
- apiService *FakeApiService
+ ApiService FakeApi
+}
+
+
+func (r ApiFakeHealthGetRequest) Execute() (HealthCheckResult, *_nethttp.Response, error) {
+ return r.ApiService.FakeHealthGetExecute(r)
}
/*
-FakeHealthGet Health check endpoint
+ * FakeHealthGet Health check endpoint
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
-@return apiFakeHealthGetRequest
-*/
-func (a *FakeApiService) FakeHealthGet(ctx _context.Context) apiFakeHealthGetRequest {
- return apiFakeHealthGetRequest{
- apiService: a,
+ * @return ApiFakeHealthGetRequest
+ */
+func (a *FakeApiService) FakeHealthGet(ctx _context.Context) ApiFakeHealthGetRequest {
+ return ApiFakeHealthGetRequest{
+ ApiService: a,
ctx: ctx,
}
}
/*
-Execute executes the request
-@return HealthCheckResult
-*/
-func (r apiFakeHealthGetRequest) Execute() (HealthCheckResult, *_nethttp.Response, error) {
+ * Execute executes the request
+ * @return HealthCheckResult
+ */
+func (a *FakeApiService) FakeHealthGetExecute(r ApiFakeHealthGetRequest) (HealthCheckResult, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarPostBody interface{}
@@ -58,7 +254,7 @@ func (r apiFakeHealthGetRequest) Execute() (HealthCheckResult, *_nethttp.Respons
localVarReturnValue HealthCheckResult
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.FakeHealthGet")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.FakeHealthGet")
if err != nil {
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
}
@@ -86,12 +282,12 @@ func (r apiFakeHealthGetRequest) Execute() (HealthCheckResult, *_nethttp.Respons
if localVarHTTPHeaderAccept != "" {
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
}
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return localVarReturnValue, nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarReturnValue, localVarHTTPResponse, err
}
@@ -110,7 +306,7 @@ func (r apiFakeHealthGetRequest) Execute() (HealthCheckResult, *_nethttp.Respons
return localVarReturnValue, localVarHTTPResponse, newErr
}
- err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
body: localVarBody,
@@ -121,34 +317,40 @@ func (r apiFakeHealthGetRequest) Execute() (HealthCheckResult, *_nethttp.Respons
return localVarReturnValue, localVarHTTPResponse, nil
}
-type apiFakeOuterBooleanSerializeRequest struct {
+
+type ApiFakeOuterBooleanSerializeRequest struct {
ctx _context.Context
- apiService *FakeApiService
+ ApiService FakeApi
body *bool
}
-func (r apiFakeOuterBooleanSerializeRequest) Body(body bool) apiFakeOuterBooleanSerializeRequest {
+func (r ApiFakeOuterBooleanSerializeRequest) Body(body bool) ApiFakeOuterBooleanSerializeRequest {
r.body = &body
return r
}
+
+func (r ApiFakeOuterBooleanSerializeRequest) Execute() (bool, *_nethttp.Response, error) {
+ return r.ApiService.FakeOuterBooleanSerializeExecute(r)
+}
+
/*
-FakeOuterBooleanSerialize Method for FakeOuterBooleanSerialize
-Test serialization of outer boolean types
+ * FakeOuterBooleanSerialize Method for FakeOuterBooleanSerialize
+ * Test serialization of outer boolean types
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
-@return apiFakeOuterBooleanSerializeRequest
-*/
-func (a *FakeApiService) FakeOuterBooleanSerialize(ctx _context.Context) apiFakeOuterBooleanSerializeRequest {
- return apiFakeOuterBooleanSerializeRequest{
- apiService: a,
+ * @return ApiFakeOuterBooleanSerializeRequest
+ */
+func (a *FakeApiService) FakeOuterBooleanSerialize(ctx _context.Context) ApiFakeOuterBooleanSerializeRequest {
+ return ApiFakeOuterBooleanSerializeRequest{
+ ApiService: a,
ctx: ctx,
}
}
/*
-Execute executes the request
-@return bool
-*/
-func (r apiFakeOuterBooleanSerializeRequest) Execute() (bool, *_nethttp.Response, error) {
+ * Execute executes the request
+ * @return bool
+ */
+func (a *FakeApiService) FakeOuterBooleanSerializeExecute(r ApiFakeOuterBooleanSerializeRequest) (bool, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
localVarPostBody interface{}
@@ -158,7 +360,7 @@ func (r apiFakeOuterBooleanSerializeRequest) Execute() (bool, *_nethttp.Response
localVarReturnValue bool
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.FakeOuterBooleanSerialize")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.FakeOuterBooleanSerialize")
if err != nil {
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
}
@@ -188,12 +390,12 @@ func (r apiFakeOuterBooleanSerializeRequest) Execute() (bool, *_nethttp.Response
}
// body params
localVarPostBody = r.body
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return localVarReturnValue, nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarReturnValue, localVarHTTPResponse, err
}
@@ -212,7 +414,7 @@ func (r apiFakeOuterBooleanSerializeRequest) Execute() (bool, *_nethttp.Response
return localVarReturnValue, localVarHTTPResponse, newErr
}
- err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
body: localVarBody,
@@ -223,34 +425,40 @@ func (r apiFakeOuterBooleanSerializeRequest) Execute() (bool, *_nethttp.Response
return localVarReturnValue, localVarHTTPResponse, nil
}
-type apiFakeOuterCompositeSerializeRequest struct {
+
+type ApiFakeOuterCompositeSerializeRequest struct {
ctx _context.Context
- apiService *FakeApiService
+ ApiService FakeApi
outerComposite *OuterComposite
}
-func (r apiFakeOuterCompositeSerializeRequest) OuterComposite(outerComposite OuterComposite) apiFakeOuterCompositeSerializeRequest {
+func (r ApiFakeOuterCompositeSerializeRequest) OuterComposite(outerComposite OuterComposite) ApiFakeOuterCompositeSerializeRequest {
r.outerComposite = &outerComposite
return r
}
+
+func (r ApiFakeOuterCompositeSerializeRequest) Execute() (OuterComposite, *_nethttp.Response, error) {
+ return r.ApiService.FakeOuterCompositeSerializeExecute(r)
+}
+
/*
-FakeOuterCompositeSerialize Method for FakeOuterCompositeSerialize
-Test serialization of object with outer number type
+ * FakeOuterCompositeSerialize Method for FakeOuterCompositeSerialize
+ * 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().
-@return apiFakeOuterCompositeSerializeRequest
-*/
-func (a *FakeApiService) FakeOuterCompositeSerialize(ctx _context.Context) apiFakeOuterCompositeSerializeRequest {
- return apiFakeOuterCompositeSerializeRequest{
- apiService: a,
+ * @return ApiFakeOuterCompositeSerializeRequest
+ */
+func (a *FakeApiService) FakeOuterCompositeSerialize(ctx _context.Context) ApiFakeOuterCompositeSerializeRequest {
+ return ApiFakeOuterCompositeSerializeRequest{
+ ApiService: a,
ctx: ctx,
}
}
/*
-Execute executes the request
-@return OuterComposite
-*/
-func (r apiFakeOuterCompositeSerializeRequest) Execute() (OuterComposite, *_nethttp.Response, error) {
+ * Execute executes the request
+ * @return OuterComposite
+ */
+func (a *FakeApiService) FakeOuterCompositeSerializeExecute(r ApiFakeOuterCompositeSerializeRequest) (OuterComposite, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
localVarPostBody interface{}
@@ -260,7 +468,7 @@ func (r apiFakeOuterCompositeSerializeRequest) Execute() (OuterComposite, *_neth
localVarReturnValue OuterComposite
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.FakeOuterCompositeSerialize")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.FakeOuterCompositeSerialize")
if err != nil {
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
}
@@ -290,12 +498,12 @@ func (r apiFakeOuterCompositeSerializeRequest) Execute() (OuterComposite, *_neth
}
// body params
localVarPostBody = r.outerComposite
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return localVarReturnValue, nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarReturnValue, localVarHTTPResponse, err
}
@@ -314,7 +522,7 @@ func (r apiFakeOuterCompositeSerializeRequest) Execute() (OuterComposite, *_neth
return localVarReturnValue, localVarHTTPResponse, newErr
}
- err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
body: localVarBody,
@@ -325,34 +533,40 @@ func (r apiFakeOuterCompositeSerializeRequest) Execute() (OuterComposite, *_neth
return localVarReturnValue, localVarHTTPResponse, nil
}
-type apiFakeOuterNumberSerializeRequest struct {
+
+type ApiFakeOuterNumberSerializeRequest struct {
ctx _context.Context
- apiService *FakeApiService
+ ApiService FakeApi
body *float32
}
-func (r apiFakeOuterNumberSerializeRequest) Body(body float32) apiFakeOuterNumberSerializeRequest {
+func (r ApiFakeOuterNumberSerializeRequest) Body(body float32) ApiFakeOuterNumberSerializeRequest {
r.body = &body
return r
}
+
+func (r ApiFakeOuterNumberSerializeRequest) Execute() (float32, *_nethttp.Response, error) {
+ return r.ApiService.FakeOuterNumberSerializeExecute(r)
+}
+
/*
-FakeOuterNumberSerialize Method for FakeOuterNumberSerialize
-Test serialization of outer number types
+ * FakeOuterNumberSerialize Method for FakeOuterNumberSerialize
+ * Test serialization of outer number types
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
-@return apiFakeOuterNumberSerializeRequest
-*/
-func (a *FakeApiService) FakeOuterNumberSerialize(ctx _context.Context) apiFakeOuterNumberSerializeRequest {
- return apiFakeOuterNumberSerializeRequest{
- apiService: a,
+ * @return ApiFakeOuterNumberSerializeRequest
+ */
+func (a *FakeApiService) FakeOuterNumberSerialize(ctx _context.Context) ApiFakeOuterNumberSerializeRequest {
+ return ApiFakeOuterNumberSerializeRequest{
+ ApiService: a,
ctx: ctx,
}
}
/*
-Execute executes the request
-@return float32
-*/
-func (r apiFakeOuterNumberSerializeRequest) Execute() (float32, *_nethttp.Response, error) {
+ * Execute executes the request
+ * @return float32
+ */
+func (a *FakeApiService) FakeOuterNumberSerializeExecute(r ApiFakeOuterNumberSerializeRequest) (float32, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
localVarPostBody interface{}
@@ -362,7 +576,7 @@ func (r apiFakeOuterNumberSerializeRequest) Execute() (float32, *_nethttp.Respon
localVarReturnValue float32
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.FakeOuterNumberSerialize")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.FakeOuterNumberSerialize")
if err != nil {
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
}
@@ -392,12 +606,12 @@ func (r apiFakeOuterNumberSerializeRequest) Execute() (float32, *_nethttp.Respon
}
// body params
localVarPostBody = r.body
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return localVarReturnValue, nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarReturnValue, localVarHTTPResponse, err
}
@@ -416,7 +630,7 @@ func (r apiFakeOuterNumberSerializeRequest) Execute() (float32, *_nethttp.Respon
return localVarReturnValue, localVarHTTPResponse, newErr
}
- err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
body: localVarBody,
@@ -427,34 +641,40 @@ func (r apiFakeOuterNumberSerializeRequest) Execute() (float32, *_nethttp.Respon
return localVarReturnValue, localVarHTTPResponse, nil
}
-type apiFakeOuterStringSerializeRequest struct {
+
+type ApiFakeOuterStringSerializeRequest struct {
ctx _context.Context
- apiService *FakeApiService
+ ApiService FakeApi
body *string
}
-func (r apiFakeOuterStringSerializeRequest) Body(body string) apiFakeOuterStringSerializeRequest {
+func (r ApiFakeOuterStringSerializeRequest) Body(body string) ApiFakeOuterStringSerializeRequest {
r.body = &body
return r
}
+
+func (r ApiFakeOuterStringSerializeRequest) Execute() (string, *_nethttp.Response, error) {
+ return r.ApiService.FakeOuterStringSerializeExecute(r)
+}
+
/*
-FakeOuterStringSerialize Method for FakeOuterStringSerialize
-Test serialization of outer string types
+ * FakeOuterStringSerialize Method for FakeOuterStringSerialize
+ * Test serialization of outer string types
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
-@return apiFakeOuterStringSerializeRequest
-*/
-func (a *FakeApiService) FakeOuterStringSerialize(ctx _context.Context) apiFakeOuterStringSerializeRequest {
- return apiFakeOuterStringSerializeRequest{
- apiService: a,
+ * @return ApiFakeOuterStringSerializeRequest
+ */
+func (a *FakeApiService) FakeOuterStringSerialize(ctx _context.Context) ApiFakeOuterStringSerializeRequest {
+ return ApiFakeOuterStringSerializeRequest{
+ ApiService: a,
ctx: ctx,
}
}
/*
-Execute executes the request
-@return string
-*/
-func (r apiFakeOuterStringSerializeRequest) Execute() (string, *_nethttp.Response, error) {
+ * Execute executes the request
+ * @return string
+ */
+func (a *FakeApiService) FakeOuterStringSerializeExecute(r ApiFakeOuterStringSerializeRequest) (string, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
localVarPostBody interface{}
@@ -464,7 +684,7 @@ func (r apiFakeOuterStringSerializeRequest) Execute() (string, *_nethttp.Respons
localVarReturnValue string
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.FakeOuterStringSerialize")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.FakeOuterStringSerialize")
if err != nil {
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
}
@@ -494,12 +714,12 @@ func (r apiFakeOuterStringSerializeRequest) Execute() (string, *_nethttp.Respons
}
// body params
localVarPostBody = r.body
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return localVarReturnValue, nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarReturnValue, localVarHTTPResponse, err
}
@@ -518,7 +738,7 @@ func (r apiFakeOuterStringSerializeRequest) Execute() (string, *_nethttp.Respons
return localVarReturnValue, localVarHTTPResponse, newErr
}
- err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
body: localVarBody,
@@ -529,33 +749,39 @@ func (r apiFakeOuterStringSerializeRequest) Execute() (string, *_nethttp.Respons
return localVarReturnValue, localVarHTTPResponse, nil
}
-type apiTestBodyWithFileSchemaRequest struct {
+
+type ApiTestBodyWithFileSchemaRequest struct {
ctx _context.Context
- apiService *FakeApiService
+ ApiService FakeApi
fileSchemaTestClass *FileSchemaTestClass
}
-func (r apiTestBodyWithFileSchemaRequest) FileSchemaTestClass(fileSchemaTestClass FileSchemaTestClass) apiTestBodyWithFileSchemaRequest {
+func (r ApiTestBodyWithFileSchemaRequest) FileSchemaTestClass(fileSchemaTestClass FileSchemaTestClass) ApiTestBodyWithFileSchemaRequest {
r.fileSchemaTestClass = &fileSchemaTestClass
return r
}
+
+func (r ApiTestBodyWithFileSchemaRequest) Execute() (*_nethttp.Response, error) {
+ return r.ApiService.TestBodyWithFileSchemaExecute(r)
+}
+
/*
-TestBodyWithFileSchema Method for TestBodyWithFileSchema
-For this test, the body for this request much reference a schema named `File`.
+ * TestBodyWithFileSchema Method for TestBodyWithFileSchema
+ * 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().
-@return apiTestBodyWithFileSchemaRequest
-*/
-func (a *FakeApiService) TestBodyWithFileSchema(ctx _context.Context) apiTestBodyWithFileSchemaRequest {
- return apiTestBodyWithFileSchemaRequest{
- apiService: a,
+ * @return ApiTestBodyWithFileSchemaRequest
+ */
+func (a *FakeApiService) TestBodyWithFileSchema(ctx _context.Context) ApiTestBodyWithFileSchemaRequest {
+ return ApiTestBodyWithFileSchemaRequest{
+ ApiService: a,
ctx: ctx,
}
}
/*
-Execute executes the request
-*/
-func (r apiTestBodyWithFileSchemaRequest) Execute() (*_nethttp.Response, error) {
+ * Execute executes the request
+ */
+func (a *FakeApiService) TestBodyWithFileSchemaExecute(r ApiTestBodyWithFileSchemaRequest) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPut
localVarPostBody interface{}
@@ -564,7 +790,7 @@ func (r apiTestBodyWithFileSchemaRequest) Execute() (*_nethttp.Response, error)
localVarFileBytes []byte
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestBodyWithFileSchema")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestBodyWithFileSchema")
if err != nil {
return nil, GenericOpenAPIError{error: err.Error()}
}
@@ -597,12 +823,12 @@ func (r apiTestBodyWithFileSchemaRequest) Execute() (*_nethttp.Response, error)
}
// body params
localVarPostBody = r.fileSchemaTestClass
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarHTTPResponse, err
}
@@ -623,37 +849,43 @@ func (r apiTestBodyWithFileSchemaRequest) Execute() (*_nethttp.Response, error)
return localVarHTTPResponse, nil
}
-type apiTestBodyWithQueryParamsRequest struct {
+
+type ApiTestBodyWithQueryParamsRequest struct {
ctx _context.Context
- apiService *FakeApiService
+ ApiService FakeApi
query *string
user *User
}
-func (r apiTestBodyWithQueryParamsRequest) Query(query string) apiTestBodyWithQueryParamsRequest {
+func (r ApiTestBodyWithQueryParamsRequest) Query(query string) ApiTestBodyWithQueryParamsRequest {
r.query = &query
return r
}
-func (r apiTestBodyWithQueryParamsRequest) User(user User) apiTestBodyWithQueryParamsRequest {
+func (r ApiTestBodyWithQueryParamsRequest) User(user User) ApiTestBodyWithQueryParamsRequest {
r.user = &user
return r
}
+
+func (r ApiTestBodyWithQueryParamsRequest) Execute() (*_nethttp.Response, error) {
+ return r.ApiService.TestBodyWithQueryParamsExecute(r)
+}
+
/*
-TestBodyWithQueryParams Method for TestBodyWithQueryParams
+ * TestBodyWithQueryParams Method for TestBodyWithQueryParams
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
-@return apiTestBodyWithQueryParamsRequest
-*/
-func (a *FakeApiService) TestBodyWithQueryParams(ctx _context.Context) apiTestBodyWithQueryParamsRequest {
- return apiTestBodyWithQueryParamsRequest{
- apiService: a,
+ * @return ApiTestBodyWithQueryParamsRequest
+ */
+func (a *FakeApiService) TestBodyWithQueryParams(ctx _context.Context) ApiTestBodyWithQueryParamsRequest {
+ return ApiTestBodyWithQueryParamsRequest{
+ ApiService: a,
ctx: ctx,
}
}
/*
-Execute executes the request
-*/
-func (r apiTestBodyWithQueryParamsRequest) Execute() (*_nethttp.Response, error) {
+ * Execute executes the request
+ */
+func (a *FakeApiService) TestBodyWithQueryParamsExecute(r ApiTestBodyWithQueryParamsRequest) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPut
localVarPostBody interface{}
@@ -662,7 +894,7 @@ func (r apiTestBodyWithQueryParamsRequest) Execute() (*_nethttp.Response, error)
localVarFileBytes []byte
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestBodyWithQueryParams")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestBodyWithQueryParams")
if err != nil {
return nil, GenericOpenAPIError{error: err.Error()}
}
@@ -699,12 +931,12 @@ func (r apiTestBodyWithQueryParamsRequest) Execute() (*_nethttp.Response, error)
}
// body params
localVarPostBody = r.user
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarHTTPResponse, err
}
@@ -725,34 +957,40 @@ func (r apiTestBodyWithQueryParamsRequest) Execute() (*_nethttp.Response, error)
return localVarHTTPResponse, nil
}
-type apiTestClientModelRequest struct {
+
+type ApiTestClientModelRequest struct {
ctx _context.Context
- apiService *FakeApiService
+ ApiService FakeApi
client *Client
}
-func (r apiTestClientModelRequest) Client(client Client) apiTestClientModelRequest {
+func (r ApiTestClientModelRequest) Client(client Client) ApiTestClientModelRequest {
r.client = &client
return r
}
+
+func (r ApiTestClientModelRequest) Execute() (Client, *_nethttp.Response, error) {
+ return r.ApiService.TestClientModelExecute(r)
+}
+
/*
-TestClientModel To test \"client\" model
-To test "client" model
+ * TestClientModel To test \"client\" model
+ * To test "client" model
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
-@return apiTestClientModelRequest
-*/
-func (a *FakeApiService) TestClientModel(ctx _context.Context) apiTestClientModelRequest {
- return apiTestClientModelRequest{
- apiService: a,
+ * @return ApiTestClientModelRequest
+ */
+func (a *FakeApiService) TestClientModel(ctx _context.Context) ApiTestClientModelRequest {
+ return ApiTestClientModelRequest{
+ ApiService: a,
ctx: ctx,
}
}
/*
-Execute executes the request
-@return Client
-*/
-func (r apiTestClientModelRequest) Execute() (Client, *_nethttp.Response, error) {
+ * Execute executes the request
+ * @return Client
+ */
+func (a *FakeApiService) TestClientModelExecute(r ApiTestClientModelRequest) (Client, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPatch
localVarPostBody interface{}
@@ -762,7 +1000,7 @@ func (r apiTestClientModelRequest) Execute() (Client, *_nethttp.Response, error)
localVarReturnValue Client
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestClientModel")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestClientModel")
if err != nil {
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
}
@@ -795,12 +1033,12 @@ func (r apiTestClientModelRequest) Execute() (Client, *_nethttp.Response, error)
}
// body params
localVarPostBody = r.client
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return localVarReturnValue, nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarReturnValue, localVarHTTPResponse, err
}
@@ -819,7 +1057,7 @@ func (r apiTestClientModelRequest) Execute() (Client, *_nethttp.Response, error)
return localVarReturnValue, localVarHTTPResponse, newErr
}
- err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
body: localVarBody,
@@ -830,9 +1068,10 @@ func (r apiTestClientModelRequest) Execute() (Client, *_nethttp.Response, error)
return localVarReturnValue, localVarHTTPResponse, nil
}
-type apiTestEndpointParametersRequest struct {
+
+type ApiTestEndpointParametersRequest struct {
ctx _context.Context
- apiService *FakeApiService
+ ApiService FakeApi
number *float32
double *float64
patternWithoutDelimiter *string
@@ -849,83 +1088,88 @@ type apiTestEndpointParametersRequest struct {
callback *string
}
-func (r apiTestEndpointParametersRequest) Number(number float32) apiTestEndpointParametersRequest {
+func (r ApiTestEndpointParametersRequest) Number(number float32) ApiTestEndpointParametersRequest {
r.number = &number
return r
}
-func (r apiTestEndpointParametersRequest) Double(double float64) apiTestEndpointParametersRequest {
+func (r ApiTestEndpointParametersRequest) Double(double float64) ApiTestEndpointParametersRequest {
r.double = &double
return r
}
-func (r apiTestEndpointParametersRequest) PatternWithoutDelimiter(patternWithoutDelimiter string) apiTestEndpointParametersRequest {
+func (r ApiTestEndpointParametersRequest) PatternWithoutDelimiter(patternWithoutDelimiter string) ApiTestEndpointParametersRequest {
r.patternWithoutDelimiter = &patternWithoutDelimiter
return r
}
-func (r apiTestEndpointParametersRequest) Byte_(byte_ string) apiTestEndpointParametersRequest {
+func (r ApiTestEndpointParametersRequest) Byte_(byte_ string) ApiTestEndpointParametersRequest {
r.byte_ = &byte_
return r
}
-func (r apiTestEndpointParametersRequest) Integer(integer int32) apiTestEndpointParametersRequest {
+func (r ApiTestEndpointParametersRequest) Integer(integer int32) ApiTestEndpointParametersRequest {
r.integer = &integer
return r
}
-func (r apiTestEndpointParametersRequest) Int32_(int32_ int32) apiTestEndpointParametersRequest {
+func (r ApiTestEndpointParametersRequest) Int32_(int32_ int32) ApiTestEndpointParametersRequest {
r.int32_ = &int32_
return r
}
-func (r apiTestEndpointParametersRequest) Int64_(int64_ int64) apiTestEndpointParametersRequest {
+func (r ApiTestEndpointParametersRequest) Int64_(int64_ int64) ApiTestEndpointParametersRequest {
r.int64_ = &int64_
return r
}
-func (r apiTestEndpointParametersRequest) Float(float float32) apiTestEndpointParametersRequest {
+func (r ApiTestEndpointParametersRequest) Float(float float32) ApiTestEndpointParametersRequest {
r.float = &float
return r
}
-func (r apiTestEndpointParametersRequest) String_(string_ string) apiTestEndpointParametersRequest {
+func (r ApiTestEndpointParametersRequest) String_(string_ string) ApiTestEndpointParametersRequest {
r.string_ = &string_
return r
}
-func (r apiTestEndpointParametersRequest) Binary(binary *os.File) apiTestEndpointParametersRequest {
+func (r ApiTestEndpointParametersRequest) Binary(binary *os.File) ApiTestEndpointParametersRequest {
r.binary = &binary
return r
}
-func (r apiTestEndpointParametersRequest) Date(date string) apiTestEndpointParametersRequest {
+func (r ApiTestEndpointParametersRequest) Date(date string) ApiTestEndpointParametersRequest {
r.date = &date
return r
}
-func (r apiTestEndpointParametersRequest) DateTime(dateTime time.Time) apiTestEndpointParametersRequest {
+func (r ApiTestEndpointParametersRequest) DateTime(dateTime time.Time) ApiTestEndpointParametersRequest {
r.dateTime = &dateTime
return r
}
-func (r apiTestEndpointParametersRequest) Password(password string) apiTestEndpointParametersRequest {
+func (r ApiTestEndpointParametersRequest) Password(password string) ApiTestEndpointParametersRequest {
r.password = &password
return r
}
-func (r apiTestEndpointParametersRequest) Callback(callback string) apiTestEndpointParametersRequest {
+func (r ApiTestEndpointParametersRequest) Callback(callback string) ApiTestEndpointParametersRequest {
r.callback = &callback
return r
}
+
+func (r ApiTestEndpointParametersRequest) Execute() (*_nethttp.Response, error) {
+ return r.ApiService.TestEndpointParametersExecute(r)
+}
+
/*
-TestEndpointParameters Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
-Fake endpoint for testing various parameters
+ * TestEndpointParameters Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+ * Fake endpoint for testing various parameters
假端點
偽のエンドポイント
가짜 엔드 포인트
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
-@return apiTestEndpointParametersRequest
-*/
-func (a *FakeApiService) TestEndpointParameters(ctx _context.Context) apiTestEndpointParametersRequest {
- return apiTestEndpointParametersRequest{
- apiService: a,
+ * @return ApiTestEndpointParametersRequest
+ */
+func (a *FakeApiService) TestEndpointParameters(ctx _context.Context) ApiTestEndpointParametersRequest {
+ return ApiTestEndpointParametersRequest{
+ ApiService: a,
ctx: ctx,
}
}
/*
-Execute executes the request
-*/
-func (r apiTestEndpointParametersRequest) Execute() (*_nethttp.Response, error) {
+ * Execute executes the request
+ */
+func (a *FakeApiService) TestEndpointParametersExecute(r ApiTestEndpointParametersRequest) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
localVarPostBody interface{}
@@ -934,7 +1178,7 @@ func (r apiTestEndpointParametersRequest) Execute() (*_nethttp.Response, error)
localVarFileBytes []byte
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestEndpointParameters")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestEndpointParameters")
if err != nil {
return nil, GenericOpenAPIError{error: err.Error()}
}
@@ -1028,12 +1272,12 @@ func (r apiTestEndpointParametersRequest) Execute() (*_nethttp.Response, error)
if r.callback != nil {
localVarFormParams.Add("callback", parameterToString(*r.callback, ""))
}
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarHTTPResponse, err
}
@@ -1054,9 +1298,10 @@ func (r apiTestEndpointParametersRequest) Execute() (*_nethttp.Response, error)
return localVarHTTPResponse, nil
}
-type apiTestEnumParametersRequest struct {
+
+type ApiTestEnumParametersRequest struct {
ctx _context.Context
- apiService *FakeApiService
+ ApiService FakeApi
enumHeaderStringArray *[]string
enumHeaderString *string
enumQueryStringArray *[]string
@@ -1067,55 +1312,60 @@ type apiTestEnumParametersRequest struct {
enumFormString *string
}
-func (r apiTestEnumParametersRequest) EnumHeaderStringArray(enumHeaderStringArray []string) apiTestEnumParametersRequest {
+func (r ApiTestEnumParametersRequest) EnumHeaderStringArray(enumHeaderStringArray []string) ApiTestEnumParametersRequest {
r.enumHeaderStringArray = &enumHeaderStringArray
return r
}
-func (r apiTestEnumParametersRequest) EnumHeaderString(enumHeaderString string) apiTestEnumParametersRequest {
+func (r ApiTestEnumParametersRequest) EnumHeaderString(enumHeaderString string) ApiTestEnumParametersRequest {
r.enumHeaderString = &enumHeaderString
return r
}
-func (r apiTestEnumParametersRequest) EnumQueryStringArray(enumQueryStringArray []string) apiTestEnumParametersRequest {
+func (r ApiTestEnumParametersRequest) EnumQueryStringArray(enumQueryStringArray []string) ApiTestEnumParametersRequest {
r.enumQueryStringArray = &enumQueryStringArray
return r
}
-func (r apiTestEnumParametersRequest) EnumQueryString(enumQueryString string) apiTestEnumParametersRequest {
+func (r ApiTestEnumParametersRequest) EnumQueryString(enumQueryString string) ApiTestEnumParametersRequest {
r.enumQueryString = &enumQueryString
return r
}
-func (r apiTestEnumParametersRequest) EnumQueryInteger(enumQueryInteger int32) apiTestEnumParametersRequest {
+func (r ApiTestEnumParametersRequest) EnumQueryInteger(enumQueryInteger int32) ApiTestEnumParametersRequest {
r.enumQueryInteger = &enumQueryInteger
return r
}
-func (r apiTestEnumParametersRequest) EnumQueryDouble(enumQueryDouble float64) apiTestEnumParametersRequest {
+func (r ApiTestEnumParametersRequest) EnumQueryDouble(enumQueryDouble float64) ApiTestEnumParametersRequest {
r.enumQueryDouble = &enumQueryDouble
return r
}
-func (r apiTestEnumParametersRequest) EnumFormStringArray(enumFormStringArray []string) apiTestEnumParametersRequest {
+func (r ApiTestEnumParametersRequest) EnumFormStringArray(enumFormStringArray []string) ApiTestEnumParametersRequest {
r.enumFormStringArray = &enumFormStringArray
return r
}
-func (r apiTestEnumParametersRequest) EnumFormString(enumFormString string) apiTestEnumParametersRequest {
+func (r ApiTestEnumParametersRequest) EnumFormString(enumFormString string) ApiTestEnumParametersRequest {
r.enumFormString = &enumFormString
return r
}
+
+func (r ApiTestEnumParametersRequest) Execute() (*_nethttp.Response, error) {
+ return r.ApiService.TestEnumParametersExecute(r)
+}
+
/*
-TestEnumParameters To test enum parameters
-To test enum parameters
+ * TestEnumParameters To test enum parameters
+ * To test enum parameters
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
-@return apiTestEnumParametersRequest
-*/
-func (a *FakeApiService) TestEnumParameters(ctx _context.Context) apiTestEnumParametersRequest {
- return apiTestEnumParametersRequest{
- apiService: a,
+ * @return ApiTestEnumParametersRequest
+ */
+func (a *FakeApiService) TestEnumParameters(ctx _context.Context) ApiTestEnumParametersRequest {
+ return ApiTestEnumParametersRequest{
+ ApiService: a,
ctx: ctx,
}
}
/*
-Execute executes the request
-*/
-func (r apiTestEnumParametersRequest) Execute() (*_nethttp.Response, error) {
+ * Execute executes the request
+ */
+func (a *FakeApiService) TestEnumParametersExecute(r ApiTestEnumParametersRequest) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarPostBody interface{}
@@ -1124,7 +1374,7 @@ func (r apiTestEnumParametersRequest) Execute() (*_nethttp.Response, error) {
localVarFileBytes []byte
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestEnumParameters")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestEnumParameters")
if err != nil {
return nil, GenericOpenAPIError{error: err.Error()}
}
@@ -1184,12 +1434,12 @@ func (r apiTestEnumParametersRequest) Execute() (*_nethttp.Response, error) {
if r.enumFormString != nil {
localVarFormParams.Add("enum_form_string", parameterToString(*r.enumFormString, ""))
}
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarHTTPResponse, err
}
@@ -1210,9 +1460,10 @@ func (r apiTestEnumParametersRequest) Execute() (*_nethttp.Response, error) {
return localVarHTTPResponse, nil
}
-type apiTestGroupParametersRequest struct {
+
+type ApiTestGroupParametersRequest struct {
ctx _context.Context
- apiService *FakeApiService
+ ApiService FakeApi
requiredStringGroup *int32
requiredBooleanGroup *bool
requiredInt64Group *int64
@@ -1221,47 +1472,52 @@ type apiTestGroupParametersRequest struct {
int64Group *int64
}
-func (r apiTestGroupParametersRequest) RequiredStringGroup(requiredStringGroup int32) apiTestGroupParametersRequest {
+func (r ApiTestGroupParametersRequest) RequiredStringGroup(requiredStringGroup int32) ApiTestGroupParametersRequest {
r.requiredStringGroup = &requiredStringGroup
return r
}
-func (r apiTestGroupParametersRequest) RequiredBooleanGroup(requiredBooleanGroup bool) apiTestGroupParametersRequest {
+func (r ApiTestGroupParametersRequest) RequiredBooleanGroup(requiredBooleanGroup bool) ApiTestGroupParametersRequest {
r.requiredBooleanGroup = &requiredBooleanGroup
return r
}
-func (r apiTestGroupParametersRequest) RequiredInt64Group(requiredInt64Group int64) apiTestGroupParametersRequest {
+func (r ApiTestGroupParametersRequest) RequiredInt64Group(requiredInt64Group int64) ApiTestGroupParametersRequest {
r.requiredInt64Group = &requiredInt64Group
return r
}
-func (r apiTestGroupParametersRequest) StringGroup(stringGroup int32) apiTestGroupParametersRequest {
+func (r ApiTestGroupParametersRequest) StringGroup(stringGroup int32) ApiTestGroupParametersRequest {
r.stringGroup = &stringGroup
return r
}
-func (r apiTestGroupParametersRequest) BooleanGroup(booleanGroup bool) apiTestGroupParametersRequest {
+func (r ApiTestGroupParametersRequest) BooleanGroup(booleanGroup bool) ApiTestGroupParametersRequest {
r.booleanGroup = &booleanGroup
return r
}
-func (r apiTestGroupParametersRequest) Int64Group(int64Group int64) apiTestGroupParametersRequest {
+func (r ApiTestGroupParametersRequest) Int64Group(int64Group int64) ApiTestGroupParametersRequest {
r.int64Group = &int64Group
return r
}
+
+func (r ApiTestGroupParametersRequest) Execute() (*_nethttp.Response, error) {
+ return r.ApiService.TestGroupParametersExecute(r)
+}
+
/*
-TestGroupParameters Fake endpoint to test group parameters (optional)
-Fake endpoint to test group parameters (optional)
+ * TestGroupParameters Fake endpoint to test group parameters (optional)
+ * 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().
-@return apiTestGroupParametersRequest
-*/
-func (a *FakeApiService) TestGroupParameters(ctx _context.Context) apiTestGroupParametersRequest {
- return apiTestGroupParametersRequest{
- apiService: a,
+ * @return ApiTestGroupParametersRequest
+ */
+func (a *FakeApiService) TestGroupParameters(ctx _context.Context) ApiTestGroupParametersRequest {
+ return ApiTestGroupParametersRequest{
+ ApiService: a,
ctx: ctx,
}
}
/*
-Execute executes the request
-*/
-func (r apiTestGroupParametersRequest) Execute() (*_nethttp.Response, error) {
+ * Execute executes the request
+ */
+func (a *FakeApiService) TestGroupParametersExecute(r ApiTestGroupParametersRequest) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodDelete
localVarPostBody interface{}
@@ -1270,7 +1526,7 @@ func (r apiTestGroupParametersRequest) Execute() (*_nethttp.Response, error) {
localVarFileBytes []byte
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestGroupParameters")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestGroupParameters")
if err != nil {
return nil, GenericOpenAPIError{error: err.Error()}
}
@@ -1319,12 +1575,12 @@ func (r apiTestGroupParametersRequest) Execute() (*_nethttp.Response, error) {
if r.booleanGroup != nil {
localVarHeaderParams["boolean_group"] = parameterToString(*r.booleanGroup, "")
}
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarHTTPResponse, err
}
@@ -1345,32 +1601,38 @@ func (r apiTestGroupParametersRequest) Execute() (*_nethttp.Response, error) {
return localVarHTTPResponse, nil
}
-type apiTestInlineAdditionalPropertiesRequest struct {
+
+type ApiTestInlineAdditionalPropertiesRequest struct {
ctx _context.Context
- apiService *FakeApiService
+ ApiService FakeApi
requestBody *map[string]string
}
-func (r apiTestInlineAdditionalPropertiesRequest) RequestBody(requestBody map[string]string) apiTestInlineAdditionalPropertiesRequest {
+func (r ApiTestInlineAdditionalPropertiesRequest) RequestBody(requestBody map[string]string) ApiTestInlineAdditionalPropertiesRequest {
r.requestBody = &requestBody
return r
}
+
+func (r ApiTestInlineAdditionalPropertiesRequest) Execute() (*_nethttp.Response, error) {
+ return r.ApiService.TestInlineAdditionalPropertiesExecute(r)
+}
+
/*
-TestInlineAdditionalProperties test inline additionalProperties
+ * TestInlineAdditionalProperties test inline additionalProperties
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
-@return apiTestInlineAdditionalPropertiesRequest
-*/
-func (a *FakeApiService) TestInlineAdditionalProperties(ctx _context.Context) apiTestInlineAdditionalPropertiesRequest {
- return apiTestInlineAdditionalPropertiesRequest{
- apiService: a,
+ * @return ApiTestInlineAdditionalPropertiesRequest
+ */
+func (a *FakeApiService) TestInlineAdditionalProperties(ctx _context.Context) ApiTestInlineAdditionalPropertiesRequest {
+ return ApiTestInlineAdditionalPropertiesRequest{
+ ApiService: a,
ctx: ctx,
}
}
/*
-Execute executes the request
-*/
-func (r apiTestInlineAdditionalPropertiesRequest) Execute() (*_nethttp.Response, error) {
+ * Execute executes the request
+ */
+func (a *FakeApiService) TestInlineAdditionalPropertiesExecute(r ApiTestInlineAdditionalPropertiesRequest) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
localVarPostBody interface{}
@@ -1379,7 +1641,7 @@ func (r apiTestInlineAdditionalPropertiesRequest) Execute() (*_nethttp.Response,
localVarFileBytes []byte
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestInlineAdditionalProperties")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestInlineAdditionalProperties")
if err != nil {
return nil, GenericOpenAPIError{error: err.Error()}
}
@@ -1412,12 +1674,12 @@ func (r apiTestInlineAdditionalPropertiesRequest) Execute() (*_nethttp.Response,
}
// body params
localVarPostBody = r.requestBody
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarHTTPResponse, err
}
@@ -1438,37 +1700,43 @@ func (r apiTestInlineAdditionalPropertiesRequest) Execute() (*_nethttp.Response,
return localVarHTTPResponse, nil
}
-type apiTestJsonFormDataRequest struct {
+
+type ApiTestJsonFormDataRequest struct {
ctx _context.Context
- apiService *FakeApiService
+ ApiService FakeApi
param *string
param2 *string
}
-func (r apiTestJsonFormDataRequest) Param(param string) apiTestJsonFormDataRequest {
+func (r ApiTestJsonFormDataRequest) Param(param string) ApiTestJsonFormDataRequest {
r.param = ¶m
return r
}
-func (r apiTestJsonFormDataRequest) Param2(param2 string) apiTestJsonFormDataRequest {
+func (r ApiTestJsonFormDataRequest) Param2(param2 string) ApiTestJsonFormDataRequest {
r.param2 = ¶m2
return r
}
+
+func (r ApiTestJsonFormDataRequest) Execute() (*_nethttp.Response, error) {
+ return r.ApiService.TestJsonFormDataExecute(r)
+}
+
/*
-TestJsonFormData test json serialization of form data
+ * 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().
-@return apiTestJsonFormDataRequest
-*/
-func (a *FakeApiService) TestJsonFormData(ctx _context.Context) apiTestJsonFormDataRequest {
- return apiTestJsonFormDataRequest{
- apiService: a,
+ * @return ApiTestJsonFormDataRequest
+ */
+func (a *FakeApiService) TestJsonFormData(ctx _context.Context) ApiTestJsonFormDataRequest {
+ return ApiTestJsonFormDataRequest{
+ ApiService: a,
ctx: ctx,
}
}
/*
-Execute executes the request
-*/
-func (r apiTestJsonFormDataRequest) Execute() (*_nethttp.Response, error) {
+ * Execute executes the request
+ */
+func (a *FakeApiService) TestJsonFormDataExecute(r ApiTestJsonFormDataRequest) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarPostBody interface{}
@@ -1477,7 +1745,7 @@ func (r apiTestJsonFormDataRequest) Execute() (*_nethttp.Response, error) {
localVarFileBytes []byte
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestJsonFormData")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestJsonFormData")
if err != nil {
return nil, GenericOpenAPIError{error: err.Error()}
}
@@ -1513,12 +1781,12 @@ func (r apiTestJsonFormDataRequest) Execute() (*_nethttp.Response, error) {
}
localVarFormParams.Add("param", parameterToString(*r.param, ""))
localVarFormParams.Add("param2", parameterToString(*r.param2, ""))
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarHTTPResponse, err
}
@@ -1539,9 +1807,10 @@ func (r apiTestJsonFormDataRequest) Execute() (*_nethttp.Response, error) {
return localVarHTTPResponse, nil
}
-type apiTestQueryParameterCollectionFormatRequest struct {
+
+type ApiTestQueryParameterCollectionFormatRequest struct {
ctx _context.Context
- apiService *FakeApiService
+ ApiService FakeApi
pipe *[]string
ioutil *[]string
http *[]string
@@ -1549,43 +1818,48 @@ type apiTestQueryParameterCollectionFormatRequest struct {
context *[]string
}
-func (r apiTestQueryParameterCollectionFormatRequest) Pipe(pipe []string) apiTestQueryParameterCollectionFormatRequest {
+func (r ApiTestQueryParameterCollectionFormatRequest) Pipe(pipe []string) ApiTestQueryParameterCollectionFormatRequest {
r.pipe = &pipe
return r
}
-func (r apiTestQueryParameterCollectionFormatRequest) Ioutil(ioutil []string) apiTestQueryParameterCollectionFormatRequest {
+func (r ApiTestQueryParameterCollectionFormatRequest) Ioutil(ioutil []string) ApiTestQueryParameterCollectionFormatRequest {
r.ioutil = &ioutil
return r
}
-func (r apiTestQueryParameterCollectionFormatRequest) Http(http []string) apiTestQueryParameterCollectionFormatRequest {
+func (r ApiTestQueryParameterCollectionFormatRequest) Http(http []string) ApiTestQueryParameterCollectionFormatRequest {
r.http = &http
return r
}
-func (r apiTestQueryParameterCollectionFormatRequest) Url(url []string) apiTestQueryParameterCollectionFormatRequest {
+func (r ApiTestQueryParameterCollectionFormatRequest) Url(url []string) ApiTestQueryParameterCollectionFormatRequest {
r.url = &url
return r
}
-func (r apiTestQueryParameterCollectionFormatRequest) Context(context []string) apiTestQueryParameterCollectionFormatRequest {
+func (r ApiTestQueryParameterCollectionFormatRequest) Context(context []string) ApiTestQueryParameterCollectionFormatRequest {
r.context = &context
return r
}
+
+func (r ApiTestQueryParameterCollectionFormatRequest) Execute() (*_nethttp.Response, error) {
+ return r.ApiService.TestQueryParameterCollectionFormatExecute(r)
+}
+
/*
-TestQueryParameterCollectionFormat Method for TestQueryParameterCollectionFormat
-To test the collection format in query parameters
+ * TestQueryParameterCollectionFormat Method for TestQueryParameterCollectionFormat
+ * 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().
-@return apiTestQueryParameterCollectionFormatRequest
-*/
-func (a *FakeApiService) TestQueryParameterCollectionFormat(ctx _context.Context) apiTestQueryParameterCollectionFormatRequest {
- return apiTestQueryParameterCollectionFormatRequest{
- apiService: a,
+ * @return ApiTestQueryParameterCollectionFormatRequest
+ */
+func (a *FakeApiService) TestQueryParameterCollectionFormat(ctx _context.Context) ApiTestQueryParameterCollectionFormatRequest {
+ return ApiTestQueryParameterCollectionFormatRequest{
+ ApiService: a,
ctx: ctx,
}
}
/*
-Execute executes the request
-*/
-func (r apiTestQueryParameterCollectionFormatRequest) Execute() (*_nethttp.Response, error) {
+ * Execute executes the request
+ */
+func (a *FakeApiService) TestQueryParameterCollectionFormatExecute(r ApiTestQueryParameterCollectionFormatRequest) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPut
localVarPostBody interface{}
@@ -1594,7 +1868,7 @@ func (r apiTestQueryParameterCollectionFormatRequest) Execute() (*_nethttp.Respo
localVarFileBytes []byte
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestQueryParameterCollectionFormat")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestQueryParameterCollectionFormat")
if err != nil {
return nil, GenericOpenAPIError{error: err.Error()}
}
@@ -1662,12 +1936,12 @@ func (r apiTestQueryParameterCollectionFormatRequest) Execute() (*_nethttp.Respo
if localVarHTTPHeaderAccept != "" {
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
}
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarHTTPResponse, err
}
diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/api_fake_classname_tags123.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_fake_classname_tags123.go
index 8efc1bb8e664..1d4ffc709605 100644
--- a/samples/openapi3/client/petstore/go-experimental/go-petstore/api_fake_classname_tags123.go
+++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_fake_classname_tags123.go
@@ -21,37 +21,59 @@ var (
_ _context.Context
)
+type FakeClassnameTags123Api interface {
+
+ /*
+ * TestClassname To test class name in snake case
+ * 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().
+ * @return ApiTestClassnameRequest
+ */
+ TestClassname(ctx _context.Context) ApiTestClassnameRequest
+
+ /*
+ * TestClassnameExecute executes the request
+ * @return Client
+ */
+ TestClassnameExecute(r ApiTestClassnameRequest) (Client, *_nethttp.Response, error)
+}
+
// FakeClassnameTags123ApiService FakeClassnameTags123Api service
type FakeClassnameTags123ApiService service
-type apiTestClassnameRequest struct {
+type ApiTestClassnameRequest struct {
ctx _context.Context
- apiService *FakeClassnameTags123ApiService
+ ApiService FakeClassnameTags123Api
client *Client
}
-func (r apiTestClassnameRequest) Client(client Client) apiTestClassnameRequest {
+func (r ApiTestClassnameRequest) Client(client Client) ApiTestClassnameRequest {
r.client = &client
return r
}
+
+func (r ApiTestClassnameRequest) Execute() (Client, *_nethttp.Response, error) {
+ return r.ApiService.TestClassnameExecute(r)
+}
+
/*
-TestClassname To test class name in snake case
-To test class name in snake case
+ * TestClassname To test class name in snake case
+ * 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().
-@return apiTestClassnameRequest
-*/
-func (a *FakeClassnameTags123ApiService) TestClassname(ctx _context.Context) apiTestClassnameRequest {
- return apiTestClassnameRequest{
- apiService: a,
+ * @return ApiTestClassnameRequest
+ */
+func (a *FakeClassnameTags123ApiService) TestClassname(ctx _context.Context) ApiTestClassnameRequest {
+ return ApiTestClassnameRequest{
+ ApiService: a,
ctx: ctx,
}
}
/*
-Execute executes the request
-@return Client
-*/
-func (r apiTestClassnameRequest) Execute() (Client, *_nethttp.Response, error) {
+ * Execute executes the request
+ * @return Client
+ */
+func (a *FakeClassnameTags123ApiService) TestClassnameExecute(r ApiTestClassnameRequest) (Client, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPatch
localVarPostBody interface{}
@@ -61,7 +83,7 @@ func (r apiTestClassnameRequest) Execute() (Client, *_nethttp.Response, error) {
localVarReturnValue Client
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "FakeClassnameTags123ApiService.TestClassname")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeClassnameTags123ApiService.TestClassname")
if err != nil {
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
}
@@ -108,12 +130,12 @@ func (r apiTestClassnameRequest) Execute() (Client, *_nethttp.Response, error) {
}
}
}
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return localVarReturnValue, nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarReturnValue, localVarHTTPResponse, err
}
@@ -132,7 +154,7 @@ func (r apiTestClassnameRequest) Execute() (Client, *_nethttp.Response, error) {
return localVarReturnValue, localVarHTTPResponse, newErr
}
- err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
body: localVarBody,
diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/api_pet.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_pet.go
index 318ee2f6ea28..ffcda6a8b2ea 100644
--- a/samples/openapi3/client/petstore/go-experimental/go-petstore/api_pet.go
+++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_pet.go
@@ -23,35 +23,164 @@ var (
_ _context.Context
)
+type PetApi interface {
+
+ /*
+ * 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().
+ * @return ApiAddPetRequest
+ */
+ AddPet(ctx _context.Context) ApiAddPetRequest
+
+ /*
+ * AddPetExecute executes the request
+ */
+ AddPetExecute(r ApiAddPetRequest) (*_nethttp.Response, error)
+
+ /*
+ * DeletePet Deletes a pet
+ * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param petId Pet id to delete
+ * @return ApiDeletePetRequest
+ */
+ DeletePet(ctx _context.Context, petId int64) ApiDeletePetRequest
+
+ /*
+ * DeletePetExecute executes the request
+ */
+ DeletePetExecute(r ApiDeletePetRequest) (*_nethttp.Response, error)
+
+ /*
+ * FindPetsByStatus Finds Pets by status
+ * 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().
+ * @return ApiFindPetsByStatusRequest
+ */
+ FindPetsByStatus(ctx _context.Context) ApiFindPetsByStatusRequest
+
+ /*
+ * FindPetsByStatusExecute executes the request
+ * @return []Pet
+ */
+ FindPetsByStatusExecute(r ApiFindPetsByStatusRequest) ([]Pet, *_nethttp.Response, error)
+
+ /*
+ * FindPetsByTags Finds Pets by tags
+ * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
+ * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @return ApiFindPetsByTagsRequest
+ */
+ FindPetsByTags(ctx _context.Context) ApiFindPetsByTagsRequest
+
+ /*
+ * FindPetsByTagsExecute executes the request
+ * @return []Pet
+ */
+ FindPetsByTagsExecute(r ApiFindPetsByTagsRequest) ([]Pet, *_nethttp.Response, error)
+
+ /*
+ * GetPetById Find pet by ID
+ * Returns a single pet
+ * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param petId ID of pet to return
+ * @return ApiGetPetByIdRequest
+ */
+ GetPetById(ctx _context.Context, petId int64) ApiGetPetByIdRequest
+
+ /*
+ * GetPetByIdExecute executes the request
+ * @return Pet
+ */
+ GetPetByIdExecute(r ApiGetPetByIdRequest) (Pet, *_nethttp.Response, error)
+
+ /*
+ * UpdatePet Update an existing pet
+ * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @return ApiUpdatePetRequest
+ */
+ UpdatePet(ctx _context.Context) ApiUpdatePetRequest
+
+ /*
+ * UpdatePetExecute executes the request
+ */
+ UpdatePetExecute(r ApiUpdatePetRequest) (*_nethttp.Response, error)
+
+ /*
+ * UpdatePetWithForm Updates a pet in the store with form data
+ * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param petId ID of pet that needs to be updated
+ * @return ApiUpdatePetWithFormRequest
+ */
+ UpdatePetWithForm(ctx _context.Context, petId int64) ApiUpdatePetWithFormRequest
+
+ /*
+ * UpdatePetWithFormExecute executes the request
+ */
+ UpdatePetWithFormExecute(r ApiUpdatePetWithFormRequest) (*_nethttp.Response, error)
+
+ /*
+ * UploadFile uploads an image
+ * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param petId ID of pet to update
+ * @return ApiUploadFileRequest
+ */
+ UploadFile(ctx _context.Context, petId int64) ApiUploadFileRequest
+
+ /*
+ * UploadFileExecute executes the request
+ * @return ApiResponse
+ */
+ UploadFileExecute(r ApiUploadFileRequest) (ApiResponse, *_nethttp.Response, error)
+
+ /*
+ * UploadFileWithRequiredFile uploads an image (required)
+ * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param petId ID of pet to update
+ * @return ApiUploadFileWithRequiredFileRequest
+ */
+ UploadFileWithRequiredFile(ctx _context.Context, petId int64) ApiUploadFileWithRequiredFileRequest
+
+ /*
+ * UploadFileWithRequiredFileExecute executes the request
+ * @return ApiResponse
+ */
+ UploadFileWithRequiredFileExecute(r ApiUploadFileWithRequiredFileRequest) (ApiResponse, *_nethttp.Response, error)
+}
+
// PetApiService PetApi service
type PetApiService service
-type apiAddPetRequest struct {
+type ApiAddPetRequest struct {
ctx _context.Context
- apiService *PetApiService
+ ApiService PetApi
pet *Pet
}
-func (r apiAddPetRequest) Pet(pet Pet) apiAddPetRequest {
+func (r ApiAddPetRequest) Pet(pet Pet) ApiAddPetRequest {
r.pet = &pet
return r
}
+
+func (r ApiAddPetRequest) Execute() (*_nethttp.Response, error) {
+ return r.ApiService.AddPetExecute(r)
+}
+
/*
-AddPet Add a new pet to the store
+ * 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().
-@return apiAddPetRequest
-*/
-func (a *PetApiService) AddPet(ctx _context.Context) apiAddPetRequest {
- return apiAddPetRequest{
- apiService: a,
+ * @return ApiAddPetRequest
+ */
+func (a *PetApiService) AddPet(ctx _context.Context) ApiAddPetRequest {
+ return ApiAddPetRequest{
+ ApiService: a,
ctx: ctx,
}
}
/*
-Execute executes the request
-*/
-func (r apiAddPetRequest) Execute() (*_nethttp.Response, error) {
+ * Execute executes the request
+ */
+func (a *PetApiService) AddPetExecute(r ApiAddPetRequest) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
localVarPostBody interface{}
@@ -60,7 +189,7 @@ func (r apiAddPetRequest) Execute() (*_nethttp.Response, error) {
localVarFileBytes []byte
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.AddPet")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.AddPet")
if err != nil {
return nil, GenericOpenAPIError{error: err.Error()}
}
@@ -93,12 +222,12 @@ func (r apiAddPetRequest) Execute() (*_nethttp.Response, error) {
}
// body params
localVarPostBody = r.pet
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarHTTPResponse, err
}
@@ -119,35 +248,41 @@ func (r apiAddPetRequest) Execute() (*_nethttp.Response, error) {
return localVarHTTPResponse, nil
}
-type apiDeletePetRequest struct {
+
+type ApiDeletePetRequest struct {
ctx _context.Context
- apiService *PetApiService
+ ApiService PetApi
petId int64
apiKey *string
}
-func (r apiDeletePetRequest) ApiKey(apiKey string) apiDeletePetRequest {
+func (r ApiDeletePetRequest) ApiKey(apiKey string) ApiDeletePetRequest {
r.apiKey = &apiKey
return r
}
+
+func (r ApiDeletePetRequest) Execute() (*_nethttp.Response, error) {
+ return r.ApiService.DeletePetExecute(r)
+}
+
/*
-DeletePet Deletes a pet
+ * DeletePet Deletes a pet
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param petId Pet id to delete
-@return apiDeletePetRequest
-*/
-func (a *PetApiService) DeletePet(ctx _context.Context, petId int64) apiDeletePetRequest {
- return apiDeletePetRequest{
- apiService: a,
+ * @return ApiDeletePetRequest
+ */
+func (a *PetApiService) DeletePet(ctx _context.Context, petId int64) ApiDeletePetRequest {
+ return ApiDeletePetRequest{
+ ApiService: a,
ctx: ctx,
petId: petId,
}
}
/*
-Execute executes the request
-*/
-func (r apiDeletePetRequest) Execute() (*_nethttp.Response, error) {
+ * Execute executes the request
+ */
+func (a *PetApiService) DeletePetExecute(r ApiDeletePetRequest) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodDelete
localVarPostBody interface{}
@@ -156,7 +291,7 @@ func (r apiDeletePetRequest) Execute() (*_nethttp.Response, error) {
localVarFileBytes []byte
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.DeletePet")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.DeletePet")
if err != nil {
return nil, GenericOpenAPIError{error: err.Error()}
}
@@ -188,12 +323,12 @@ func (r apiDeletePetRequest) Execute() (*_nethttp.Response, error) {
if r.apiKey != nil {
localVarHeaderParams["api_key"] = parameterToString(*r.apiKey, "")
}
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarHTTPResponse, err
}
@@ -214,34 +349,40 @@ func (r apiDeletePetRequest) Execute() (*_nethttp.Response, error) {
return localVarHTTPResponse, nil
}
-type apiFindPetsByStatusRequest struct {
+
+type ApiFindPetsByStatusRequest struct {
ctx _context.Context
- apiService *PetApiService
+ ApiService PetApi
status *[]string
}
-func (r apiFindPetsByStatusRequest) Status(status []string) apiFindPetsByStatusRequest {
+func (r ApiFindPetsByStatusRequest) Status(status []string) ApiFindPetsByStatusRequest {
r.status = &status
return r
}
+
+func (r ApiFindPetsByStatusRequest) Execute() ([]Pet, *_nethttp.Response, error) {
+ return r.ApiService.FindPetsByStatusExecute(r)
+}
+
/*
-FindPetsByStatus Finds Pets by status
-Multiple status values can be provided with comma separated strings
+ * FindPetsByStatus Finds Pets by status
+ * 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().
-@return apiFindPetsByStatusRequest
-*/
-func (a *PetApiService) FindPetsByStatus(ctx _context.Context) apiFindPetsByStatusRequest {
- return apiFindPetsByStatusRequest{
- apiService: a,
+ * @return ApiFindPetsByStatusRequest
+ */
+func (a *PetApiService) FindPetsByStatus(ctx _context.Context) ApiFindPetsByStatusRequest {
+ return ApiFindPetsByStatusRequest{
+ ApiService: a,
ctx: ctx,
}
}
/*
-Execute executes the request
-@return []Pet
-*/
-func (r apiFindPetsByStatusRequest) Execute() ([]Pet, *_nethttp.Response, error) {
+ * Execute executes the request
+ * @return []Pet
+ */
+func (a *PetApiService) FindPetsByStatusExecute(r ApiFindPetsByStatusRequest) ([]Pet, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarPostBody interface{}
@@ -251,7 +392,7 @@ func (r apiFindPetsByStatusRequest) Execute() ([]Pet, *_nethttp.Response, error)
localVarReturnValue []Pet
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.FindPetsByStatus")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.FindPetsByStatus")
if err != nil {
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
}
@@ -283,12 +424,12 @@ func (r apiFindPetsByStatusRequest) Execute() ([]Pet, *_nethttp.Response, error)
if localVarHTTPHeaderAccept != "" {
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
}
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return localVarReturnValue, nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarReturnValue, localVarHTTPResponse, err
}
@@ -307,7 +448,7 @@ func (r apiFindPetsByStatusRequest) Execute() ([]Pet, *_nethttp.Response, error)
return localVarReturnValue, localVarHTTPResponse, newErr
}
- err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
body: localVarBody,
@@ -318,34 +459,40 @@ func (r apiFindPetsByStatusRequest) Execute() ([]Pet, *_nethttp.Response, error)
return localVarReturnValue, localVarHTTPResponse, nil
}
-type apiFindPetsByTagsRequest struct {
+
+type ApiFindPetsByTagsRequest struct {
ctx _context.Context
- apiService *PetApiService
+ ApiService PetApi
tags *[]string
}
-func (r apiFindPetsByTagsRequest) Tags(tags []string) apiFindPetsByTagsRequest {
+func (r ApiFindPetsByTagsRequest) Tags(tags []string) ApiFindPetsByTagsRequest {
r.tags = &tags
return r
}
+
+func (r ApiFindPetsByTagsRequest) Execute() ([]Pet, *_nethttp.Response, error) {
+ return r.ApiService.FindPetsByTagsExecute(r)
+}
+
/*
-FindPetsByTags Finds Pets by tags
-Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
+ * FindPetsByTags Finds Pets by tags
+ * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
-@return apiFindPetsByTagsRequest
-*/
-func (a *PetApiService) FindPetsByTags(ctx _context.Context) apiFindPetsByTagsRequest {
- return apiFindPetsByTagsRequest{
- apiService: a,
+ * @return ApiFindPetsByTagsRequest
+ */
+func (a *PetApiService) FindPetsByTags(ctx _context.Context) ApiFindPetsByTagsRequest {
+ return ApiFindPetsByTagsRequest{
+ ApiService: a,
ctx: ctx,
}
}
/*
-Execute executes the request
-@return []Pet
-*/
-func (r apiFindPetsByTagsRequest) Execute() ([]Pet, *_nethttp.Response, error) {
+ * Execute executes the request
+ * @return []Pet
+ */
+func (a *PetApiService) FindPetsByTagsExecute(r ApiFindPetsByTagsRequest) ([]Pet, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarPostBody interface{}
@@ -355,7 +502,7 @@ func (r apiFindPetsByTagsRequest) Execute() ([]Pet, *_nethttp.Response, error) {
localVarReturnValue []Pet
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.FindPetsByTags")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.FindPetsByTags")
if err != nil {
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
}
@@ -387,12 +534,12 @@ func (r apiFindPetsByTagsRequest) Execute() ([]Pet, *_nethttp.Response, error) {
if localVarHTTPHeaderAccept != "" {
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
}
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return localVarReturnValue, nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarReturnValue, localVarHTTPResponse, err
}
@@ -411,7 +558,7 @@ func (r apiFindPetsByTagsRequest) Execute() ([]Pet, *_nethttp.Response, error) {
return localVarReturnValue, localVarHTTPResponse, newErr
}
- err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
body: localVarBody,
@@ -422,32 +569,38 @@ func (r apiFindPetsByTagsRequest) Execute() ([]Pet, *_nethttp.Response, error) {
return localVarReturnValue, localVarHTTPResponse, nil
}
-type apiGetPetByIdRequest struct {
+
+type ApiGetPetByIdRequest struct {
ctx _context.Context
- apiService *PetApiService
+ ApiService PetApi
petId int64
}
+
+func (r ApiGetPetByIdRequest) Execute() (Pet, *_nethttp.Response, error) {
+ return r.ApiService.GetPetByIdExecute(r)
+}
+
/*
-GetPetById Find pet by ID
-Returns a single pet
+ * GetPetById Find pet by ID
+ * Returns a single pet
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param petId ID of pet to return
-@return apiGetPetByIdRequest
-*/
-func (a *PetApiService) GetPetById(ctx _context.Context, petId int64) apiGetPetByIdRequest {
- return apiGetPetByIdRequest{
- apiService: a,
+ * @return ApiGetPetByIdRequest
+ */
+func (a *PetApiService) GetPetById(ctx _context.Context, petId int64) ApiGetPetByIdRequest {
+ return ApiGetPetByIdRequest{
+ ApiService: a,
ctx: ctx,
petId: petId,
}
}
/*
-Execute executes the request
-@return Pet
-*/
-func (r apiGetPetByIdRequest) Execute() (Pet, *_nethttp.Response, error) {
+ * Execute executes the request
+ * @return Pet
+ */
+func (a *PetApiService) GetPetByIdExecute(r ApiGetPetByIdRequest) (Pet, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarPostBody interface{}
@@ -457,7 +610,7 @@ func (r apiGetPetByIdRequest) Execute() (Pet, *_nethttp.Response, error) {
localVarReturnValue Pet
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.GetPetById")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.GetPetById")
if err != nil {
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
}
@@ -500,12 +653,12 @@ func (r apiGetPetByIdRequest) Execute() (Pet, *_nethttp.Response, error) {
}
}
}
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return localVarReturnValue, nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarReturnValue, localVarHTTPResponse, err
}
@@ -524,7 +677,7 @@ func (r apiGetPetByIdRequest) Execute() (Pet, *_nethttp.Response, error) {
return localVarReturnValue, localVarHTTPResponse, newErr
}
- err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
body: localVarBody,
@@ -535,32 +688,38 @@ func (r apiGetPetByIdRequest) Execute() (Pet, *_nethttp.Response, error) {
return localVarReturnValue, localVarHTTPResponse, nil
}
-type apiUpdatePetRequest struct {
+
+type ApiUpdatePetRequest struct {
ctx _context.Context
- apiService *PetApiService
+ ApiService PetApi
pet *Pet
}
-func (r apiUpdatePetRequest) Pet(pet Pet) apiUpdatePetRequest {
+func (r ApiUpdatePetRequest) Pet(pet Pet) ApiUpdatePetRequest {
r.pet = &pet
return r
}
+
+func (r ApiUpdatePetRequest) Execute() (*_nethttp.Response, error) {
+ return r.ApiService.UpdatePetExecute(r)
+}
+
/*
-UpdatePet Update an existing pet
+ * UpdatePet Update an existing pet
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
-@return apiUpdatePetRequest
-*/
-func (a *PetApiService) UpdatePet(ctx _context.Context) apiUpdatePetRequest {
- return apiUpdatePetRequest{
- apiService: a,
+ * @return ApiUpdatePetRequest
+ */
+func (a *PetApiService) UpdatePet(ctx _context.Context) ApiUpdatePetRequest {
+ return ApiUpdatePetRequest{
+ ApiService: a,
ctx: ctx,
}
}
/*
-Execute executes the request
-*/
-func (r apiUpdatePetRequest) Execute() (*_nethttp.Response, error) {
+ * Execute executes the request
+ */
+func (a *PetApiService) UpdatePetExecute(r ApiUpdatePetRequest) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPut
localVarPostBody interface{}
@@ -569,7 +728,7 @@ func (r apiUpdatePetRequest) Execute() (*_nethttp.Response, error) {
localVarFileBytes []byte
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.UpdatePet")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.UpdatePet")
if err != nil {
return nil, GenericOpenAPIError{error: err.Error()}
}
@@ -602,12 +761,12 @@ func (r apiUpdatePetRequest) Execute() (*_nethttp.Response, error) {
}
// body params
localVarPostBody = r.pet
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarHTTPResponse, err
}
@@ -628,40 +787,46 @@ func (r apiUpdatePetRequest) Execute() (*_nethttp.Response, error) {
return localVarHTTPResponse, nil
}
-type apiUpdatePetWithFormRequest struct {
+
+type ApiUpdatePetWithFormRequest struct {
ctx _context.Context
- apiService *PetApiService
+ ApiService PetApi
petId int64
name *string
status *string
}
-func (r apiUpdatePetWithFormRequest) Name(name string) apiUpdatePetWithFormRequest {
+func (r ApiUpdatePetWithFormRequest) Name(name string) ApiUpdatePetWithFormRequest {
r.name = &name
return r
}
-func (r apiUpdatePetWithFormRequest) Status(status string) apiUpdatePetWithFormRequest {
+func (r ApiUpdatePetWithFormRequest) Status(status string) ApiUpdatePetWithFormRequest {
r.status = &status
return r
}
+
+func (r ApiUpdatePetWithFormRequest) Execute() (*_nethttp.Response, error) {
+ return r.ApiService.UpdatePetWithFormExecute(r)
+}
+
/*
-UpdatePetWithForm Updates a pet in the store with form data
+ * UpdatePetWithForm Updates a pet in the store with form data
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param petId ID of pet that needs to be updated
-@return apiUpdatePetWithFormRequest
-*/
-func (a *PetApiService) UpdatePetWithForm(ctx _context.Context, petId int64) apiUpdatePetWithFormRequest {
- return apiUpdatePetWithFormRequest{
- apiService: a,
+ * @return ApiUpdatePetWithFormRequest
+ */
+func (a *PetApiService) UpdatePetWithForm(ctx _context.Context, petId int64) ApiUpdatePetWithFormRequest {
+ return ApiUpdatePetWithFormRequest{
+ ApiService: a,
ctx: ctx,
petId: petId,
}
}
/*
-Execute executes the request
-*/
-func (r apiUpdatePetWithFormRequest) Execute() (*_nethttp.Response, error) {
+ * Execute executes the request
+ */
+func (a *PetApiService) UpdatePetWithFormExecute(r ApiUpdatePetWithFormRequest) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
localVarPostBody interface{}
@@ -670,7 +835,7 @@ func (r apiUpdatePetWithFormRequest) Execute() (*_nethttp.Response, error) {
localVarFileBytes []byte
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.UpdatePetWithForm")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.UpdatePetWithForm")
if err != nil {
return nil, GenericOpenAPIError{error: err.Error()}
}
@@ -705,12 +870,12 @@ func (r apiUpdatePetWithFormRequest) Execute() (*_nethttp.Response, error) {
if r.status != nil {
localVarFormParams.Add("status", parameterToString(*r.status, ""))
}
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarHTTPResponse, err
}
@@ -731,41 +896,47 @@ func (r apiUpdatePetWithFormRequest) Execute() (*_nethttp.Response, error) {
return localVarHTTPResponse, nil
}
-type apiUploadFileRequest struct {
+
+type ApiUploadFileRequest struct {
ctx _context.Context
- apiService *PetApiService
+ ApiService PetApi
petId int64
additionalMetadata *string
file **os.File
}
-func (r apiUploadFileRequest) AdditionalMetadata(additionalMetadata string) apiUploadFileRequest {
+func (r ApiUploadFileRequest) AdditionalMetadata(additionalMetadata string) ApiUploadFileRequest {
r.additionalMetadata = &additionalMetadata
return r
}
-func (r apiUploadFileRequest) File(file *os.File) apiUploadFileRequest {
+func (r ApiUploadFileRequest) File(file *os.File) ApiUploadFileRequest {
r.file = &file
return r
}
+
+func (r ApiUploadFileRequest) Execute() (ApiResponse, *_nethttp.Response, error) {
+ return r.ApiService.UploadFileExecute(r)
+}
+
/*
-UploadFile uploads an image
+ * UploadFile uploads an image
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param petId ID of pet to update
-@return apiUploadFileRequest
-*/
-func (a *PetApiService) UploadFile(ctx _context.Context, petId int64) apiUploadFileRequest {
- return apiUploadFileRequest{
- apiService: a,
+ * @return ApiUploadFileRequest
+ */
+func (a *PetApiService) UploadFile(ctx _context.Context, petId int64) ApiUploadFileRequest {
+ return ApiUploadFileRequest{
+ ApiService: a,
ctx: ctx,
petId: petId,
}
}
/*
-Execute executes the request
-@return ApiResponse
-*/
-func (r apiUploadFileRequest) Execute() (ApiResponse, *_nethttp.Response, error) {
+ * Execute executes the request
+ * @return ApiResponse
+ */
+func (a *PetApiService) UploadFileExecute(r ApiUploadFileRequest) (ApiResponse, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
localVarPostBody interface{}
@@ -775,7 +946,7 @@ func (r apiUploadFileRequest) Execute() (ApiResponse, *_nethttp.Response, error)
localVarReturnValue ApiResponse
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.UploadFile")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.UploadFile")
if err != nil {
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
}
@@ -818,12 +989,12 @@ func (r apiUploadFileRequest) Execute() (ApiResponse, *_nethttp.Response, error)
localVarFileName = localVarFile.Name()
localVarFile.Close()
}
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return localVarReturnValue, nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarReturnValue, localVarHTTPResponse, err
}
@@ -842,7 +1013,7 @@ func (r apiUploadFileRequest) Execute() (ApiResponse, *_nethttp.Response, error)
return localVarReturnValue, localVarHTTPResponse, newErr
}
- err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
body: localVarBody,
@@ -853,41 +1024,47 @@ func (r apiUploadFileRequest) Execute() (ApiResponse, *_nethttp.Response, error)
return localVarReturnValue, localVarHTTPResponse, nil
}
-type apiUploadFileWithRequiredFileRequest struct {
+
+type ApiUploadFileWithRequiredFileRequest struct {
ctx _context.Context
- apiService *PetApiService
+ ApiService PetApi
petId int64
requiredFile **os.File
additionalMetadata *string
}
-func (r apiUploadFileWithRequiredFileRequest) RequiredFile(requiredFile *os.File) apiUploadFileWithRequiredFileRequest {
+func (r ApiUploadFileWithRequiredFileRequest) RequiredFile(requiredFile *os.File) ApiUploadFileWithRequiredFileRequest {
r.requiredFile = &requiredFile
return r
}
-func (r apiUploadFileWithRequiredFileRequest) AdditionalMetadata(additionalMetadata string) apiUploadFileWithRequiredFileRequest {
+func (r ApiUploadFileWithRequiredFileRequest) AdditionalMetadata(additionalMetadata string) ApiUploadFileWithRequiredFileRequest {
r.additionalMetadata = &additionalMetadata
return r
}
+
+func (r ApiUploadFileWithRequiredFileRequest) Execute() (ApiResponse, *_nethttp.Response, error) {
+ return r.ApiService.UploadFileWithRequiredFileExecute(r)
+}
+
/*
-UploadFileWithRequiredFile uploads an image (required)
+ * UploadFileWithRequiredFile uploads an image (required)
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param petId ID of pet to update
-@return apiUploadFileWithRequiredFileRequest
-*/
-func (a *PetApiService) UploadFileWithRequiredFile(ctx _context.Context, petId int64) apiUploadFileWithRequiredFileRequest {
- return apiUploadFileWithRequiredFileRequest{
- apiService: a,
+ * @return ApiUploadFileWithRequiredFileRequest
+ */
+func (a *PetApiService) UploadFileWithRequiredFile(ctx _context.Context, petId int64) ApiUploadFileWithRequiredFileRequest {
+ return ApiUploadFileWithRequiredFileRequest{
+ ApiService: a,
ctx: ctx,
petId: petId,
}
}
/*
-Execute executes the request
-@return ApiResponse
-*/
-func (r apiUploadFileWithRequiredFileRequest) Execute() (ApiResponse, *_nethttp.Response, error) {
+ * Execute executes the request
+ * @return ApiResponse
+ */
+func (a *PetApiService) UploadFileWithRequiredFileExecute(r ApiUploadFileWithRequiredFileRequest) (ApiResponse, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
localVarPostBody interface{}
@@ -897,7 +1074,7 @@ func (r apiUploadFileWithRequiredFileRequest) Execute() (ApiResponse, *_nethttp.
localVarReturnValue ApiResponse
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.UploadFileWithRequiredFile")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.UploadFileWithRequiredFile")
if err != nil {
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
}
@@ -940,12 +1117,12 @@ func (r apiUploadFileWithRequiredFileRequest) Execute() (ApiResponse, *_nethttp.
localVarFileName = localVarFile.Name()
localVarFile.Close()
}
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return localVarReturnValue, nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarReturnValue, localVarHTTPResponse, err
}
@@ -964,7 +1141,7 @@ func (r apiUploadFileWithRequiredFileRequest) Execute() (ApiResponse, *_nethttp.
return localVarReturnValue, localVarHTTPResponse, newErr
}
- err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
body: localVarBody,
diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/api_store.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_store.go
index 1857755301cf..d125470be925 100644
--- a/samples/openapi3/client/petstore/go-experimental/go-petstore/api_store.go
+++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_store.go
@@ -22,34 +22,98 @@ var (
_ _context.Context
)
+type StoreApi interface {
+
+ /*
+ * DeleteOrder Delete purchase order by ID
+ * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
+ * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param orderId ID of the order that needs to be deleted
+ * @return ApiDeleteOrderRequest
+ */
+ DeleteOrder(ctx _context.Context, orderId string) ApiDeleteOrderRequest
+
+ /*
+ * DeleteOrderExecute executes the request
+ */
+ DeleteOrderExecute(r ApiDeleteOrderRequest) (*_nethttp.Response, error)
+
+ /*
+ * GetInventory Returns pet inventories by status
+ * 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().
+ * @return ApiGetInventoryRequest
+ */
+ GetInventory(ctx _context.Context) ApiGetInventoryRequest
+
+ /*
+ * GetInventoryExecute executes the request
+ * @return map[string]int32
+ */
+ GetInventoryExecute(r ApiGetInventoryRequest) (map[string]int32, *_nethttp.Response, error)
+
+ /*
+ * GetOrderById Find purchase order by ID
+ * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
+ * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param orderId ID of pet that needs to be fetched
+ * @return ApiGetOrderByIdRequest
+ */
+ GetOrderById(ctx _context.Context, orderId int64) ApiGetOrderByIdRequest
+
+ /*
+ * GetOrderByIdExecute executes the request
+ * @return Order
+ */
+ GetOrderByIdExecute(r ApiGetOrderByIdRequest) (Order, *_nethttp.Response, error)
+
+ /*
+ * 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().
+ * @return ApiPlaceOrderRequest
+ */
+ PlaceOrder(ctx _context.Context) ApiPlaceOrderRequest
+
+ /*
+ * PlaceOrderExecute executes the request
+ * @return Order
+ */
+ PlaceOrderExecute(r ApiPlaceOrderRequest) (Order, *_nethttp.Response, error)
+}
+
// StoreApiService StoreApi service
type StoreApiService service
-type apiDeleteOrderRequest struct {
+type ApiDeleteOrderRequest struct {
ctx _context.Context
- apiService *StoreApiService
+ ApiService StoreApi
orderId string
}
+
+func (r ApiDeleteOrderRequest) Execute() (*_nethttp.Response, error) {
+ return r.ApiService.DeleteOrderExecute(r)
+}
+
/*
-DeleteOrder Delete purchase order by ID
-For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
+ * DeleteOrder Delete purchase order by ID
+ * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param orderId ID of the order that needs to be deleted
-@return apiDeleteOrderRequest
-*/
-func (a *StoreApiService) DeleteOrder(ctx _context.Context, orderId string) apiDeleteOrderRequest {
- return apiDeleteOrderRequest{
- apiService: a,
+ * @return ApiDeleteOrderRequest
+ */
+func (a *StoreApiService) DeleteOrder(ctx _context.Context, orderId string) ApiDeleteOrderRequest {
+ return ApiDeleteOrderRequest{
+ ApiService: a,
ctx: ctx,
orderId: orderId,
}
}
/*
-Execute executes the request
-*/
-func (r apiDeleteOrderRequest) Execute() (*_nethttp.Response, error) {
+ * Execute executes the request
+ */
+func (a *StoreApiService) DeleteOrderExecute(r ApiDeleteOrderRequest) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodDelete
localVarPostBody interface{}
@@ -58,7 +122,7 @@ func (r apiDeleteOrderRequest) Execute() (*_nethttp.Response, error) {
localVarFileBytes []byte
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "StoreApiService.DeleteOrder")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StoreApiService.DeleteOrder")
if err != nil {
return nil, GenericOpenAPIError{error: err.Error()}
}
@@ -87,12 +151,12 @@ func (r apiDeleteOrderRequest) Execute() (*_nethttp.Response, error) {
if localVarHTTPHeaderAccept != "" {
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
}
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarHTTPResponse, err
}
@@ -113,29 +177,35 @@ func (r apiDeleteOrderRequest) Execute() (*_nethttp.Response, error) {
return localVarHTTPResponse, nil
}
-type apiGetInventoryRequest struct {
+
+type ApiGetInventoryRequest struct {
ctx _context.Context
- apiService *StoreApiService
+ ApiService StoreApi
+}
+
+
+func (r ApiGetInventoryRequest) Execute() (map[string]int32, *_nethttp.Response, error) {
+ return r.ApiService.GetInventoryExecute(r)
}
/*
-GetInventory Returns pet inventories by status
-Returns a map of status codes to quantities
+ * GetInventory Returns pet inventories by status
+ * 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().
-@return apiGetInventoryRequest
-*/
-func (a *StoreApiService) GetInventory(ctx _context.Context) apiGetInventoryRequest {
- return apiGetInventoryRequest{
- apiService: a,
+ * @return ApiGetInventoryRequest
+ */
+func (a *StoreApiService) GetInventory(ctx _context.Context) ApiGetInventoryRequest {
+ return ApiGetInventoryRequest{
+ ApiService: a,
ctx: ctx,
}
}
/*
-Execute executes the request
-@return map[string]int32
-*/
-func (r apiGetInventoryRequest) Execute() (map[string]int32, *_nethttp.Response, error) {
+ * Execute executes the request
+ * @return map[string]int32
+ */
+func (a *StoreApiService) GetInventoryExecute(r ApiGetInventoryRequest) (map[string]int32, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarPostBody interface{}
@@ -145,7 +215,7 @@ func (r apiGetInventoryRequest) Execute() (map[string]int32, *_nethttp.Response,
localVarReturnValue map[string]int32
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "StoreApiService.GetInventory")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StoreApiService.GetInventory")
if err != nil {
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
}
@@ -187,12 +257,12 @@ func (r apiGetInventoryRequest) Execute() (map[string]int32, *_nethttp.Response,
}
}
}
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return localVarReturnValue, nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarReturnValue, localVarHTTPResponse, err
}
@@ -211,7 +281,7 @@ func (r apiGetInventoryRequest) Execute() (map[string]int32, *_nethttp.Response,
return localVarReturnValue, localVarHTTPResponse, newErr
}
- err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
body: localVarBody,
@@ -222,32 +292,38 @@ func (r apiGetInventoryRequest) Execute() (map[string]int32, *_nethttp.Response,
return localVarReturnValue, localVarHTTPResponse, nil
}
-type apiGetOrderByIdRequest struct {
+
+type ApiGetOrderByIdRequest struct {
ctx _context.Context
- apiService *StoreApiService
+ ApiService StoreApi
orderId int64
}
+
+func (r ApiGetOrderByIdRequest) Execute() (Order, *_nethttp.Response, error) {
+ return r.ApiService.GetOrderByIdExecute(r)
+}
+
/*
-GetOrderById Find purchase order by ID
-For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
+ * GetOrderById Find purchase order by ID
+ * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param orderId ID of pet that needs to be fetched
-@return apiGetOrderByIdRequest
-*/
-func (a *StoreApiService) GetOrderById(ctx _context.Context, orderId int64) apiGetOrderByIdRequest {
- return apiGetOrderByIdRequest{
- apiService: a,
+ * @return ApiGetOrderByIdRequest
+ */
+func (a *StoreApiService) GetOrderById(ctx _context.Context, orderId int64) ApiGetOrderByIdRequest {
+ return ApiGetOrderByIdRequest{
+ ApiService: a,
ctx: ctx,
orderId: orderId,
}
}
/*
-Execute executes the request
-@return Order
-*/
-func (r apiGetOrderByIdRequest) Execute() (Order, *_nethttp.Response, error) {
+ * Execute executes the request
+ * @return Order
+ */
+func (a *StoreApiService) GetOrderByIdExecute(r ApiGetOrderByIdRequest) (Order, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarPostBody interface{}
@@ -257,7 +333,7 @@ func (r apiGetOrderByIdRequest) Execute() (Order, *_nethttp.Response, error) {
localVarReturnValue Order
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "StoreApiService.GetOrderById")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StoreApiService.GetOrderById")
if err != nil {
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
}
@@ -292,12 +368,12 @@ func (r apiGetOrderByIdRequest) Execute() (Order, *_nethttp.Response, error) {
if localVarHTTPHeaderAccept != "" {
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
}
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return localVarReturnValue, nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarReturnValue, localVarHTTPResponse, err
}
@@ -316,7 +392,7 @@ func (r apiGetOrderByIdRequest) Execute() (Order, *_nethttp.Response, error) {
return localVarReturnValue, localVarHTTPResponse, newErr
}
- err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
body: localVarBody,
@@ -327,33 +403,39 @@ func (r apiGetOrderByIdRequest) Execute() (Order, *_nethttp.Response, error) {
return localVarReturnValue, localVarHTTPResponse, nil
}
-type apiPlaceOrderRequest struct {
+
+type ApiPlaceOrderRequest struct {
ctx _context.Context
- apiService *StoreApiService
+ ApiService StoreApi
order *Order
}
-func (r apiPlaceOrderRequest) Order(order Order) apiPlaceOrderRequest {
+func (r ApiPlaceOrderRequest) Order(order Order) ApiPlaceOrderRequest {
r.order = &order
return r
}
+
+func (r ApiPlaceOrderRequest) Execute() (Order, *_nethttp.Response, error) {
+ return r.ApiService.PlaceOrderExecute(r)
+}
+
/*
-PlaceOrder Place an order for a pet
+ * 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().
-@return apiPlaceOrderRequest
-*/
-func (a *StoreApiService) PlaceOrder(ctx _context.Context) apiPlaceOrderRequest {
- return apiPlaceOrderRequest{
- apiService: a,
+ * @return ApiPlaceOrderRequest
+ */
+func (a *StoreApiService) PlaceOrder(ctx _context.Context) ApiPlaceOrderRequest {
+ return ApiPlaceOrderRequest{
+ ApiService: a,
ctx: ctx,
}
}
/*
-Execute executes the request
-@return Order
-*/
-func (r apiPlaceOrderRequest) Execute() (Order, *_nethttp.Response, error) {
+ * Execute executes the request
+ * @return Order
+ */
+func (a *StoreApiService) PlaceOrderExecute(r ApiPlaceOrderRequest) (Order, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
localVarPostBody interface{}
@@ -363,7 +445,7 @@ func (r apiPlaceOrderRequest) Execute() (Order, *_nethttp.Response, error) {
localVarReturnValue Order
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "StoreApiService.PlaceOrder")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StoreApiService.PlaceOrder")
if err != nil {
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
}
@@ -396,12 +478,12 @@ func (r apiPlaceOrderRequest) Execute() (Order, *_nethttp.Response, error) {
}
// body params
localVarPostBody = r.order
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return localVarReturnValue, nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarReturnValue, localVarHTTPResponse, err
}
@@ -420,7 +502,7 @@ func (r apiPlaceOrderRequest) Execute() (Order, *_nethttp.Response, error) {
return localVarReturnValue, localVarHTTPResponse, newErr
}
- err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
body: localVarBody,
diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/api_user.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_user.go
index 4a8a6ac10c53..15fa65e12eaa 100644
--- a/samples/openapi3/client/petstore/go-experimental/go-petstore/api_user.go
+++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_user.go
@@ -22,36 +22,148 @@ var (
_ _context.Context
)
+type UserApi interface {
+
+ /*
+ * CreateUser Create user
+ * 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().
+ * @return ApiCreateUserRequest
+ */
+ CreateUser(ctx _context.Context) ApiCreateUserRequest
+
+ /*
+ * CreateUserExecute executes the request
+ */
+ CreateUserExecute(r ApiCreateUserRequest) (*_nethttp.Response, error)
+
+ /*
+ * 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().
+ * @return ApiCreateUsersWithArrayInputRequest
+ */
+ CreateUsersWithArrayInput(ctx _context.Context) ApiCreateUsersWithArrayInputRequest
+
+ /*
+ * CreateUsersWithArrayInputExecute executes the request
+ */
+ CreateUsersWithArrayInputExecute(r ApiCreateUsersWithArrayInputRequest) (*_nethttp.Response, error)
+
+ /*
+ * 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().
+ * @return ApiCreateUsersWithListInputRequest
+ */
+ CreateUsersWithListInput(ctx _context.Context) ApiCreateUsersWithListInputRequest
+
+ /*
+ * CreateUsersWithListInputExecute executes the request
+ */
+ CreateUsersWithListInputExecute(r ApiCreateUsersWithListInputRequest) (*_nethttp.Response, error)
+
+ /*
+ * DeleteUser Delete user
+ * 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 username The name that needs to be deleted
+ * @return ApiDeleteUserRequest
+ */
+ DeleteUser(ctx _context.Context, username string) ApiDeleteUserRequest
+
+ /*
+ * DeleteUserExecute executes the request
+ */
+ DeleteUserExecute(r ApiDeleteUserRequest) (*_nethttp.Response, error)
+
+ /*
+ * GetUserByName Get user by user name
+ * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param username The name that needs to be fetched. Use user1 for testing.
+ * @return ApiGetUserByNameRequest
+ */
+ GetUserByName(ctx _context.Context, username string) ApiGetUserByNameRequest
+
+ /*
+ * GetUserByNameExecute executes the request
+ * @return User
+ */
+ GetUserByNameExecute(r ApiGetUserByNameRequest) (User, *_nethttp.Response, error)
+
+ /*
+ * LoginUser Logs user into the system
+ * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @return ApiLoginUserRequest
+ */
+ LoginUser(ctx _context.Context) ApiLoginUserRequest
+
+ /*
+ * LoginUserExecute executes the request
+ * @return string
+ */
+ LoginUserExecute(r ApiLoginUserRequest) (string, *_nethttp.Response, error)
+
+ /*
+ * 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().
+ * @return ApiLogoutUserRequest
+ */
+ LogoutUser(ctx _context.Context) ApiLogoutUserRequest
+
+ /*
+ * LogoutUserExecute executes the request
+ */
+ LogoutUserExecute(r ApiLogoutUserRequest) (*_nethttp.Response, error)
+
+ /*
+ * UpdateUser Updated user
+ * 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 username name that need to be deleted
+ * @return ApiUpdateUserRequest
+ */
+ UpdateUser(ctx _context.Context, username string) ApiUpdateUserRequest
+
+ /*
+ * UpdateUserExecute executes the request
+ */
+ UpdateUserExecute(r ApiUpdateUserRequest) (*_nethttp.Response, error)
+}
+
// UserApiService UserApi service
type UserApiService service
-type apiCreateUserRequest struct {
+type ApiCreateUserRequest struct {
ctx _context.Context
- apiService *UserApiService
+ ApiService UserApi
user *User
}
-func (r apiCreateUserRequest) User(user User) apiCreateUserRequest {
+func (r ApiCreateUserRequest) User(user User) ApiCreateUserRequest {
r.user = &user
return r
}
+
+func (r ApiCreateUserRequest) Execute() (*_nethttp.Response, error) {
+ return r.ApiService.CreateUserExecute(r)
+}
+
/*
-CreateUser Create user
-This can only be done by the logged in user.
+ * CreateUser Create user
+ * 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().
-@return apiCreateUserRequest
-*/
-func (a *UserApiService) CreateUser(ctx _context.Context) apiCreateUserRequest {
- return apiCreateUserRequest{
- apiService: a,
+ * @return ApiCreateUserRequest
+ */
+func (a *UserApiService) CreateUser(ctx _context.Context) ApiCreateUserRequest {
+ return ApiCreateUserRequest{
+ ApiService: a,
ctx: ctx,
}
}
/*
-Execute executes the request
-*/
-func (r apiCreateUserRequest) Execute() (*_nethttp.Response, error) {
+ * Execute executes the request
+ */
+func (a *UserApiService) CreateUserExecute(r ApiCreateUserRequest) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
localVarPostBody interface{}
@@ -60,7 +172,7 @@ func (r apiCreateUserRequest) Execute() (*_nethttp.Response, error) {
localVarFileBytes []byte
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.CreateUser")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.CreateUser")
if err != nil {
return nil, GenericOpenAPIError{error: err.Error()}
}
@@ -93,12 +205,12 @@ func (r apiCreateUserRequest) Execute() (*_nethttp.Response, error) {
}
// body params
localVarPostBody = r.user
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarHTTPResponse, err
}
@@ -119,32 +231,38 @@ func (r apiCreateUserRequest) Execute() (*_nethttp.Response, error) {
return localVarHTTPResponse, nil
}
-type apiCreateUsersWithArrayInputRequest struct {
+
+type ApiCreateUsersWithArrayInputRequest struct {
ctx _context.Context
- apiService *UserApiService
+ ApiService UserApi
user *[]User
}
-func (r apiCreateUsersWithArrayInputRequest) User(user []User) apiCreateUsersWithArrayInputRequest {
+func (r ApiCreateUsersWithArrayInputRequest) User(user []User) ApiCreateUsersWithArrayInputRequest {
r.user = &user
return r
}
+
+func (r ApiCreateUsersWithArrayInputRequest) Execute() (*_nethttp.Response, error) {
+ return r.ApiService.CreateUsersWithArrayInputExecute(r)
+}
+
/*
-CreateUsersWithArrayInput Creates list of users with given input array
+ * 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().
-@return apiCreateUsersWithArrayInputRequest
-*/
-func (a *UserApiService) CreateUsersWithArrayInput(ctx _context.Context) apiCreateUsersWithArrayInputRequest {
- return apiCreateUsersWithArrayInputRequest{
- apiService: a,
+ * @return ApiCreateUsersWithArrayInputRequest
+ */
+func (a *UserApiService) CreateUsersWithArrayInput(ctx _context.Context) ApiCreateUsersWithArrayInputRequest {
+ return ApiCreateUsersWithArrayInputRequest{
+ ApiService: a,
ctx: ctx,
}
}
/*
-Execute executes the request
-*/
-func (r apiCreateUsersWithArrayInputRequest) Execute() (*_nethttp.Response, error) {
+ * Execute executes the request
+ */
+func (a *UserApiService) CreateUsersWithArrayInputExecute(r ApiCreateUsersWithArrayInputRequest) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
localVarPostBody interface{}
@@ -153,7 +271,7 @@ func (r apiCreateUsersWithArrayInputRequest) Execute() (*_nethttp.Response, erro
localVarFileBytes []byte
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.CreateUsersWithArrayInput")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.CreateUsersWithArrayInput")
if err != nil {
return nil, GenericOpenAPIError{error: err.Error()}
}
@@ -186,12 +304,12 @@ func (r apiCreateUsersWithArrayInputRequest) Execute() (*_nethttp.Response, erro
}
// body params
localVarPostBody = r.user
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarHTTPResponse, err
}
@@ -212,32 +330,38 @@ func (r apiCreateUsersWithArrayInputRequest) Execute() (*_nethttp.Response, erro
return localVarHTTPResponse, nil
}
-type apiCreateUsersWithListInputRequest struct {
+
+type ApiCreateUsersWithListInputRequest struct {
ctx _context.Context
- apiService *UserApiService
+ ApiService UserApi
user *[]User
}
-func (r apiCreateUsersWithListInputRequest) User(user []User) apiCreateUsersWithListInputRequest {
+func (r ApiCreateUsersWithListInputRequest) User(user []User) ApiCreateUsersWithListInputRequest {
r.user = &user
return r
}
+
+func (r ApiCreateUsersWithListInputRequest) Execute() (*_nethttp.Response, error) {
+ return r.ApiService.CreateUsersWithListInputExecute(r)
+}
+
/*
-CreateUsersWithListInput Creates list of users with given input array
+ * 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().
-@return apiCreateUsersWithListInputRequest
-*/
-func (a *UserApiService) CreateUsersWithListInput(ctx _context.Context) apiCreateUsersWithListInputRequest {
- return apiCreateUsersWithListInputRequest{
- apiService: a,
+ * @return ApiCreateUsersWithListInputRequest
+ */
+func (a *UserApiService) CreateUsersWithListInput(ctx _context.Context) ApiCreateUsersWithListInputRequest {
+ return ApiCreateUsersWithListInputRequest{
+ ApiService: a,
ctx: ctx,
}
}
/*
-Execute executes the request
-*/
-func (r apiCreateUsersWithListInputRequest) Execute() (*_nethttp.Response, error) {
+ * Execute executes the request
+ */
+func (a *UserApiService) CreateUsersWithListInputExecute(r ApiCreateUsersWithListInputRequest) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
localVarPostBody interface{}
@@ -246,7 +370,7 @@ func (r apiCreateUsersWithListInputRequest) Execute() (*_nethttp.Response, error
localVarFileBytes []byte
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.CreateUsersWithListInput")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.CreateUsersWithListInput")
if err != nil {
return nil, GenericOpenAPIError{error: err.Error()}
}
@@ -279,12 +403,12 @@ func (r apiCreateUsersWithListInputRequest) Execute() (*_nethttp.Response, error
}
// body params
localVarPostBody = r.user
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarHTTPResponse, err
}
@@ -305,31 +429,37 @@ func (r apiCreateUsersWithListInputRequest) Execute() (*_nethttp.Response, error
return localVarHTTPResponse, nil
}
-type apiDeleteUserRequest struct {
+
+type ApiDeleteUserRequest struct {
ctx _context.Context
- apiService *UserApiService
+ ApiService UserApi
username string
}
+
+func (r ApiDeleteUserRequest) Execute() (*_nethttp.Response, error) {
+ return r.ApiService.DeleteUserExecute(r)
+}
+
/*
-DeleteUser Delete user
-This can only be done by the logged in user.
+ * DeleteUser Delete user
+ * 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 username The name that needs to be deleted
-@return apiDeleteUserRequest
-*/
-func (a *UserApiService) DeleteUser(ctx _context.Context, username string) apiDeleteUserRequest {
- return apiDeleteUserRequest{
- apiService: a,
+ * @return ApiDeleteUserRequest
+ */
+func (a *UserApiService) DeleteUser(ctx _context.Context, username string) ApiDeleteUserRequest {
+ return ApiDeleteUserRequest{
+ ApiService: a,
ctx: ctx,
username: username,
}
}
/*
-Execute executes the request
-*/
-func (r apiDeleteUserRequest) Execute() (*_nethttp.Response, error) {
+ * Execute executes the request
+ */
+func (a *UserApiService) DeleteUserExecute(r ApiDeleteUserRequest) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodDelete
localVarPostBody interface{}
@@ -338,7 +468,7 @@ func (r apiDeleteUserRequest) Execute() (*_nethttp.Response, error) {
localVarFileBytes []byte
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.DeleteUser")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.DeleteUser")
if err != nil {
return nil, GenericOpenAPIError{error: err.Error()}
}
@@ -367,12 +497,12 @@ func (r apiDeleteUserRequest) Execute() (*_nethttp.Response, error) {
if localVarHTTPHeaderAccept != "" {
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
}
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarHTTPResponse, err
}
@@ -393,31 +523,37 @@ func (r apiDeleteUserRequest) Execute() (*_nethttp.Response, error) {
return localVarHTTPResponse, nil
}
-type apiGetUserByNameRequest struct {
+
+type ApiGetUserByNameRequest struct {
ctx _context.Context
- apiService *UserApiService
+ ApiService UserApi
username string
}
+
+func (r ApiGetUserByNameRequest) Execute() (User, *_nethttp.Response, error) {
+ return r.ApiService.GetUserByNameExecute(r)
+}
+
/*
-GetUserByName Get user by user name
+ * GetUserByName Get user by user name
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param username The name that needs to be fetched. Use user1 for testing.
-@return apiGetUserByNameRequest
-*/
-func (a *UserApiService) GetUserByName(ctx _context.Context, username string) apiGetUserByNameRequest {
- return apiGetUserByNameRequest{
- apiService: a,
+ * @return ApiGetUserByNameRequest
+ */
+func (a *UserApiService) GetUserByName(ctx _context.Context, username string) ApiGetUserByNameRequest {
+ return ApiGetUserByNameRequest{
+ ApiService: a,
ctx: ctx,
username: username,
}
}
/*
-Execute executes the request
-@return User
-*/
-func (r apiGetUserByNameRequest) Execute() (User, *_nethttp.Response, error) {
+ * Execute executes the request
+ * @return User
+ */
+func (a *UserApiService) GetUserByNameExecute(r ApiGetUserByNameRequest) (User, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarPostBody interface{}
@@ -427,7 +563,7 @@ func (r apiGetUserByNameRequest) Execute() (User, *_nethttp.Response, error) {
localVarReturnValue User
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.GetUserByName")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.GetUserByName")
if err != nil {
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
}
@@ -456,12 +592,12 @@ func (r apiGetUserByNameRequest) Execute() (User, *_nethttp.Response, error) {
if localVarHTTPHeaderAccept != "" {
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
}
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return localVarReturnValue, nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarReturnValue, localVarHTTPResponse, err
}
@@ -480,7 +616,7 @@ func (r apiGetUserByNameRequest) Execute() (User, *_nethttp.Response, error) {
return localVarReturnValue, localVarHTTPResponse, newErr
}
- err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
body: localVarBody,
@@ -491,38 +627,44 @@ func (r apiGetUserByNameRequest) Execute() (User, *_nethttp.Response, error) {
return localVarReturnValue, localVarHTTPResponse, nil
}
-type apiLoginUserRequest struct {
+
+type ApiLoginUserRequest struct {
ctx _context.Context
- apiService *UserApiService
+ ApiService UserApi
username *string
password *string
}
-func (r apiLoginUserRequest) Username(username string) apiLoginUserRequest {
+func (r ApiLoginUserRequest) Username(username string) ApiLoginUserRequest {
r.username = &username
return r
}
-func (r apiLoginUserRequest) Password(password string) apiLoginUserRequest {
+func (r ApiLoginUserRequest) Password(password string) ApiLoginUserRequest {
r.password = &password
return r
}
+
+func (r ApiLoginUserRequest) Execute() (string, *_nethttp.Response, error) {
+ return r.ApiService.LoginUserExecute(r)
+}
+
/*
-LoginUser Logs user into the system
+ * LoginUser Logs user into the system
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
-@return apiLoginUserRequest
-*/
-func (a *UserApiService) LoginUser(ctx _context.Context) apiLoginUserRequest {
- return apiLoginUserRequest{
- apiService: a,
+ * @return ApiLoginUserRequest
+ */
+func (a *UserApiService) LoginUser(ctx _context.Context) ApiLoginUserRequest {
+ return ApiLoginUserRequest{
+ ApiService: a,
ctx: ctx,
}
}
/*
-Execute executes the request
-@return string
-*/
-func (r apiLoginUserRequest) Execute() (string, *_nethttp.Response, error) {
+ * Execute executes the request
+ * @return string
+ */
+func (a *UserApiService) LoginUserExecute(r ApiLoginUserRequest) (string, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarPostBody interface{}
@@ -532,7 +674,7 @@ func (r apiLoginUserRequest) Execute() (string, *_nethttp.Response, error) {
localVarReturnValue string
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.LoginUser")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.LoginUser")
if err != nil {
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
}
@@ -568,12 +710,12 @@ func (r apiLoginUserRequest) Execute() (string, *_nethttp.Response, error) {
if localVarHTTPHeaderAccept != "" {
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
}
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return localVarReturnValue, nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarReturnValue, localVarHTTPResponse, err
}
@@ -592,7 +734,7 @@ func (r apiLoginUserRequest) Execute() (string, *_nethttp.Response, error) {
return localVarReturnValue, localVarHTTPResponse, newErr
}
- err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
body: localVarBody,
@@ -603,27 +745,33 @@ func (r apiLoginUserRequest) Execute() (string, *_nethttp.Response, error) {
return localVarReturnValue, localVarHTTPResponse, nil
}
-type apiLogoutUserRequest struct {
+
+type ApiLogoutUserRequest struct {
ctx _context.Context
- apiService *UserApiService
+ ApiService UserApi
+}
+
+
+func (r ApiLogoutUserRequest) Execute() (*_nethttp.Response, error) {
+ return r.ApiService.LogoutUserExecute(r)
}
/*
-LogoutUser Logs out current logged in user session
+ * 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().
-@return apiLogoutUserRequest
-*/
-func (a *UserApiService) LogoutUser(ctx _context.Context) apiLogoutUserRequest {
- return apiLogoutUserRequest{
- apiService: a,
+ * @return ApiLogoutUserRequest
+ */
+func (a *UserApiService) LogoutUser(ctx _context.Context) ApiLogoutUserRequest {
+ return ApiLogoutUserRequest{
+ ApiService: a,
ctx: ctx,
}
}
/*
-Execute executes the request
-*/
-func (r apiLogoutUserRequest) Execute() (*_nethttp.Response, error) {
+ * Execute executes the request
+ */
+func (a *UserApiService) LogoutUserExecute(r ApiLogoutUserRequest) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarPostBody interface{}
@@ -632,7 +780,7 @@ func (r apiLogoutUserRequest) Execute() (*_nethttp.Response, error) {
localVarFileBytes []byte
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.LogoutUser")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.LogoutUser")
if err != nil {
return nil, GenericOpenAPIError{error: err.Error()}
}
@@ -660,12 +808,12 @@ func (r apiLogoutUserRequest) Execute() (*_nethttp.Response, error) {
if localVarHTTPHeaderAccept != "" {
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
}
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarHTTPResponse, err
}
@@ -686,36 +834,42 @@ func (r apiLogoutUserRequest) Execute() (*_nethttp.Response, error) {
return localVarHTTPResponse, nil
}
-type apiUpdateUserRequest struct {
+
+type ApiUpdateUserRequest struct {
ctx _context.Context
- apiService *UserApiService
+ ApiService UserApi
username string
user *User
}
-func (r apiUpdateUserRequest) User(user User) apiUpdateUserRequest {
+func (r ApiUpdateUserRequest) User(user User) ApiUpdateUserRequest {
r.user = &user
return r
}
+
+func (r ApiUpdateUserRequest) Execute() (*_nethttp.Response, error) {
+ return r.ApiService.UpdateUserExecute(r)
+}
+
/*
-UpdateUser Updated user
-This can only be done by the logged in user.
+ * UpdateUser Updated user
+ * 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 username name that need to be deleted
-@return apiUpdateUserRequest
-*/
-func (a *UserApiService) UpdateUser(ctx _context.Context, username string) apiUpdateUserRequest {
- return apiUpdateUserRequest{
- apiService: a,
+ * @return ApiUpdateUserRequest
+ */
+func (a *UserApiService) UpdateUser(ctx _context.Context, username string) ApiUpdateUserRequest {
+ return ApiUpdateUserRequest{
+ ApiService: a,
ctx: ctx,
username: username,
}
}
/*
-Execute executes the request
-*/
-func (r apiUpdateUserRequest) Execute() (*_nethttp.Response, error) {
+ * Execute executes the request
+ */
+func (a *UserApiService) UpdateUserExecute(r ApiUpdateUserRequest) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPut
localVarPostBody interface{}
@@ -724,7 +878,7 @@ func (r apiUpdateUserRequest) Execute() (*_nethttp.Response, error) {
localVarFileBytes []byte
)
- localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.UpdateUser")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.UpdateUser")
if err != nil {
return nil, GenericOpenAPIError{error: err.Error()}
}
@@ -758,12 +912,12 @@ func (r apiUpdateUserRequest) Execute() (*_nethttp.Response, error) {
}
// body params
localVarPostBody = r.user
- req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return nil, err
}
- localVarHTTPResponse, err := r.apiService.client.callAPI(req)
+ localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarHTTPResponse, err
}
diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/client.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/client.go
index f38d68a6a607..a4194b6510e3 100644
--- a/samples/openapi3/client/petstore/go-experimental/go-petstore/client.go
+++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/client.go
@@ -47,19 +47,19 @@ type APIClient struct {
// API Services
- AnotherFakeApi *AnotherFakeApiService
+ AnotherFakeApi AnotherFakeApi
- DefaultApi *DefaultApiService
+ DefaultApi DefaultApi
- FakeApi *FakeApiService
+ FakeApi FakeApi
- FakeClassnameTags123Api *FakeClassnameTags123ApiService
+ FakeClassnameTags123Api FakeClassnameTags123Api
- PetApi *PetApiService
+ PetApi PetApi
- StoreApi *StoreApiService
+ StoreApi StoreApi
- UserApi *UserApiService
+ UserApi UserApi
}
type service struct {
diff --git a/samples/openapi3/client/petstore/go/go-petstore/api_another_fake.go b/samples/openapi3/client/petstore/go/go-petstore/api_another_fake.go
index 2dbbcb47db58..d0126855865e 100644
--- a/samples/openapi3/client/petstore/go/go-petstore/api_another_fake.go
+++ b/samples/openapi3/client/petstore/go/go-petstore/api_another_fake.go
@@ -26,12 +26,14 @@ var (
type AnotherFakeApiService service
/*
-Call123TestSpecialTags To test special tags
-To test special tags and operation ID starting with number
+ * Call123TestSpecialTags To test special tags
+ *
+ * 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 client client model
-@return Client
-*/
+ * @return Client
+ */
func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx _context.Context, client Client) (Client, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPatch
diff --git a/samples/openapi3/client/petstore/go/go-petstore/api_default.go b/samples/openapi3/client/petstore/go/go-petstore/api_default.go
index 0619c2c41dee..183a2d799f1b 100644
--- a/samples/openapi3/client/petstore/go/go-petstore/api_default.go
+++ b/samples/openapi3/client/petstore/go/go-petstore/api_default.go
@@ -26,10 +26,11 @@ var (
type DefaultApiService service
/*
-FooGet Method for FooGet
+ * FooGet Method for FooGet
+ *
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
-@return InlineResponseDefault
-*/
+ * @return InlineResponseDefault
+ */
func (a *DefaultApiService) FooGet(ctx _context.Context) (InlineResponseDefault, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
diff --git a/samples/openapi3/client/petstore/go/go-petstore/api_fake.go b/samples/openapi3/client/petstore/go/go-petstore/api_fake.go
index 1934c7bcc5ef..6e36a8816a3a 100644
--- a/samples/openapi3/client/petstore/go/go-petstore/api_fake.go
+++ b/samples/openapi3/client/petstore/go/go-petstore/api_fake.go
@@ -29,10 +29,11 @@ var (
type FakeApiService service
/*
-FakeHealthGet Health check endpoint
+ * FakeHealthGet Health check endpoint
+ *
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
-@return HealthCheckResult
-*/
+ * @return HealthCheckResult
+ */
func (a *FakeApiService) FakeHealthGet(ctx _context.Context) (HealthCheckResult, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
@@ -110,13 +111,14 @@ type FakeHttpSignatureTestOpts struct {
}
/*
-FakeHttpSignatureTest test http signature authentication
+ * FakeHttpSignatureTest test http signature authentication
+ *
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param pet Pet object that needs to be added to the store
* @param optional nil or *FakeHttpSignatureTestOpts - Optional Parameters:
* @param "Query1" (optional.String) - query parameter
* @param "Header1" (optional.String) - header parameter
-*/
+ */
func (a *FakeApiService) FakeHttpSignatureTest(ctx _context.Context, pet Pet, localVarOptionals *FakeHttpSignatureTestOpts) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
@@ -191,13 +193,15 @@ type FakeOuterBooleanSerializeOpts struct {
}
/*
-FakeOuterBooleanSerialize Method for FakeOuterBooleanSerialize
-Test serialization of outer boolean types
+ * FakeOuterBooleanSerialize Method for FakeOuterBooleanSerialize
+ *
+ * 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 optional nil or *FakeOuterBooleanSerializeOpts - Optional Parameters:
* @param "Body" (optional.Bool) - Input boolean as post body
-@return bool
-*/
+ * @return bool
+ */
func (a *FakeApiService) FakeOuterBooleanSerialize(ctx _context.Context, localVarOptionals *FakeOuterBooleanSerializeOpts) (bool, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
@@ -279,13 +283,15 @@ type FakeOuterCompositeSerializeOpts struct {
}
/*
-FakeOuterCompositeSerialize Method for FakeOuterCompositeSerialize
-Test serialization of object with outer number type
+ * FakeOuterCompositeSerialize Method for FakeOuterCompositeSerialize
+ *
+ * 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 optional nil or *FakeOuterCompositeSerializeOpts - Optional Parameters:
* @param "OuterComposite" (optional.Interface of OuterComposite) - Input composite as post body
-@return OuterComposite
-*/
+ * @return OuterComposite
+ */
func (a *FakeApiService) FakeOuterCompositeSerialize(ctx _context.Context, localVarOptionals *FakeOuterCompositeSerializeOpts) (OuterComposite, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
@@ -371,13 +377,15 @@ type FakeOuterNumberSerializeOpts struct {
}
/*
-FakeOuterNumberSerialize Method for FakeOuterNumberSerialize
-Test serialization of outer number types
+ * FakeOuterNumberSerialize Method for FakeOuterNumberSerialize
+ *
+ * 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 optional nil or *FakeOuterNumberSerializeOpts - Optional Parameters:
* @param "Body" (optional.Float32) - Input number as post body
-@return float32
-*/
+ * @return float32
+ */
func (a *FakeApiService) FakeOuterNumberSerialize(ctx _context.Context, localVarOptionals *FakeOuterNumberSerializeOpts) (float32, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
@@ -459,13 +467,15 @@ type FakeOuterStringSerializeOpts struct {
}
/*
-FakeOuterStringSerialize Method for FakeOuterStringSerialize
-Test serialization of outer string types
+ * FakeOuterStringSerialize Method for FakeOuterStringSerialize
+ *
+ * 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 optional nil or *FakeOuterStringSerializeOpts - Optional Parameters:
* @param "Body" (optional.String) - Input string as post body
-@return string
-*/
+ * @return string
+ */
func (a *FakeApiService) FakeOuterStringSerialize(ctx _context.Context, localVarOptionals *FakeOuterStringSerializeOpts) (string, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
@@ -542,11 +552,13 @@ func (a *FakeApiService) FakeOuterStringSerialize(ctx _context.Context, localVar
}
/*
-TestBodyWithFileSchema Method for TestBodyWithFileSchema
-For this test, the body for this request much reference a schema named `File`.
+ * TestBodyWithFileSchema Method for TestBodyWithFileSchema
+ *
+ * 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 fileSchemaTestClass
-*/
+ */
func (a *FakeApiService) TestBodyWithFileSchema(ctx _context.Context, fileSchemaTestClass FileSchemaTestClass) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPut
@@ -610,11 +622,12 @@ func (a *FakeApiService) TestBodyWithFileSchema(ctx _context.Context, fileSchema
}
/*
-TestBodyWithQueryParams Method for TestBodyWithQueryParams
+ * TestBodyWithQueryParams Method for TestBodyWithQueryParams
+ *
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param query
* @param user
-*/
+ */
func (a *FakeApiService) TestBodyWithQueryParams(ctx _context.Context, query string, user User) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPut
@@ -679,12 +692,14 @@ func (a *FakeApiService) TestBodyWithQueryParams(ctx _context.Context, query str
}
/*
-TestClientModel To test \"client\" model
-To test \"client\" model
+ * TestClientModel To test \"client\" model
+ *
+ * To test \"client\" model
+ *
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param client client model
-@return Client
-*/
+ * @return Client
+ */
func (a *FakeApiService) TestClientModel(ctx _context.Context, client Client) (Client, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPatch
@@ -772,8 +787,10 @@ type TestEndpointParametersOpts struct {
}
/*
-TestEndpointParameters Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
-Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+ * TestEndpointParameters Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+ *
+ * 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 number None
* @param double None
@@ -790,7 +807,7 @@ Fake endpoint for testing various parameters 假端點 偽のエンドポイン
* @param "DateTime" (optional.Time) - None
* @param "Password" (optional.String) - None
* @param "Callback" (optional.String) - None
-*/
+ */
func (a *FakeApiService) TestEndpointParameters(ctx _context.Context, number float32, double float64, patternWithoutDelimiter string, byte_ string, localVarOptionals *TestEndpointParametersOpts) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
@@ -922,8 +939,10 @@ type TestEnumParametersOpts struct {
}
/*
-TestEnumParameters To test enum parameters
-To test enum parameters
+ * TestEnumParameters To test enum parameters
+ *
+ * To test enum parameters
+ *
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param optional nil or *TestEnumParametersOpts - Optional Parameters:
* @param "EnumHeaderStringArray" (optional.Interface of []string) - Header parameter enum test (string array)
@@ -934,7 +953,7 @@ To test enum parameters
* @param "EnumQueryDouble" (optional.Float64) - Query parameter enum test (double)
* @param "EnumFormStringArray" (optional.Interface of []string) - Form parameter enum test (string array)
* @param "EnumFormString" (optional.String) - Form parameter enum test (string)
-*/
+ */
func (a *FakeApiService) TestEnumParameters(ctx _context.Context, localVarOptionals *TestEnumParametersOpts) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
@@ -1035,8 +1054,10 @@ type TestGroupParametersOpts struct {
}
/*
-TestGroupParameters Fake endpoint to test group parameters (optional)
-Fake endpoint to test group parameters (optional)
+ * TestGroupParameters Fake endpoint to test group parameters (optional)
+ *
+ * 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 requiredStringGroup Required String in group parameters
* @param requiredBooleanGroup Required Boolean in group parameters
@@ -1045,7 +1066,7 @@ Fake endpoint to test group parameters (optional)
* @param "StringGroup" (optional.Int32) - String in group parameters
* @param "BooleanGroup" (optional.Bool) - Boolean in group parameters
* @param "Int64Group" (optional.Int64) - Integer in group parameters
-*/
+ */
func (a *FakeApiService) TestGroupParameters(ctx _context.Context, requiredStringGroup int32, requiredBooleanGroup bool, requiredInt64Group int64, localVarOptionals *TestGroupParametersOpts) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodDelete
@@ -1119,10 +1140,11 @@ func (a *FakeApiService) TestGroupParameters(ctx _context.Context, requiredStrin
}
/*
-TestInlineAdditionalProperties test inline additionalProperties
+ * TestInlineAdditionalProperties test inline additionalProperties
+ *
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param requestBody request body
-*/
+ */
func (a *FakeApiService) TestInlineAdditionalProperties(ctx _context.Context, requestBody map[string]string) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
@@ -1186,11 +1208,12 @@ func (a *FakeApiService) TestInlineAdditionalProperties(ctx _context.Context, re
}
/*
-TestJsonFormData test json serialization of form data
+ * 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 param field1
* @param param2 field2
-*/
+ */
func (a *FakeApiService) TestJsonFormData(ctx _context.Context, param string, param2 string) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
@@ -1254,15 +1277,17 @@ func (a *FakeApiService) TestJsonFormData(ctx _context.Context, param string, pa
}
/*
-TestQueryParameterCollectionFormat Method for TestQueryParameterCollectionFormat
-To test the collection format in query parameters
+ * TestQueryParameterCollectionFormat Method for TestQueryParameterCollectionFormat
+ *
+ * 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 pipe
* @param ioutil
* @param http
* @param url
* @param context
-*/
+ */
func (a *FakeApiService) TestQueryParameterCollectionFormat(ctx _context.Context, pipe []string, ioutil []string, http []string, url []string, context []string) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPut
diff --git a/samples/openapi3/client/petstore/go/go-petstore/api_fake_classname_tags123.go b/samples/openapi3/client/petstore/go/go-petstore/api_fake_classname_tags123.go
index 68d75806e10d..c0d1668e7912 100644
--- a/samples/openapi3/client/petstore/go/go-petstore/api_fake_classname_tags123.go
+++ b/samples/openapi3/client/petstore/go/go-petstore/api_fake_classname_tags123.go
@@ -26,12 +26,14 @@ var (
type FakeClassnameTags123ApiService service
/*
-TestClassname To test class name in snake case
-To test class name in snake case
+ * TestClassname To test class name in snake case
+ *
+ * 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 client client model
-@return Client
-*/
+ * @return Client
+ */
func (a *FakeClassnameTags123ApiService) TestClassname(ctx _context.Context, client Client) (Client, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPatch
diff --git a/samples/openapi3/client/petstore/go/go-petstore/api_pet.go b/samples/openapi3/client/petstore/go/go-petstore/api_pet.go
index 5e781bf15cd3..fb17f2361104 100644
--- a/samples/openapi3/client/petstore/go/go-petstore/api_pet.go
+++ b/samples/openapi3/client/petstore/go/go-petstore/api_pet.go
@@ -29,10 +29,11 @@ var (
type PetApiService service
/*
-AddPet Add a new pet to the store
+ * 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 pet Pet object that needs to be added to the store
-*/
+ */
func (a *PetApiService) AddPet(ctx _context.Context, pet Pet) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
@@ -101,12 +102,13 @@ type DeletePetOpts struct {
}
/*
-DeletePet Deletes a pet
+ * DeletePet Deletes a pet
+ *
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param petId Pet id to delete
* @param optional nil or *DeletePetOpts - Optional Parameters:
* @param "ApiKey" (optional.String) -
-*/
+ */
func (a *PetApiService) DeletePet(ctx _context.Context, petId int64, localVarOptionals *DeletePetOpts) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodDelete
@@ -173,12 +175,14 @@ func (a *PetApiService) DeletePet(ctx _context.Context, petId int64, localVarOpt
}
/*
-FindPetsByStatus Finds Pets by status
-Multiple status values can be provided with comma separated strings
+ * FindPetsByStatus Finds Pets by status
+ *
+ * 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 status Status values that need to be considered for filter
-@return []Pet
-*/
+ * @return []Pet
+ */
func (a *PetApiService) FindPetsByStatus(ctx _context.Context, status []string) ([]Pet, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
@@ -251,12 +255,14 @@ func (a *PetApiService) FindPetsByStatus(ctx _context.Context, status []string)
}
/*
-FindPetsByTags Finds Pets by tags
-Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
+ * FindPetsByTags Finds Pets by tags
+ *
+ * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
+ *
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param tags Tags to filter by
-@return []Pet
-*/
+ * @return []Pet
+ */
func (a *PetApiService) FindPetsByTags(ctx _context.Context, tags []string) ([]Pet, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
@@ -329,12 +335,14 @@ func (a *PetApiService) FindPetsByTags(ctx _context.Context, tags []string) ([]P
}
/*
-GetPetById Find pet by ID
-Returns a single pet
+ * GetPetById Find pet by ID
+ *
+ * Returns a single pet
+ *
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param petId ID of pet to return
-@return Pet
-*/
+ * @return Pet
+ */
func (a *PetApiService) GetPetById(ctx _context.Context, petId int64) (Pet, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
@@ -420,10 +428,11 @@ func (a *PetApiService) GetPetById(ctx _context.Context, petId int64) (Pet, *_ne
}
/*
-UpdatePet Update an existing pet
+ * UpdatePet Update an existing pet
+ *
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param pet Pet object that needs to be added to the store
-*/
+ */
func (a *PetApiService) UpdatePet(ctx _context.Context, pet Pet) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPut
@@ -493,13 +502,14 @@ type UpdatePetWithFormOpts struct {
}
/*
-UpdatePetWithForm Updates a pet in the store with form data
+ * UpdatePetWithForm Updates a pet in the store with form data
+ *
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param petId ID of pet that needs to be updated
* @param optional nil or *UpdatePetWithFormOpts - Optional Parameters:
* @param "Name" (optional.String) - Updated name of the pet
* @param "Status" (optional.String) - Updated status of the pet
-*/
+ */
func (a *PetApiService) UpdatePetWithForm(ctx _context.Context, petId int64, localVarOptionals *UpdatePetWithFormOpts) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
@@ -575,14 +585,15 @@ type UploadFileOpts struct {
}
/*
-UploadFile uploads an image
+ * UploadFile uploads an image
+ *
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param petId ID of pet to update
* @param optional nil or *UploadFileOpts - Optional Parameters:
* @param "AdditionalMetadata" (optional.String) - Additional data to pass to server
* @param "File" (optional.Interface of *os.File) - file to upload
-@return ApiResponse
-*/
+ * @return ApiResponse
+ */
func (a *PetApiService) UploadFile(ctx _context.Context, petId int64, localVarOptionals *UploadFileOpts) (ApiResponse, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
@@ -679,14 +690,15 @@ type UploadFileWithRequiredFileOpts struct {
}
/*
-UploadFileWithRequiredFile uploads an image (required)
+ * UploadFileWithRequiredFile uploads an image (required)
+ *
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param petId ID of pet to update
* @param requiredFile file to upload
* @param optional nil or *UploadFileWithRequiredFileOpts - Optional Parameters:
* @param "AdditionalMetadata" (optional.String) - Additional data to pass to server
-@return ApiResponse
-*/
+ * @return ApiResponse
+ */
func (a *PetApiService) UploadFileWithRequiredFile(ctx _context.Context, petId int64, requiredFile *os.File, localVarOptionals *UploadFileWithRequiredFileOpts) (ApiResponse, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
diff --git a/samples/openapi3/client/petstore/go/go-petstore/api_store.go b/samples/openapi3/client/petstore/go/go-petstore/api_store.go
index 4685c6275738..f683edb1814f 100644
--- a/samples/openapi3/client/petstore/go/go-petstore/api_store.go
+++ b/samples/openapi3/client/petstore/go/go-petstore/api_store.go
@@ -27,11 +27,13 @@ var (
type StoreApiService service
/*
-DeleteOrder Delete purchase order by ID
-For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
+ * DeleteOrder Delete purchase order by ID
+ *
+ * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
+ *
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param orderId ID of the order that needs to be deleted
-*/
+ */
func (a *StoreApiService) DeleteOrder(ctx _context.Context, orderId string) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodDelete
@@ -95,11 +97,13 @@ func (a *StoreApiService) DeleteOrder(ctx _context.Context, orderId string) (*_n
}
/*
-GetInventory Returns pet inventories by status
-Returns a map of status codes to quantities
+ * GetInventory Returns pet inventories by status
+ *
+ * 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().
-@return map[string]int32
-*/
+ * @return map[string]int32
+ */
func (a *StoreApiService) GetInventory(ctx _context.Context) (map[string]int32, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
@@ -183,12 +187,14 @@ func (a *StoreApiService) GetInventory(ctx _context.Context) (map[string]int32,
}
/*
-GetOrderById Find purchase order by ID
-For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
+ * GetOrderById Find purchase order by ID
+ *
+ * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
+ *
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param orderId ID of pet that needs to be fetched
-@return Order
-*/
+ * @return Order
+ */
func (a *StoreApiService) GetOrderById(ctx _context.Context, orderId int64) (Order, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
@@ -268,11 +274,12 @@ func (a *StoreApiService) GetOrderById(ctx _context.Context, orderId int64) (Ord
}
/*
-PlaceOrder Place an order for a pet
+ * 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 order order placed for purchasing the pet
-@return Order
-*/
+ * @return Order
+ */
func (a *StoreApiService) PlaceOrder(ctx _context.Context, order Order) (Order, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
diff --git a/samples/openapi3/client/petstore/go/go-petstore/api_user.go b/samples/openapi3/client/petstore/go/go-petstore/api_user.go
index c026ecce3241..ad3e4e42c145 100644
--- a/samples/openapi3/client/petstore/go/go-petstore/api_user.go
+++ b/samples/openapi3/client/petstore/go/go-petstore/api_user.go
@@ -27,11 +27,13 @@ var (
type UserApiService service
/*
-CreateUser Create user
-This can only be done by the logged in user.
+ * CreateUser Create user
+ *
+ * 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 user Created user object
-*/
+ */
func (a *UserApiService) CreateUser(ctx _context.Context, user User) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
@@ -95,10 +97,11 @@ func (a *UserApiService) CreateUser(ctx _context.Context, user User) (*_nethttp.
}
/*
-CreateUsersWithArrayInput Creates list of users with given input array
+ * 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 user List of user object
-*/
+ */
func (a *UserApiService) CreateUsersWithArrayInput(ctx _context.Context, user []User) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
@@ -162,10 +165,11 @@ func (a *UserApiService) CreateUsersWithArrayInput(ctx _context.Context, user []
}
/*
-CreateUsersWithListInput Creates list of users with given input array
+ * 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 user List of user object
-*/
+ */
func (a *UserApiService) CreateUsersWithListInput(ctx _context.Context, user []User) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
@@ -229,11 +233,13 @@ func (a *UserApiService) CreateUsersWithListInput(ctx _context.Context, user []U
}
/*
-DeleteUser Delete user
-This can only be done by the logged in user.
+ * DeleteUser Delete user
+ *
+ * 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 username The name that needs to be deleted
-*/
+ */
func (a *UserApiService) DeleteUser(ctx _context.Context, username string) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodDelete
@@ -297,11 +303,12 @@ func (a *UserApiService) DeleteUser(ctx _context.Context, username string) (*_ne
}
/*
-GetUserByName Get user by user name
+ * GetUserByName Get user by user name
+ *
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param username The name that needs to be fetched. Use user1 for testing.
-@return User
-*/
+ * @return User
+ */
func (a *UserApiService) GetUserByName(ctx _context.Context, username string) (User, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
@@ -375,12 +382,13 @@ func (a *UserApiService) GetUserByName(ctx _context.Context, username string) (U
}
/*
-LoginUser Logs user into the system
+ * 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 username The user name for login
* @param password The password for login in clear text
-@return string
-*/
+ * @return string
+ */
func (a *UserApiService) LoginUser(ctx _context.Context, username string, password string) (string, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
@@ -454,9 +462,10 @@ func (a *UserApiService) LoginUser(ctx _context.Context, username string, passwo
}
/*
-LogoutUser Logs out current logged in user session
+ * 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().
-*/
+ */
func (a *UserApiService) LogoutUser(ctx _context.Context) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
@@ -518,12 +527,14 @@ func (a *UserApiService) LogoutUser(ctx _context.Context) (*_nethttp.Response, e
}
/*
-UpdateUser Updated user
-This can only be done by the logged in user.
+ * UpdateUser Updated user
+ *
+ * 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 username name that need to be deleted
* @param user Updated user object
-*/
+ */
func (a *UserApiService) UpdateUser(ctx _context.Context, username string, user User) (*_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPut