Removes secondaryParam and hasMore (#7882)

* Removes secondaryParam and hasMore

* Fixes tests

* Only uses bodyParam in groovy template
This commit is contained in:
Justin Black 2020-11-06 19:04:12 -08:00 committed by GitHub
parent 05515040d5
commit 08fb59009a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
483 changed files with 1547 additions and 1979 deletions

View File

@ -264,7 +264,7 @@ Method | HTTP request | Description
{{#operation}} {{#operation}}
<a name="{{operationId}}"></a> <a name="{{operationId}}"></a>
# **{{operationId}}** # **{{operationId}}**
> {{#returnType}}{{returnType}} {{/returnType}}{{operationId}}({{#allParams}}{{{paramName}}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) > {{#returnType}}{{returnType}} {{/returnType}}{{operationId}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}})
{{summary}}{{#notes}} {{summary}}{{#notes}}
@ -287,8 +287,8 @@ Name | Type | Description | Notes
### HTTP request headers ### HTTP request headers
- **Content-Type**: {{#consumes}}{{{mediaType}}}{{#hasMore}}, {{/hasMore}}{{/consumes}}{{^consumes}}Not defined{{/consumes}} - **Content-Type**: {{#consumes}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/consumes}}{{^consumes}}Not defined{{/consumes}}
- **Accept**: {{#produces}}{{{mediaType}}}{{#hasMore}}, {{/hasMore}}{{/produces}}{{^produces}}Not defined{{/produces}} - **Accept**: {{#produces}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/produces}}{{^produces}}Not defined{{/produces}}
{{/operation}} {{/operation}}
{{/operations}} {{/operations}}

View File

@ -173,7 +173,7 @@ index 49b17c7..16ee191 100644
@Deprecated @Deprecated
{{/isDeprecated}} {{/isDeprecated}}
+ @Loggable(Loggable.INFO) + @Loggable(Loggable.INFO)
public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws ApiException { public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException {
Object {{localVariablePrefix}}localVarPostBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}new Object(){{/bodyParam}}; Object {{localVariablePrefix}}localVarPostBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}new Object(){{/bodyParam}};
{{#allParams}}{{#required}} {{#allParams}}{{#required}}
@ -610,9 +610,7 @@ A `Pet` model with three properties will provide a _lot_ of information about th
"jsonSchema" : "{\n \"type\" : \"integer\",\n \"format\" : \"int64\"\n}", "jsonSchema" : "{\n \"type\" : \"integer\",\n \"format\" : \"int64\"\n}",
"exclusiveMinimum" : false, "exclusiveMinimum" : false,
"exclusiveMaximum" : false, "exclusiveMaximum" : false,
"hasMore" : true,
"required" : true, "required" : true,
"secondaryParam" : false,
"hasMoreNonReadOnly" : true, "hasMoreNonReadOnly" : true,
"isPrimitiveType" : true, "isPrimitiveType" : true,
"isModel" : false, "isModel" : false,
@ -662,9 +660,7 @@ A `Pet` model with three properties will provide a _lot_ of information about th
"jsonSchema" : "{\n \"type\" : \"string\"\n}", "jsonSchema" : "{\n \"type\" : \"string\"\n}",
"exclusiveMinimum" : false, "exclusiveMinimum" : false,
"exclusiveMaximum" : false, "exclusiveMaximum" : false,
"hasMore" : true,
"required" : true, "required" : true,
"secondaryParam" : false,
"hasMoreNonReadOnly" : true, "hasMoreNonReadOnly" : true,
"isPrimitiveType" : true, "isPrimitiveType" : true,
"isModel" : false, "isModel" : false,
@ -714,9 +710,7 @@ A `Pet` model with three properties will provide a _lot_ of information about th
"jsonSchema" : "{\n \"type\" : \"string\"\n}", "jsonSchema" : "{\n \"type\" : \"string\"\n}",
"exclusiveMinimum" : false, "exclusiveMinimum" : false,
"exclusiveMaximum" : false, "exclusiveMaximum" : false,
"hasMore" : false,
"required" : false, "required" : false,
"secondaryParam" : false,
"hasMoreNonReadOnly" : false, "hasMoreNonReadOnly" : false,
"isPrimitiveType" : true, "isPrimitiveType" : true,
"isModel" : false, "isModel" : false,
@ -954,10 +948,8 @@ definitions:
colDataTypeArguments: colDataTypeArguments:
- argumentValue: 16 - argumentValue: 16
isString: false isString: false
hasMore: true
- argumentValue: 4 - argumentValue: 4
isString: false isString: false
hasMore: false
colUnsigned: true colUnsigned: true
colNotNull: true colNotNull: true
colDefault: colDefault:

View File

@ -21,13 +21,11 @@ import java.util.*;
public class CodegenCallback { public class CodegenCallback {
public String name; public String name;
public boolean hasMore;
public List<Url> urls = new ArrayList<>(); public List<Url> urls = new ArrayList<>();
public Map<String, Object> vendorExtensions = new HashMap<>(); public Map<String, Object> vendorExtensions = new HashMap<>();
public static class Url { public static class Url {
public String expression; public String expression;
public boolean hasMore;
public List<CodegenOperation> requests = new ArrayList<>(); public List<CodegenOperation> requests = new ArrayList<>();
public Map<String, Object> vendorExtensions = new HashMap<>(); public Map<String, Object> vendorExtensions = new HashMap<>();
@ -37,12 +35,12 @@ public class CodegenCallback {
if (o == null || getClass() != o.getClass()) return false; if (o == null || getClass() != o.getClass()) return false;
Url that = (Url) o; Url that = (Url) o;
return Objects.equals(that.expression, expression) && Objects.equals(that.hasMore, hasMore) && return Objects.equals(that.expression, expression) &&
Objects.equals(that.requests, requests) && Objects.equals(that.vendorExtensions, vendorExtensions); Objects.equals(that.requests, requests) && Objects.equals(that.vendorExtensions, vendorExtensions);
} }
@Override @Override
public int hashCode() { public int hashCode() {
return Objects.hash(expression, hasMore, requests, vendorExtensions); return Objects.hash(expression, requests, vendorExtensions);
} }
@Override @Override
@ -62,13 +60,13 @@ public class CodegenCallback {
if (o == null || getClass() != o.getClass()) return false; if (o == null || getClass() != o.getClass()) return false;
CodegenCallback that = (CodegenCallback) o; CodegenCallback that = (CodegenCallback) o;
return Objects.equals(that.name, name) && Objects.equals(that.hasMore, hasMore) && return Objects.equals(that.name, name) &&
Objects.equals(that.urls, urls) && Objects.equals(that.vendorExtensions, vendorExtensions); Objects.equals(that.urls, urls) && Objects.equals(that.vendorExtensions, vendorExtensions);
} }
@Override @Override
public int hashCode() { public int hashCode() {
return Objects.hash(name, hasMore, urls, vendorExtensions); return Objects.hash(name, urls, vendorExtensions);
} }
@Override @Override

View File

@ -909,7 +909,7 @@ public class CodegenModel implements IJsonSchemaValidationProperties {
} }
/** /**
* Remove duplicated properties in all variable list and update "hasMore" * Remove duplicated properties in all variable list
*/ */
public void removeAllDuplicatedProperty() { public void removeAllDuplicatedProperty() {
// remove duplicated properties // remove duplicated properties
@ -920,15 +920,6 @@ public class CodegenModel implements IJsonSchemaValidationProperties {
allVars = removeDuplicatedProperty(allVars); allVars = removeDuplicatedProperty(allVars);
readOnlyVars = removeDuplicatedProperty(readOnlyVars); readOnlyVars = removeDuplicatedProperty(readOnlyVars);
readWriteVars = removeDuplicatedProperty(readWriteVars); readWriteVars = removeDuplicatedProperty(readWriteVars);
// update property list's "hasMore"
updatePropertyListHasMore(vars);
updatePropertyListHasMore(optionalVars);
updatePropertyListHasMore(requiredVars);
updatePropertyListHasMore(parentVars);
updatePropertyListHasMore(allVars);
updatePropertyListHasMore(readOnlyVars);
updatePropertyListHasMore(readWriteVars);
} }
private List<CodegenProperty> removeDuplicatedProperty(List<CodegenProperty> vars) { private List<CodegenProperty> removeDuplicatedProperty(List<CodegenProperty> vars) {
@ -956,21 +947,6 @@ public class CodegenModel implements IJsonSchemaValidationProperties {
return newList; return newList;
} }
/**
* Clone the element and update "hasMore" in the list of codegen properties
*/
private void updatePropertyListHasMore(List<CodegenProperty> vars) {
if (vars != null) {
for (int i = 0; i < vars.size(); i++) {
if (i < vars.size() - 1) {
vars.get(i).hasMore = true;
} else { // last element
vars.get(i).hasMore = false;
}
}
}
}
/** /**
* Remove self reference import * Remove self reference import
*/ */

View File

@ -26,7 +26,7 @@ public class CodegenOperation {
public final List<CodegenProperty> responseHeaders = new ArrayList<CodegenProperty>(); public final List<CodegenProperty> responseHeaders = new ArrayList<CodegenProperty>();
public boolean hasAuthMethods, hasConsumes, hasProduces, hasParams, hasOptionalParams, hasRequiredParams, public boolean hasAuthMethods, hasConsumes, hasProduces, hasParams, hasOptionalParams, hasRequiredParams,
returnTypeIsPrimitive, returnSimpleType, subresourceOperation, isMap, returnTypeIsPrimitive, returnSimpleType, subresourceOperation, isMap,
isArray, isMultipart, hasMore = true, isArray, isMultipart,
isResponseBinary = false, isResponseFile = false, hasReference = false, isResponseBinary = false, isResponseFile = false, hasReference = false,
isRestfulIndex, isRestfulShow, isRestfulCreate, isRestfulUpdate, isRestfulDestroy, isRestfulIndex, isRestfulShow, isRestfulCreate, isRestfulUpdate, isRestfulDestroy,
isRestful, isDeprecated, isCallbackRequest, uniqueItems; isRestful, isDeprecated, isCallbackRequest, uniqueItems;
@ -258,7 +258,6 @@ public class CodegenOperation {
sb.append(", isMap=").append(isMap); sb.append(", isMap=").append(isMap);
sb.append(", isArray=").append(isArray); sb.append(", isArray=").append(isArray);
sb.append(", isMultipart=").append(isMultipart); sb.append(", isMultipart=").append(isMultipart);
sb.append(", hasMore=").append(hasMore);
sb.append(", isResponseBinary=").append(isResponseBinary); sb.append(", isResponseBinary=").append(isResponseBinary);
sb.append(", isResponseFile=").append(isResponseFile); sb.append(", isResponseFile=").append(isResponseFile);
sb.append(", hasReference=").append(hasReference); sb.append(", hasReference=").append(hasReference);
@ -332,7 +331,6 @@ public class CodegenOperation {
isMap == that.isMap && isMap == that.isMap &&
isArray == that.isArray && isArray == that.isArray &&
isMultipart == that.isMultipart && isMultipart == that.isMultipart &&
hasMore == that.hasMore &&
isResponseBinary == that.isResponseBinary && isResponseBinary == that.isResponseBinary &&
isResponseFile == that.isResponseFile && isResponseFile == that.isResponseFile &&
hasReference == that.hasReference && hasReference == that.hasReference &&
@ -393,7 +391,7 @@ public class CodegenOperation {
return Objects.hash(responseHeaders, hasAuthMethods, hasConsumes, hasProduces, hasParams, hasOptionalParams, return Objects.hash(responseHeaders, hasAuthMethods, hasConsumes, hasProduces, hasParams, hasOptionalParams,
hasRequiredParams, returnTypeIsPrimitive, returnSimpleType, subresourceOperation, isMap, hasRequiredParams, returnTypeIsPrimitive, returnSimpleType, subresourceOperation, isMap,
isArray, isMultipart, hasMore, isResponseBinary, isResponseFile, hasReference, isRestfulIndex, isArray, isMultipart, isResponseBinary, isResponseFile, hasReference, isRestfulIndex,
isRestfulShow, isRestfulCreate, isRestfulUpdate, isRestfulDestroy, isRestful, isDeprecated, isRestfulShow, isRestfulCreate, isRestfulUpdate, isRestfulDestroy, isRestful, isDeprecated,
isCallbackRequest, uniqueItems, path, operationId, returnType, httpMethod, returnBaseType, isCallbackRequest, uniqueItems, path, operationId, returnType, httpMethod, returnBaseType,
returnContainer, summary, unescapedNotes, notes, baseName, defaultResponse, discriminator, consumes, returnContainer, summary, unescapedNotes, notes, baseName, defaultResponse, discriminator, consumes,

View File

@ -26,8 +26,8 @@ import java.util.*;
*/ */
public class CodegenParameter implements IJsonSchemaValidationProperties { public class CodegenParameter implements IJsonSchemaValidationProperties {
public boolean isFormParam, isQueryParam, isPathParam, isHeaderParam, public boolean isFormParam, isQueryParam, isPathParam, isHeaderParam,
isCookieParam, isBodyParam, hasMore, isContainer, isCookieParam, isBodyParam, isContainer,
secondaryParam, isCollectionFormatMulti, isPrimitiveType, isModel, isExplode; isCollectionFormatMulti, isPrimitiveType, isModel, isExplode;
public String baseName, paramName, dataType, datatypeWithEnum, dataFormat, contentType, public String baseName, paramName, dataType, datatypeWithEnum, dataFormat, contentType,
collectionFormat, description, unescapedDescription, baseType, defaultValue, enumName, style; collectionFormat, description, unescapedDescription, baseType, defaultValue, enumName, style;
@ -105,9 +105,7 @@ public class CodegenParameter implements IJsonSchemaValidationProperties {
public CodegenParameter copy() { public CodegenParameter copy() {
CodegenParameter output = new CodegenParameter(); CodegenParameter output = new CodegenParameter();
output.isFile = this.isFile; output.isFile = this.isFile;
output.hasMore = this.hasMore;
output.isContainer = this.isContainer; output.isContainer = this.isContainer;
output.secondaryParam = this.secondaryParam;
output.baseName = this.baseName; output.baseName = this.baseName;
output.paramName = this.paramName; output.paramName = this.paramName;
output.dataType = this.dataType; output.dataType = this.dataType;
@ -202,7 +200,7 @@ public class CodegenParameter implements IJsonSchemaValidationProperties {
@Override @Override
public int hashCode() { public int hashCode() {
return Objects.hash(isFormParam, isQueryParam, isPathParam, isHeaderParam, isCookieParam, isBodyParam, hasMore, isContainer, secondaryParam, isCollectionFormatMulti, isPrimitiveType, isModel, isExplode, baseName, paramName, dataType, datatypeWithEnum, dataFormat, collectionFormat, description, unescapedDescription, baseType, defaultValue, enumName, style, example, jsonSchema, isString, isNumeric, isInteger, isLong, isNumber, isFloat, isDouble, isDecimal, isByteArray, isBinary, isBoolean, isDate, isDateTime, isUuid, isUri, isEmail, isFreeFormObject, isAnyType, isArray, isMap, isFile, isEnum, _enum, allowableValues, items, mostInnerItems, additionalProperties, vars, requiredVars, vendorExtensions, hasValidation, getMaxProperties(), getMinProperties(), isNullable, required, getMaximum(), getExclusiveMaximum(), getMinimum(), getExclusiveMinimum(), getMaxLength(), getMinLength(), getPattern(), getMaxItems(), getMinItems(), getUniqueItems(), contentType, multipleOf); return Objects.hash(isFormParam, isQueryParam, isPathParam, isHeaderParam, isCookieParam, isBodyParam, isContainer, isCollectionFormatMulti, isPrimitiveType, isModel, isExplode, baseName, paramName, dataType, datatypeWithEnum, dataFormat, collectionFormat, description, unescapedDescription, baseType, defaultValue, enumName, style, example, jsonSchema, isString, isNumeric, isInteger, isLong, isNumber, isFloat, isDouble, isDecimal, isByteArray, isBinary, isBoolean, isDate, isDateTime, isUuid, isUri, isEmail, isFreeFormObject, isAnyType, isArray, isMap, isFile, isEnum, _enum, allowableValues, items, mostInnerItems, additionalProperties, vars, requiredVars, vendorExtensions, hasValidation, getMaxProperties(), getMinProperties(), isNullable, required, getMaximum(), getExclusiveMaximum(), getMinimum(), getExclusiveMinimum(), getMaxLength(), getMinLength(), getPattern(), getMaxItems(), getMinItems(), getUniqueItems(), contentType, multipleOf);
} }
@Override @Override
@ -216,9 +214,7 @@ public class CodegenParameter implements IJsonSchemaValidationProperties {
isHeaderParam == that.isHeaderParam && isHeaderParam == that.isHeaderParam &&
isCookieParam == that.isCookieParam && isCookieParam == that.isCookieParam &&
isBodyParam == that.isBodyParam && isBodyParam == that.isBodyParam &&
hasMore == that.hasMore &&
isContainer == that.isContainer && isContainer == that.isContainer &&
secondaryParam == that.secondaryParam &&
isCollectionFormatMulti == that.isCollectionFormatMulti && isCollectionFormatMulti == that.isCollectionFormatMulti &&
isPrimitiveType == that.isPrimitiveType && isPrimitiveType == that.isPrimitiveType &&
isModel == that.isModel && isModel == that.isModel &&
@ -295,9 +291,7 @@ public class CodegenParameter implements IJsonSchemaValidationProperties {
sb.append(", isHeaderParam=").append(isHeaderParam); sb.append(", isHeaderParam=").append(isHeaderParam);
sb.append(", isCookieParam=").append(isCookieParam); sb.append(", isCookieParam=").append(isCookieParam);
sb.append(", isBodyParam=").append(isBodyParam); sb.append(", isBodyParam=").append(isBodyParam);
sb.append(", hasMore=").append(hasMore);
sb.append(", isContainer=").append(isContainer); sb.append(", isContainer=").append(isContainer);
sb.append(", secondaryParam=").append(secondaryParam);
sb.append(", isCollectionFormatMulti=").append(isCollectionFormatMulti); sb.append(", isCollectionFormatMulti=").append(isCollectionFormatMulti);
sb.append(", isPrimitiveType=").append(isPrimitiveType); sb.append(", isPrimitiveType=").append(isPrimitiveType);
sb.append(", isModel=").append(isModel); sb.append(", isModel=").append(isModel);

View File

@ -103,10 +103,8 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti
* The value of "exclusiveMaximum" MUST be number, representing an exclusive upper limit for a numeric instance. * The value of "exclusiveMaximum" MUST be number, representing an exclusive upper limit for a numeric instance.
*/ */
public boolean exclusiveMaximum; public boolean exclusiveMaximum;
public boolean hasMore;
public boolean required; public boolean required;
public boolean deprecated; public boolean deprecated;
public boolean secondaryParam;
public boolean hasMoreNonReadOnly; // for model constructor, true if next property is not readonly public boolean hasMoreNonReadOnly; // for model constructor, true if next property is not readonly
public boolean isPrimitiveType; public boolean isPrimitiveType;
public boolean isModel; public boolean isModel;
@ -431,14 +429,6 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti
this.required = required; this.required = required;
} }
public boolean getSecondaryParam() {
return secondaryParam;
}
public void setSecondaryParam(boolean secondaryParam) {
this.secondaryParam = secondaryParam;
}
public List<String> get_enum() { public List<String> get_enum() {
return _enum; return _enum;
} }
@ -716,10 +706,8 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti
sb.append(", maximum='").append(maximum).append('\''); sb.append(", maximum='").append(maximum).append('\'');
sb.append(", exclusiveMinimum=").append(exclusiveMinimum); sb.append(", exclusiveMinimum=").append(exclusiveMinimum);
sb.append(", exclusiveMaximum=").append(exclusiveMaximum); sb.append(", exclusiveMaximum=").append(exclusiveMaximum);
sb.append(", hasMore=").append(hasMore);
sb.append(", required=").append(required); sb.append(", required=").append(required);
sb.append(", deprecated=").append(deprecated); sb.append(", deprecated=").append(deprecated);
sb.append(", secondaryParam=").append(secondaryParam);
sb.append(", hasMoreNonReadOnly=").append(hasMoreNonReadOnly); sb.append(", hasMoreNonReadOnly=").append(hasMoreNonReadOnly);
sb.append(", isPrimitiveType=").append(isPrimitiveType); sb.append(", isPrimitiveType=").append(isPrimitiveType);
sb.append(", isModel=").append(isModel); sb.append(", isModel=").append(isModel);
@ -787,10 +775,8 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti
CodegenProperty that = (CodegenProperty) o; CodegenProperty that = (CodegenProperty) o;
return exclusiveMinimum == that.exclusiveMinimum && return exclusiveMinimum == that.exclusiveMinimum &&
exclusiveMaximum == that.exclusiveMaximum && exclusiveMaximum == that.exclusiveMaximum &&
hasMore == that.hasMore &&
required == that.required && required == that.required &&
deprecated == that.deprecated && deprecated == that.deprecated &&
secondaryParam == that.secondaryParam &&
hasMoreNonReadOnly == that.hasMoreNonReadOnly && hasMoreNonReadOnly == that.hasMoreNonReadOnly &&
isPrimitiveType == that.isPrimitiveType && isPrimitiveType == that.isPrimitiveType &&
isModel == that.isModel && isModel == that.isModel &&
@ -878,7 +864,7 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti
dataType, datatypeWithEnum, dataFormat, name, min, max, defaultValue, dataType, datatypeWithEnum, dataFormat, name, min, max, defaultValue,
defaultValueWithParam, baseType, containerType, title, unescapedDescription, defaultValueWithParam, baseType, containerType, title, unescapedDescription,
maxLength, minLength, pattern, example, jsonSchema, minimum, maximum, maxLength, minLength, pattern, example, jsonSchema, minimum, maximum,
exclusiveMinimum, exclusiveMaximum, hasMore, required, deprecated, secondaryParam, exclusiveMinimum, exclusiveMaximum, required, deprecated,
hasMoreNonReadOnly, isPrimitiveType, isModel, isContainer, isString, isNumeric, hasMoreNonReadOnly, isPrimitiveType, isModel, isContainer, isString, isNumeric,
isInteger, isLong, isNumber, isFloat, isDouble, isDecimal, isByteArray, isBinary, isFile, isInteger, isLong, isNumber, isFloat, isDouble, isDecimal, isByteArray, isBinary, isFile,
isBoolean, isDate, isDateTime, isUuid, isUri, isEmail, isFreeFormObject, isBoolean, isDate, isDateTime, isUuid, isUri, isEmail, isFreeFormObject,

View File

@ -28,7 +28,6 @@ public class CodegenResponse implements IJsonSchemaValidationProperties {
public boolean is4xx; public boolean is4xx;
public boolean is5xx; public boolean is5xx;
public String message; public String message;
public boolean hasMore;
public List<Map<String, Object>> examples; public List<Map<String, Object>> examples;
public String dataType; public String dataType;
public String baseType; public String baseType;
@ -81,7 +80,7 @@ public class CodegenResponse implements IJsonSchemaValidationProperties {
@Override @Override
public int hashCode() { public int hashCode() {
return Objects.hash(headers, code, message, hasMore, examples, dataType, baseType, containerType, hasHeaders, return Objects.hash(headers, code, message, examples, dataType, baseType, containerType, hasHeaders,
isString, isNumeric, isInteger, isLong, isNumber, isFloat, isDouble, isDecimal, isByteArray, isBoolean, isDate, isString, isNumeric, isInteger, isLong, isNumber, isFloat, isDouble, isDecimal, isByteArray, isBoolean, isDate,
isDateTime, isUuid, isEmail, isModel, isFreeFormObject, isAnyType, isDefault, simpleType, primitiveType, isDateTime, isUuid, isEmail, isModel, isFreeFormObject, isAnyType, isDefault, simpleType, primitiveType,
isMap, isArray, isBinary, isFile, schema, jsonSchema, vendorExtensions, items, additionalProperties, isMap, isArray, isBinary, isFile, schema, jsonSchema, vendorExtensions, items, additionalProperties,
@ -95,8 +94,7 @@ public class CodegenResponse implements IJsonSchemaValidationProperties {
if (this == o) return true; if (this == o) return true;
if (!(o instanceof CodegenResponse)) return false; if (!(o instanceof CodegenResponse)) return false;
CodegenResponse that = (CodegenResponse) o; CodegenResponse that = (CodegenResponse) o;
return hasMore == that.hasMore && return hasHeaders == that.hasHeaders &&
hasHeaders == that.hasHeaders &&
isString == that.isString && isString == that.isString &&
isNumeric == that.isNumeric && isNumeric == that.isNumeric &&
isInteger == that.isInteger && isInteger == that.isInteger &&
@ -365,7 +363,6 @@ public class CodegenResponse implements IJsonSchemaValidationProperties {
sb.append("headers=").append(headers); sb.append("headers=").append(headers);
sb.append(", code='").append(code).append('\''); sb.append(", code='").append(code).append('\'');
sb.append(", message='").append(message).append('\''); sb.append(", message='").append(message).append('\'');
sb.append(", hasMore=").append(hasMore);
sb.append(", examples=").append(examples); sb.append(", examples=").append(examples);
sb.append(", dataType='").append(dataType).append('\''); sb.append(", dataType='").append(dataType).append('\'');
sb.append(", baseType='").append(baseType).append('\''); sb.append(", baseType='").append(baseType).append('\'');

View File

@ -28,7 +28,7 @@ public class CodegenSecurity {
public String name; public String name;
public String type; public String type;
public String scheme; public String scheme;
public Boolean hasMore, isBasic, isOAuth, isApiKey; public Boolean isBasic, isOAuth, isApiKey;
// is Basic is true for all http authentication type. // is Basic is true for all http authentication type.
// Those are to differentiate basic and bearer authentication // Those are to differentiate basic and bearer authentication
// isHttpSignature is to support HTTP signature authorization scheme. // isHttpSignature is to support HTTP signature authorization scheme.
@ -50,7 +50,6 @@ public class CodegenSecurity {
// Copy all fields except the scopes. // Copy all fields except the scopes.
filteredSecurity.name = name; filteredSecurity.name = name;
filteredSecurity.type = type; filteredSecurity.type = type;
filteredSecurity.hasMore = false;
filteredSecurity.isBasic = isBasic; filteredSecurity.isBasic = isBasic;
filteredSecurity.isBasicBasic = isBasicBasic; filteredSecurity.isBasicBasic = isBasicBasic;
filteredSecurity.isHttpSignature = isHttpSignature; filteredSecurity.isHttpSignature = isHttpSignature;
@ -96,7 +95,6 @@ public class CodegenSecurity {
return Objects.equals(name, that.name) && return Objects.equals(name, that.name) &&
Objects.equals(type, that.type) && Objects.equals(type, that.type) &&
Objects.equals(scheme, that.scheme) && Objects.equals(scheme, that.scheme) &&
Objects.equals(hasMore, that.hasMore) &&
Objects.equals(isBasic, that.isBasic) && Objects.equals(isBasic, that.isBasic) &&
Objects.equals(isOAuth, that.isOAuth) && Objects.equals(isOAuth, that.isOAuth) &&
Objects.equals(isApiKey, that.isApiKey) && Objects.equals(isApiKey, that.isApiKey) &&
@ -122,7 +120,7 @@ public class CodegenSecurity {
@Override @Override
public int hashCode() { public int hashCode() {
return Objects.hash(name, type, scheme, hasMore, isBasic, isOAuth, isApiKey, return Objects.hash(name, type, scheme, isBasic, isOAuth, isApiKey,
isBasicBasic, isHttpSignature, isBasicBearer, bearerFormat, vendorExtensions, isBasicBasic, isHttpSignature, isBasicBearer, bearerFormat, vendorExtensions,
keyParamName, isKeyInQuery, isKeyInHeader, isKeyInCookie, flow, keyParamName, isKeyInQuery, isKeyInHeader, isKeyInCookie, flow,
authorizationUrl, tokenUrl, scopes, isCode, isPassword, isApplication, isImplicit); authorizationUrl, tokenUrl, scopes, isCode, isPassword, isApplication, isImplicit);
@ -134,7 +132,6 @@ public class CodegenSecurity {
sb.append("name='").append(name).append('\''); sb.append("name='").append(name).append('\'');
sb.append(", type='").append(type).append('\''); sb.append(", type='").append(type).append('\'');
sb.append(", scheme='").append(scheme).append('\''); sb.append(", scheme='").append(scheme).append('\'');
sb.append(", hasMore=").append(hasMore);
sb.append(", isBasic=").append(isBasic); sb.append(", isBasic=").append(isBasic);
sb.append(", isOAuth=").append(isOAuth); sb.append(", isOAuth=").append(isOAuth);
sb.append(", isApiKey=").append(isApiKey); sb.append(", isApiKey=").append(isApiKey);

View File

@ -3728,7 +3728,6 @@ public class DefaultCodegen implements CodegenConfig {
ApiResponse response = operation.getResponses().get(key); ApiResponse response = operation.getResponses().get(key);
addProducesInfo(response, op); addProducesInfo(response, op);
CodegenResponse r = fromResponse(key, response); CodegenResponse r = fromResponse(key, response);
r.hasMore = true;
if (r.baseType != null && if (r.baseType != null &&
!defaultIncludes.contains(r.baseType) && !defaultIncludes.contains(r.baseType) &&
!languageSpecificPrimitives.contains(r.baseType)) { !languageSpecificPrimitives.contains(r.baseType)) {
@ -3752,7 +3751,6 @@ public class DefaultCodegen implements CodegenConfig {
int bDefault = "0".equals(b.code) ? 1 : 0; int bDefault = "0".equals(b.code) ? 1 : 0;
return aDefault - bDefault; return aDefault - bDefault;
}); });
op.responses.get(op.responses.size() - 1).hasMore = false;
if (methodResponse != null) { if (methodResponse != null) {
handleMethodResponse(operation, schemas, op, methodResponse, importMapping); handleMethodResponse(operation, schemas, op, methodResponse, importMapping);
@ -3762,10 +3760,8 @@ public class DefaultCodegen implements CodegenConfig {
if (operation.getCallbacks() != null && !operation.getCallbacks().isEmpty()) { if (operation.getCallbacks() != null && !operation.getCallbacks().isEmpty()) {
operation.getCallbacks().forEach((name, callback) -> { operation.getCallbacks().forEach((name, callback) -> {
CodegenCallback c = fromCallback(name, callback, servers); CodegenCallback c = fromCallback(name, callback, servers);
c.hasMore = true;
op.callbacks.add(c); op.callbacks.add(c);
}); });
op.callbacks.get(op.callbacks.size() - 1).hasMore = false;
} }
List<Parameter> parameters = operation.getParameters(); List<Parameter> parameters = operation.getParameters();
@ -3903,15 +3899,15 @@ public class DefaultCodegen implements CodegenConfig {
}); });
} }
op.allParams = addHasMore(allParams); op.allParams = allParams;
op.bodyParams = addHasMore(bodyParams); op.bodyParams = bodyParams;
op.pathParams = addHasMore(pathParams); op.pathParams = pathParams;
op.queryParams = addHasMore(queryParams); op.queryParams = queryParams;
op.headerParams = addHasMore(headerParams); op.headerParams = headerParams;
op.cookieParams = addHasMore(cookieParams); op.cookieParams = cookieParams;
op.formParams = addHasMore(formParams); op.formParams = formParams;
op.requiredParams = addHasMore(requiredParams); op.requiredParams = requiredParams;
op.optionalParams = addHasMore(optionalParams); op.optionalParams = optionalParams;
op.externalDocs = operation.getExternalDocs(); op.externalDocs = operation.getExternalDocs();
// legacy support // legacy support
op.nickname = op.operationId; op.nickname = op.operationId;
@ -4135,7 +4131,6 @@ public class DefaultCodegen implements CodegenConfig {
callback.forEach((expression, pi) -> { callback.forEach((expression, pi) -> {
CodegenCallback.Url u = new CodegenCallback.Url(); CodegenCallback.Url u = new CodegenCallback.Url();
u.expression = expression; u.expression = expression;
u.hasMore = true;
if (pi.getExtensions() != null && !pi.getExtensions().isEmpty()) { if (pi.getExtensions() != null && !pi.getExtensions().isEmpty()) {
u.vendorExtensions.putAll(pi.getExtensions()); u.vendorExtensions.putAll(pi.getExtensions());
@ -4175,16 +4170,9 @@ public class DefaultCodegen implements CodegenConfig {
u.requests.add(co); u.requests.add(co);
}); });
if (!u.requests.isEmpty()) {
u.requests.get(u.requests.size() - 1).hasMore = false;
}
c.urls.add(u); c.urls.add(u);
}); });
if (!c.urls.isEmpty()) {
c.urls.get(c.urls.size() - 1).hasMore = false;
}
return c; return c;
} }
@ -4546,12 +4534,6 @@ public class DefaultCodegen implements CodegenConfig {
return ObjectUtils.compare(one.name, another.name); return ObjectUtils.compare(one.name, another.name);
} }
}); });
// set 'hasMore'
Iterator<CodegenSecurity> it = codegenSecurities.iterator();
while (it.hasNext()) {
final CodegenSecurity security = it.next();
security.hasMore = it.hasNext();
}
return codegenSecurities; return codegenSecurities;
} }
@ -4684,20 +4666,6 @@ public class DefaultCodegen implements CodegenConfig {
} }
} }
private static List<CodegenParameter> addHasMore(List<CodegenParameter> objs) {
if (objs != null) {
for (int i = 0; i < objs.size(); i++) {
if (i > 0) {
objs.get(i).secondaryParam = true;
}
if (i < objs.size() - 1) {
objs.get(i).hasMore = true;
}
}
}
return objs;
}
/** /**
* Add operation to group * Add operation to group
* *
@ -5614,14 +5582,6 @@ public class DefaultCodegen implements CodegenConfig {
Map<String, Object> scope = new HashMap<>(); Map<String, Object> scope = new HashMap<>();
scope.put("scope", scopeEntry.getKey()); scope.put("scope", scopeEntry.getKey());
scope.put("description", escapeText(scopeEntry.getValue())); scope.put("description", escapeText(scopeEntry.getValue()));
count += 1;
if (count < numScopes) {
scope.put("hasMore", "true");
} else {
scope.put("hasMore", null);
}
scopes.add(scope); scopes.add(scope);
} }
codegenSecurity.scopes = scopes; codegenSecurity.scopes = scopes;
@ -5645,14 +5605,6 @@ public class DefaultCodegen implements CodegenConfig {
} else { } else {
mediaType.put("mediaType", escapeText(escapeQuotationMark(key))); mediaType.put("mediaType", escapeText(escapeQuotationMark(key)));
} }
count += 1;
if (count < consumes.size()) {
mediaType.put("hasMore", "true");
} else {
mediaType.put("hasMore", null);
}
mediaTypeList.add(mediaType); mediaTypeList.add(mediaType);
} }
@ -5723,19 +5675,6 @@ public class DefaultCodegen implements CodegenConfig {
if (!existingMediaTypes.contains(encodedKey)) { if (!existingMediaTypes.contains(encodedKey)) {
Map<String, String> mediaType = new HashMap<String, String>(); Map<String, String> mediaType = new HashMap<String, String>();
mediaType.put("mediaType", encodedKey); mediaType.put("mediaType", encodedKey);
count += 1;
if (count < produces.size()) {
mediaType.put("hasMore", "true");
} else {
mediaType.put("hasMore", null);
}
if (!codegenOperation.produces.isEmpty()) {
final Map<String, String> lastMediaType = codegenOperation.produces.get(codegenOperation.produces.size() - 1);
lastMediaType.put("hasMore", "true");
}
codegenOperation.produces.add(mediaType); codegenOperation.produces.add(mediaType);
codegenOperation.hasProduces = Boolean.TRUE; codegenOperation.hasProduces = Boolean.TRUE;
} }

View File

@ -627,12 +627,6 @@ public class DefaultGenerator implements Generator {
*/ */
allOperations.add(new HashMap<>(operation)); allOperations.add(new HashMap<>(operation));
for (int i = 0; i < allOperations.size(); i++) {
Map<String, Object> oo = (Map<String, Object>) allOperations.get(i);
if (i < (allOperations.size() - 1)) {
oo.put("hasMore", "true");
}
}
for (String templateName : config.apiTemplateFiles().keySet()) { for (String templateName : config.apiTemplateFiles().keySet()) {
String filename = config.apiFilename(templateName, tag); String filename = config.apiFilename(templateName, tag);
@ -1193,14 +1187,6 @@ public class DefaultGenerator implements Generator {
} }
config.postProcessOperationsWithModels(operations, allModels); config.postProcessOperationsWithModels(operations, allModels);
if (objs.size() > 0) {
List<CodegenOperation> os = (List<CodegenOperation>) objs.get("operation");
if (os != null && os.size() > 0) {
CodegenOperation op = os.get(os.size() - 1);
op.hasMore = false;
}
}
return operations; return operations;
} }
@ -1390,7 +1376,6 @@ public class DefaultGenerator implements Generator {
// We have to create a new auth method instance because the original object must // We have to create a new auth method instance because the original object must
// not be modified. // not be modified.
CodegenSecurity opSecurity = security.filterByScopeNames(opScopes); CodegenSecurity opSecurity = security.filterByScopeNames(opScopes);
opSecurity.hasMore = security.hasMore;
result.add(opSecurity); result.add(opSecurity);
filtered = true; filtered = true;
break; break;

View File

@ -793,7 +793,6 @@ abstract public class AbstractAdaCodegen extends DefaultCodegen implements Codeg
CodegenSecurity opSecurity = new CodegenSecurity(); CodegenSecurity opSecurity = new CodegenSecurity();
opSecurity.name = authMethod.name; opSecurity.name = authMethod.name;
opSecurity.type = authMethod.type; opSecurity.type = authMethod.type;
opSecurity.hasMore = false;
opSecurity.isBasic = authMethod.isBasic; opSecurity.isBasic = authMethod.isBasic;
opSecurity.isApiKey = authMethod.isApiKey; opSecurity.isApiKey = authMethod.isApiKey;
opSecurity.isKeyInCookie = authMethod.isKeyInCookie; opSecurity.isKeyInCookie = authMethod.isKeyInCookie;

View File

@ -619,12 +619,6 @@ public abstract class AbstractApexCodegen extends DefaultCodegen implements Code
} }
if (removedChildEnum) { if (removedChildEnum) {
// If we removed an entry from this model's vars, we need to ensure hasMore is updated
int count = 0, numVars = codegenProperties.size();
for (CodegenProperty codegenProperty : codegenProperties) {
count += 1;
codegenProperty.hasMore = (count < numVars) ? true : false;
}
codegenModel.vars = codegenProperties; codegenModel.vars = codegenProperties;
} }
return codegenModel; return codegenModel;

View File

@ -506,12 +506,6 @@ public abstract class AbstractEiffelCodegen extends DefaultCodegen implements Co
} }
if (removedChildEnum) { if (removedChildEnum) {
// If we removed an entry from this model's vars, we need to ensure hasMore is updated
int count = 0, numVars = codegenProperties.size();
for (CodegenProperty codegenProperty : codegenProperties) {
count += 1;
codegenProperty.hasMore = (count < numVars) ? true : false;
}
codegenModel.vars = codegenProperties; codegenModel.vars = codegenProperties;
} }
return codegenModel; return codegenModel;

View File

@ -1344,13 +1344,6 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
} }
if (removedChildEnum) { if (removedChildEnum) {
// If we removed an entry from this model's vars, we need to ensure hasMore is updated
int count = 0;
int numVars = codegenProperties.size();
for (CodegenProperty codegenProperty : codegenProperties) {
count += 1;
codegenProperty.hasMore = count < numVars;
}
codegenModel.vars = codegenProperties; codegenModel.vars = codegenProperties;
} }
return codegenModel; return codegenModel;

View File

@ -151,12 +151,8 @@ public abstract class AbstractJavaJAXRSServerCodegen extends AbstractJavaCodegen
for (String tag : operation.getTags()) { for (String tag : operation.getTags()) {
Map<String, String> value = new HashMap<String, String>(); Map<String, String> value = new HashMap<String, String>();
value.put("tag", tag); value.put("tag", tag);
value.put("hasMore", "true");
tags.add(value); tags.add(value);
} }
if (tags.size() > 0) {
tags.get(tags.size() - 1).remove("hasMore");
}
if (operation.getTags().size() > 0) { if (operation.getTags().size() > 0) {
String tag = operation.getTags().get(0); String tag = operation.getTags().get(0);
operation.setTags(Arrays.asList(tag)); operation.setTags(Arrays.asList(tag));

View File

@ -521,10 +521,6 @@ public abstract class AbstractPythonConnexionServerCodegen extends DefaultCodege
opsByPathEntry.put("path", entry.getKey()); opsByPathEntry.put("path", entry.getKey());
opsByPathEntry.put("operation", entry.getValue()); opsByPathEntry.put("operation", entry.getValue());
List<CodegenOperation> operationsForThisPath = Lists.newArrayList(entry.getValue()); List<CodegenOperation> operationsForThisPath = Lists.newArrayList(entry.getValue());
operationsForThisPath.get(operationsForThisPath.size() - 1).hasMore = false;
if (opsByPathList.size() < opsByPath.asMap().size()) {
opsByPathEntry.put("hasMore", "true");
}
} }
return opsByPathList; return opsByPathList;

View File

@ -615,16 +615,11 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen {
if (!propertyHash.containsKey(property.name)) { if (!propertyHash.containsKey(property.name)) {
final CodegenProperty parentVar = property.clone(); final CodegenProperty parentVar = property.clone();
parentVar.isInherited = true; parentVar.isInherited = true;
parentVar.hasMore = true;
last = parentVar; last = parentVar;
LOGGER.info("adding parent variable {}", property.name); LOGGER.info("adding parent variable {}", property.name);
codegenModel.parentVars.add(parentVar); codegenModel.parentVars.add(parentVar);
} }
} }
if (last != null) {
last.hasMore = false;
}
} }
} }
@ -801,12 +796,6 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen {
} }
if (removedChildEnum) { if (removedChildEnum) {
// If we removed an entry from this model's vars, we need to ensure hasMore is updated
int count = 0, numVars = codegenProperties.size();
for (CodegenProperty codegenProperty : codegenProperties) {
count += 1;
codegenProperty.hasMore = count < numVars;
}
codegenModel.vars = codegenProperties; codegenModel.vars = codegenProperties;
} }
} }

View File

@ -296,11 +296,7 @@ public class CSharpNancyFXServerCodegen extends AbstractCSharpCodegen {
property.name, child.classname, parent.classname)); property.name, child.classname, parent.classname));
duplicatedByParent.isInherited = true; duplicatedByParent.isInherited = true;
final CodegenProperty parentVar = duplicatedByParent.clone(); final CodegenProperty parentVar = duplicatedByParent.clone();
parentVar.hasMore = false;
child.parentVars.add(parentVar); child.parentVars.add(parentVar);
if (previousParentVar != null) {
previousParentVar.hasMore = true;
}
previousParentVar = parentVar; previousParentVar = parentVar;
} }
} }

View File

@ -332,16 +332,11 @@ public class CSharpNetCoreClientCodegen extends AbstractCSharpCodegen {
if (!propertyHash.containsKey(property.name)) { if (!propertyHash.containsKey(property.name)) {
final CodegenProperty parentVar = property.clone(); final CodegenProperty parentVar = property.clone();
parentVar.isInherited = true; parentVar.isInherited = true;
parentVar.hasMore = true;
last = parentVar; last = parentVar;
LOGGER.debug("adding parent variable {}", property.name); LOGGER.debug("adding parent variable {}", property.name);
codegenModel.parentVars.add(parentVar); codegenModel.parentVars.add(parentVar);
} }
} }
if (last != null) {
last.hasMore = false;
}
} }
} }
@ -852,12 +847,6 @@ public class CSharpNetCoreClientCodegen extends AbstractCSharpCodegen {
} }
if (removedChildEnum) { if (removedChildEnum) {
// If we removed an entry from this model's vars, we need to ensure hasMore is updated
int count = 0, numVars = codegenProperties.size();
for (CodegenProperty codegenProperty : codegenProperties) {
count += 1;
codegenProperty.hasMore = count < numVars;
}
codegenModel.vars = codegenProperties; codegenModel.vars = codegenProperties;
} }
} }

View File

@ -559,7 +559,6 @@ public class ElixirClientCodegen extends DefaultCodegen implements CodegenConfig
this.headers.addAll(o.headers); this.headers.addAll(o.headers);
this.code = o.code; this.code = o.code;
this.message = o.message; this.message = o.message;
this.hasMore = o.hasMore;
this.examples = o.examples; this.examples = o.examples;
this.dataType = o.dataType; this.dataType = o.dataType;
this.baseType = o.baseType; this.baseType = o.baseType;
@ -655,7 +654,6 @@ public class ElixirClientCodegen extends DefaultCodegen implements CodegenConfig
this.isMap = o.isMap; this.isMap = o.isMap;
this.isArray = o.isArray; this.isArray = o.isArray;
this.isMultipart = o.isMultipart; this.isMultipart = o.isMultipart;
this.hasMore = o.hasMore;
this.isResponseBinary = o.isResponseBinary; this.isResponseBinary = o.isResponseBinary;
this.hasReference = o.hasReference; this.hasReference = o.hasReference;
this.isRestfulIndex = o.isRestfulIndex; this.isRestfulIndex = o.isRestfulIndex;

View File

@ -406,7 +406,6 @@ public class ErlangClientCodegen extends DefaultCodegen implements CodegenConfig
this.isMap = o.isMap; this.isMap = o.isMap;
this.isArray = o.isArray; this.isArray = o.isArray;
this.isMultipart = o.isMultipart; this.isMultipart = o.isMultipart;
this.hasMore = o.hasMore;
this.isResponseBinary = o.isResponseBinary; this.isResponseBinary = o.isResponseBinary;
this.hasReference = o.hasReference; this.hasReference = o.hasReference;
this.isRestfulIndex = o.isRestfulIndex; this.isRestfulIndex = o.isRestfulIndex;

View File

@ -518,7 +518,6 @@ public class ErlangProperCodegen extends DefaultCodegen implements CodegenConfig
this.isMap = o.isMap; this.isMap = o.isMap;
this.isArray = o.isArray; this.isArray = o.isArray;
this.isMultipart = o.isMultipart; this.isMultipart = o.isMultipart;
this.hasMore = o.hasMore;
this.isResponseBinary = o.isResponseBinary; this.isResponseBinary = o.isResponseBinary;
this.hasReference = o.hasReference; this.hasReference = o.hasReference;
this.isRestfulIndex = o.isRestfulIndex; this.isRestfulIndex = o.isRestfulIndex;

View File

@ -318,7 +318,6 @@ public class HaskellServantCodegen extends DefaultCodegen implements CodegenConf
Map<String, Object> o = new HashMap<>(); Map<String, Object> o = new HashMap<>();
o.put("char", c); o.put("char", c);
o.put("replacement", "'" + specialCharReplacements.get(c)); o.put("replacement", "'" + specialCharReplacements.get(c));
o.put("hasMore", i != replacementChars.length - 1);
replacements.add(o); replacements.add(o);
} }
additionalProperties.put("specialCharReplacements", replacements); additionalProperties.put("specialCharReplacements", replacements);

View File

@ -913,7 +913,6 @@ public class JavaCXFExtServerCodegen extends JavaCXFServerCodegen implements CXF
mediaType = "text/plain"; mediaType = "text/plain";
Map<String, String> contentType = new HashMap<>(); Map<String, String> contentType = new HashMap<>();
contentType.put("mediaType", mediaType); contentType.put("mediaType", mediaType);
contentType.put("hasMore", null);
if (op.consumes == null) if (op.consumes == null)
op.consumes = new ArrayList<>(); op.consumes = new ArrayList<>();
op.consumes.add(contentType); op.consumes.add(contentType);
@ -927,7 +926,6 @@ public class JavaCXFExtServerCodegen extends JavaCXFServerCodegen implements CXF
mediaType = "text/plain"; mediaType = "text/plain";
Map<String, String> contentType = new HashMap<>(); Map<String, String> contentType = new HashMap<>();
contentType.put("mediaType", mediaType); contentType.put("mediaType", mediaType);
contentType.put("hasMore", null);
if (op.produces == null) if (op.produces == null)
op.produces = new ArrayList<>(); op.produces = new ArrayList<>();
op.produces.add(contentType); op.produces.add(contentType);

View File

@ -609,11 +609,6 @@ public class JavaClientCodegen extends AbstractJavaCodegen
return 0; return 0;
} }
}); });
Iterator<CodegenParameter> iterator = operation.allParams.iterator();
while (iterator.hasNext()) {
CodegenParameter param = iterator.next();
param.hasMore = iterator.hasNext();
}
} }
} }
} }
@ -697,15 +692,10 @@ public class JavaClientCodegen extends AbstractJavaCodegen
jsonMimeTypes.add(consume); jsonMimeTypes.add(consume);
} else } else
prioritizedContentTypes.add(consume); prioritizedContentTypes.add(consume);
consume.put("hasMore", "true");
} }
prioritizedContentTypes.addAll(0, jsonMimeTypes); prioritizedContentTypes.addAll(0, jsonMimeTypes);
prioritizedContentTypes.addAll(0, jsonVendorMimeTypes); prioritizedContentTypes.addAll(0, jsonVendorMimeTypes);
prioritizedContentTypes.get(prioritizedContentTypes.size() - 1).put("hasMore", null);
return prioritizedContentTypes; return prioritizedContentTypes;
} }

View File

@ -357,8 +357,7 @@ public class JavaPKMSTServerCodegen extends AbstractJavaCodegen {
} }
/** /**
* This method removes header parameters from the list of parameters and * This method removes header parameters from the list of parameters
* also corrects last allParams hasMore state.
* *
* @param allParams list of all parameters * @param allParams list of all parameters
*/ */
@ -374,7 +373,6 @@ public class JavaPKMSTServerCodegen extends AbstractJavaCodegen {
allParams.add(p); allParams.add(p);
} }
} }
allParams.get(allParams.size() - 1).hasMore = false;
} }
/** /**
@ -554,12 +552,8 @@ public class JavaPKMSTServerCodegen extends AbstractJavaCodegen {
for (String tag : operation.getTags()) { for (String tag : operation.getTags()) {
Map<String, String> value = new HashMap<String, String>(); Map<String, String> value = new HashMap<String, String>();
value.put("tag", tag); value.put("tag", tag);
value.put("hasMore", "true");
tags.add(value); tags.add(value);
} }
if (tags.size() > 0) {
tags.get(tags.size() - 1).remove("hasMore");
}
if (operation.getTags().size() > 0) { if (operation.getTags().size() > 0) {
String tag = operation.getTags().get(0); String tag = operation.getTags().get(0);
operation.setTags(Arrays.asList(tag)); operation.setTags(Arrays.asList(tag));

View File

@ -1060,12 +1060,6 @@ public class JavascriptApolloClientCodegen extends DefaultCodegen implements Cod
} }
if (removedChildEnum) { if (removedChildEnum) {
// If we removed an entry from this model's vars, we need to ensure hasMore is updated
int count = 0, numVars = codegenProperties.size();
for (CodegenProperty codegenProperty : codegenProperties) {
count += 1;
codegenProperty.hasMore = (count < numVars) ? true : false;
}
codegenModel.vars = codegenProperties; codegenModel.vars = codegenProperties;
} }
} }

View File

@ -1140,12 +1140,6 @@ public class JavascriptClientCodegen extends DefaultCodegen implements CodegenCo
} }
if (removedChildEnum) { if (removedChildEnum) {
// If we removed an entry from this model's vars, we need to ensure hasMore is updated
int count = 0, numVars = codegenProperties.size();
for (CodegenProperty codegenProperty : codegenProperties) {
count += 1;
codegenProperty.hasMore = (count < numVars) ? true : false;
}
codegenModel.vars = codegenProperties; codegenModel.vars = codegenProperties;
} }
} }

View File

@ -368,7 +368,7 @@ public class MysqlSchemaCodegen extends DefaultCodegen implements CodegenConfig
break; break;
} }
String value = String.valueOf(enumValues.get(i)); String value = String.valueOf(enumValues.get(i));
columnDataTypeArguments.add(toCodegenMysqlDataTypeArgument(value, (Boolean) (i + 1 < enumValues.size()))); columnDataTypeArguments.add(toCodegenMysqlDataTypeArgument(value));
} }
columnDefinition.put("colDataType", "ENUM"); columnDefinition.put("colDataType", "ENUM");
columnDefinition.put("colDataTypeArguments", columnDataTypeArguments); columnDefinition.put("colDataTypeArguments", columnDataTypeArguments);
@ -455,7 +455,7 @@ public class MysqlSchemaCodegen extends DefaultCodegen implements CodegenConfig
break; break;
} }
String value = String.valueOf(enumValues.get(i)); String value = String.valueOf(enumValues.get(i));
columnDataTypeArguments.add(toCodegenMysqlDataTypeArgument(value, (Boolean) (i + 1 < enumValues.size()))); columnDataTypeArguments.add(toCodegenMysqlDataTypeArgument(value));
} }
columnDefinition.put("colDataType", "ENUM"); columnDefinition.put("colDataType", "ENUM");
columnDefinition.put("colDataTypeArguments", columnDataTypeArguments); columnDefinition.put("colDataTypeArguments", columnDataTypeArguments);
@ -470,8 +470,8 @@ public class MysqlSchemaCodegen extends DefaultCodegen implements CodegenConfig
columnDefinition.put("colDataType", "DECIMAL"); columnDefinition.put("colDataType", "DECIMAL");
columnDefinition.put("colUnsigned", unsigned); columnDefinition.put("colUnsigned", unsigned);
columnDefinition.put("colDataTypeArguments", columnDataTypeArguments); columnDefinition.put("colDataTypeArguments", columnDataTypeArguments);
columnDataTypeArguments.add(toCodegenMysqlDataTypeArgument(20, true)); columnDataTypeArguments.add(toCodegenMysqlDataTypeArgument(20));
columnDataTypeArguments.add(toCodegenMysqlDataTypeArgument(9, false)); columnDataTypeArguments.add(toCodegenMysqlDataTypeArgument(9));
} }
if (Boolean.TRUE.equals(required)) { if (Boolean.TRUE.equals(required)) {
@ -525,7 +525,7 @@ public class MysqlSchemaCodegen extends DefaultCodegen implements CodegenConfig
columnDefinition.put("colName", colName); columnDefinition.put("colName", colName);
columnDefinition.put("colDataType", "TINYINT"); columnDefinition.put("colDataType", "TINYINT");
columnDefinition.put("colDataTypeArguments", columnDataTypeArguments); columnDefinition.put("colDataTypeArguments", columnDataTypeArguments);
columnDataTypeArguments.add(toCodegenMysqlDataTypeArgument(1, false)); columnDataTypeArguments.add(toCodegenMysqlDataTypeArgument(1));
if (Boolean.TRUE.equals(required)) { if (Boolean.TRUE.equals(required)) {
columnDefinition.put("colNotNull", true); columnDefinition.put("colNotNull", true);
@ -593,7 +593,7 @@ public class MysqlSchemaCodegen extends DefaultCodegen implements CodegenConfig
break; break;
} }
String value = String.valueOf(enumValues.get(i)); String value = String.valueOf(enumValues.get(i));
columnDataTypeArguments.add(toCodegenMysqlDataTypeArgument(value, (Boolean) (i + 1 < enumValues.size()))); columnDataTypeArguments.add(toCodegenMysqlDataTypeArgument(value));
} }
} else if (dataType.equals("MEDIUMBLOB")) { } else if (dataType.equals("MEDIUMBLOB")) {
columnDefinition.put("colDataType", "MEDIUMBLOB"); columnDefinition.put("colDataType", "MEDIUMBLOB");
@ -602,7 +602,7 @@ public class MysqlSchemaCodegen extends DefaultCodegen implements CodegenConfig
columnDefinition.put("colDataType", matchedStringType); columnDefinition.put("colDataType", matchedStringType);
if (matchedStringType.equals("CHAR") || matchedStringType.equals("VARCHAR")) { if (matchedStringType.equals("CHAR") || matchedStringType.equals("VARCHAR")) {
columnDefinition.put("colDataTypeArguments", columnDataTypeArguments); columnDefinition.put("colDataTypeArguments", columnDataTypeArguments);
columnDataTypeArguments.add(toCodegenMysqlDataTypeArgument((maxLength != null) ? maxLength : 255, false)); columnDataTypeArguments.add(toCodegenMysqlDataTypeArgument((maxLength != null) ? maxLength : 255));
} }
} }
@ -783,10 +783,9 @@ public class MysqlSchemaCodegen extends DefaultCodegen implements CodegenConfig
* Generates codegen property for MySQL data type argument * Generates codegen property for MySQL data type argument
* *
* @param value argument value * @param value argument value
* @param hasMore shows whether codegen has more arguments or not
* @return generated codegen property * @return generated codegen property
*/ */
public HashMap<String, Object> toCodegenMysqlDataTypeArgument(Object value, Boolean hasMore) { public HashMap<String, Object> toCodegenMysqlDataTypeArgument(Object value) {
HashMap<String, Object> arg = new HashMap<String, Object>(); HashMap<String, Object> arg = new HashMap<String, Object>();
if (value instanceof String) { if (value instanceof String) {
arg.put("isString", true); arg.put("isString", true);
@ -807,7 +806,6 @@ public class MysqlSchemaCodegen extends DefaultCodegen implements CodegenConfig
LOGGER.warn("MySQL data type argument can be primitive type only. Class '" + value.getClass() + "' is provided"); LOGGER.warn("MySQL data type argument can be primitive type only. Class '" + value.getClass() + "' is provided");
} }
arg.put("argumentValue", value); arg.put("argumentValue", value);
arg.put("hasMore", hasMore);
return arg; return arg;
} }

View File

@ -295,10 +295,6 @@ public class NodeJSExpressServerCodegen extends DefaultCodegen implements Codege
opsByPathEntry.put("path", entry.getKey()); opsByPathEntry.put("path", entry.getKey());
opsByPathEntry.put("operation", entry.getValue()); opsByPathEntry.put("operation", entry.getValue());
List<CodegenOperation> operationsForThisPath = Lists.newArrayList(entry.getValue()); List<CodegenOperation> operationsForThisPath = Lists.newArrayList(entry.getValue());
operationsForThisPath.get(operationsForThisPath.size() - 1).hasMore = false;
if (opsByPathList.size() < opsByPath.asMap().size()) {
opsByPathEntry.put("hasMore", "true");
}
} }
return opsByPathList; return opsByPathList;

View File

@ -248,13 +248,6 @@ public class ScalaAkkaClientCodegen extends AbstractScalaCodegen implements Code
it.remove(); it.remove();
} }
} }
// Adapt 'hasMore'
it = codegenSecurities.iterator();
while (it.hasNext()) {
final CodegenSecurity security = it.next();
security.hasMore = it.hasNext();
}
if (codegenSecurities.isEmpty()) { if (codegenSecurities.isEmpty()) {
return null; return null;
} }

View File

@ -295,7 +295,7 @@ public class ScalaAkkaHttpServerCodegen extends AbstractScalaCodegen implements
LinkedList<TextOrMatcher> pathMatchers = new LinkedList<>(); LinkedList<TextOrMatcher> pathMatchers = new LinkedList<>();
for (String path : allPaths) { for (String path : allPaths) {
TextOrMatcher textOrMatcher = new TextOrMatcher("", true, true); TextOrMatcher textOrMatcher = new TextOrMatcher("", true);
if (path.startsWith("{") && path.endsWith("}")) { if (path.startsWith("{") && path.endsWith("}")) {
String parameterName = path.substring(1, path.length() - 1); String parameterName = path.substring(1, path.length() - 1);
for (CodegenParameter pathParam : codegenOperation.pathParams) { for (CodegenParameter pathParam : codegenOperation.pathParams) {
@ -322,8 +322,6 @@ public class ScalaAkkaHttpServerCodegen extends AbstractScalaCodegen implements
pathMatchers.add(textOrMatcher); pathMatchers.add(textOrMatcher);
} }
} }
pathMatchers.getLast().hasMore = false;
codegenOperation.vendorExtensions.put("x-paths", pathMatchers); codegenOperation.vendorExtensions.put("x-paths", pathMatchers);
} }
@ -395,13 +393,6 @@ public class ScalaAkkaHttpServerCodegen extends AbstractScalaCodegen implements
} }
} }
} }
for (int i = 0, size = fileParams.size(); i < size; ++i) {
fileParams.get(i).hasMore = i < size - 1;
}
for (int i = 0, size = nonFileParams.size(); i < size; ++i) {
nonFileParams.get(i).hasMore = i < size - 1;
}
HashSet<Marshaller> operationSpecificMarshallers = new HashSet<>(); HashSet<Marshaller> operationSpecificMarshallers = new HashSet<>();
for (CodegenResponse response : op.responses) { for (CodegenResponse response : op.responses) {
if (!response.primitiveType) { if (!response.primitiveType) {
@ -482,12 +473,10 @@ class PathMatcherPattern {
class TextOrMatcher { class TextOrMatcher {
String value; String value;
boolean isText; boolean isText;
boolean hasMore;
public TextOrMatcher(String value, boolean isText, boolean hasMore) { public TextOrMatcher(String value, boolean isText) {
this.value = value; this.value = value;
this.isText = isText; this.isText = isText;
this.hasMore = hasMore;
} }
@Override @Override
@ -496,12 +485,11 @@ class TextOrMatcher {
if (o == null || getClass() != o.getClass()) return false; if (o == null || getClass() != o.getClass()) return false;
TextOrMatcher that = (TextOrMatcher) o; TextOrMatcher that = (TextOrMatcher) o;
return isText == that.isText && return isText == that.isText &&
hasMore == that.hasMore &&
value.equals(that.value); value.equals(that.value);
} }
@Override @Override
public int hashCode() { public int hashCode() {
return Objects.hash(value, isText, hasMore); return Objects.hash(value, isText);
} }
} }

View File

@ -421,7 +421,8 @@ public class ScalaPlayFrameworkServerCodegen extends AbstractScalaCodegen implem
StringBuilder defaultValue = new StringBuilder(); StringBuilder defaultValue = new StringBuilder();
defaultValue.append(cm.classname).append('('); defaultValue.append(cm.classname).append('(');
for (CodegenProperty var : cm.vars) { for(int i = 0; i < cm.vars.size(); i++) {
CodegenProperty var = cm.vars.get(i);
if (!var.required) { if (!var.required) {
defaultValue.append("None"); defaultValue.append("None");
} else if (models.containsKey(var.dataType)) { } else if (models.containsKey(var.dataType)) {
@ -435,7 +436,7 @@ public class ScalaPlayFrameworkServerCodegen extends AbstractScalaCodegen implem
defaultValue.append("null"); defaultValue.append("null");
} }
if (var.hasMore) { if (i < cm.vars.size()-1) {
defaultValue.append(", "); defaultValue.append(", ");
} }
} }

View File

@ -252,13 +252,6 @@ public class ScalaSttpClientCodegen extends AbstractScalaCodegen implements Code
it.remove(); it.remove();
} }
} }
// Adapt 'hasMore'
it = codegenSecurities.iterator();
while (it.hasNext()) {
final CodegenSecurity security = it.next();
security.hasMore = it.hasNext();
}
if (codegenSecurities.isEmpty()) { if (codegenSecurities.isEmpty()) {
return null; return null;
} }

View File

@ -563,12 +563,8 @@ public class SpringCodegen extends AbstractJavaCodegen
for (String tag : operation.getTags()) { for (String tag : operation.getTags()) {
Map<String, String> value = new HashMap<String, String>(); Map<String, String> value = new HashMap<String, String>();
value.put("tag", tag); value.put("tag", tag);
value.put("hasMore", "true");
tags.add(value); tags.add(value);
} }
if (tags.size() > 0) {
tags.get(tags.size() - 1).remove("hasMore");
}
if (operation.getTags().size() > 0) { if (operation.getTags().size() > 0) {
String tag = operation.getTags().get(0); String tag = operation.getTags().get(0);
operation.setTags(Arrays.asList(tag)); operation.setTags(Arrays.asList(tag));
@ -665,8 +661,7 @@ public class SpringCodegen extends AbstractJavaCodegen
} }
/** /**
* This method removes header parameters from the list of parameters and also * This method removes header parameters from the list of parameters
* corrects last allParams hasMore state.
* *
* @param allParams list of all parameters * @param allParams list of all parameters
*/ */
@ -682,9 +677,6 @@ public class SpringCodegen extends AbstractJavaCodegen
allParams.add(p); allParams.add(p);
} }
} }
if (!allParams.isEmpty()) {
allParams.get(allParams.size() - 1).hasMore = false;
}
} }
@Override @Override

View File

@ -309,13 +309,6 @@ public class Swift4Codegen extends DefaultCodegen implements CodegenConfig {
} }
if (removedChildProperty) { if (removedChildProperty) {
// If we removed an entry from this model's vars, we need to ensure hasMore is updated
int count = 0;
int numVars = codegenProperties.size();
for (CodegenProperty codegenProperty : codegenProperties) {
count += 1;
codegenProperty.hasMore = count < numVars;
}
codegenModel.vars = codegenProperties; codegenModel.vars = codegenProperties;
} }

View File

@ -303,13 +303,6 @@ public class Swift5ClientCodegen extends DefaultCodegen implements CodegenConfig
} }
if (removedChildProperty) { if (removedChildProperty) {
// If we removed an entry from this model's vars, we need to ensure hasMore is updated
int count = 0;
int numVars = codegenProperties.size();
for (CodegenProperty codegenProperty : codegenProperties) {
count += 1;
codegenProperty.hasMore = count < numVars;
}
codegenModel.vars = codegenProperties; codegenModel.vars = codegenProperties;
} }

View File

@ -370,7 +370,6 @@ public class TypeScriptRxjsClientCodegen extends AbstractTypeScriptClientCodegen
this.isMap = o.isMap; this.isMap = o.isMap;
this.isArray = o.isArray; this.isArray = o.isArray;
this.isMultipart = o.isMultipart; this.isMultipart = o.isMultipart;
this.hasMore = o.hasMore;
this.isResponseBinary = o.isResponseBinary; this.isResponseBinary = o.isResponseBinary;
this.isResponseFile = o.isResponseFile; this.isResponseFile = o.isResponseFile;
this.hasReference = o.hasReference; this.hasReference = o.hasReference;

View File

@ -121,16 +121,8 @@ public class OneOfImplementorAdditionalData {
} }
// Add oneOf-containing models properties - we need to properly set the hasMore values to make rendering correct // Add oneOf-containing models properties - we need to properly set the hasMore values to make rendering correct
if (implcm.vars.size() > 0 && additionalProps.size() > 0) {
implcm.vars.get(implcm.vars.size() - 1).hasMore = true;
}
for (int i = 0; i < additionalProps.size(); i++) { for (int i = 0; i < additionalProps.size(); i++) {
CodegenProperty var = additionalProps.get(i); CodegenProperty var = additionalProps.get(i);
if (i == additionalProps.size() - 1) {
var.hasMore = false;
} else {
var.hasMore = true;
}
implcm.vars.add(var); implcm.vars.add(var);
} }

View File

@ -10,7 +10,7 @@ package body {{package}}.Clients is
-- {{#lambdaAdaComment}}{{unescapedNotes}}{{/lambdaAdaComment}}{{/vendorExtensions.x-has-notes}} -- {{#lambdaAdaComment}}{{unescapedNotes}}{{/lambdaAdaComment}}{{/vendorExtensions.x-has-notes}}
procedure {{operationId}} procedure {{operationId}}
(Client : in out Client_Type{{#hasParams}};{{/hasParams}}{{#allParams}} (Client : in out Client_Type{{#hasParams}};{{/hasParams}}{{#allParams}}
{{paramName}} : in {{^isFile}}{{^isString}}{{^isPrimitiveType}}{{^isContainer}}{{package}}.Models.{{/isContainer}}{{/isPrimitiveType}}{{/isString}}{{/isFile}}{{dataType}}{{#hasMore}};{{/hasMore}}{{/allParams}}{{#returnType}}; {{paramName}} : in {{^isFile}}{{^isString}}{{^isPrimitiveType}}{{^isContainer}}{{package}}.Models.{{/isContainer}}{{/isPrimitiveType}}{{/isString}}{{/isFile}}{{dataType}}{{^-last}};{{/-last}}{{/allParams}}{{#returnType}};
Result : out {{returnType}}{{/returnType}}) is Result : out {{returnType}}{{/returnType}}) is
URI : Swagger.Clients.URI_Type;{{#hasBodyParam}} URI : Swagger.Clients.URI_Type;{{#hasBodyParam}}
Req : Swagger.Clients.Request_Type;{{/hasBodyParam}}{{#hasFormParams}} Req : Swagger.Clients.Request_Type;{{/hasBodyParam}}{{#hasFormParams}}
@ -20,10 +20,10 @@ package body {{package}}.Clients is
{{/returnType}} {{/returnType}}
begin begin
{{#hasProduces}} {{#hasProduces}}
Client.Set_Accept (({{#produces}}{{#vendorExtensions.x-has-uniq-produces}}1 => {{/vendorExtensions.x-has-uniq-produces}}Swagger.Clients.{{adaMediaType}}{{#hasMore}}, Client.Set_Accept (({{#produces}}{{#vendorExtensions.x-has-uniq-produces}}1 => {{/vendorExtensions.x-has-uniq-produces}}Swagger.Clients.{{adaMediaType}}{{^-last}},
{{/hasMore}}{{/produces}}));{{/hasProduces}}{{#hasBodyParam}} {{/-last}}{{/produces}}));{{/hasProduces}}{{#hasBodyParam}}
Client.Initialize (Req, ({{#hasConsumes}}{{#consumes}}{{#vendorExtensions.x-has-uniq-consumes}}1 => {{/vendorExtensions.x-has-uniq-consumes}}Swagger.Clients.{{adaMediaType}}{{#hasMore}}, Client.Initialize (Req, ({{#hasConsumes}}{{#consumes}}{{#vendorExtensions.x-has-uniq-consumes}}1 => {{/vendorExtensions.x-has-uniq-consumes}}Swagger.Clients.{{adaMediaType}}{{^-last}},
{{/hasMore}}{{/consumes}}{{/hasConsumes}}{{^hasConsumes}}1 => Swagger.Clients.APPLICATION_JSON{{/hasConsumes}}));{{#bodyParams}}{{#vendorExtensions.x-is-model-type}} {{/-last}}{{/consumes}}{{/hasConsumes}}{{^hasConsumes}}1 => Swagger.Clients.APPLICATION_JSON{{/hasConsumes}}));{{#bodyParams}}{{#vendorExtensions.x-is-model-type}}
{{package}}.Models.Serialize (Req.Stream, "", {{paramName}});{{/vendorExtensions.x-is-model-type}}{{^vendorExtensions.x-is-model-type}}{{#isFile}} {{package}}.Models.Serialize (Req.Stream, "", {{paramName}});{{/vendorExtensions.x-is-model-type}}{{^vendorExtensions.x-is-model-type}}{{#isFile}}
-- TODO: Serialize (Req.Stream, "{{basename}}", {{paramName}});{{/isFile}}{{^isFile}}{{^isLong}} -- TODO: Serialize (Req.Stream, "{{basename}}", {{paramName}});{{/isFile}}{{^isFile}}{{^isLong}}
Req.Stream.Write_Entity ("{{baseName}}", {{paramName}});{{/isLong}}{{#isLong}} Req.Stream.Write_Entity ("{{baseName}}", {{paramName}});{{/isLong}}{{#isLong}}

View File

@ -15,7 +15,7 @@ package {{package}}.Clients is
-- {{#lambdaAdaComment}}{{unescapedNotes}}{{/lambdaAdaComment}}{{/vendorExtensions.x-has-notes}} -- {{#lambdaAdaComment}}{{unescapedNotes}}{{/lambdaAdaComment}}{{/vendorExtensions.x-has-notes}}
procedure {{operationId}} procedure {{operationId}}
(Client : in out Client_Type{{#hasParams}};{{/hasParams}}{{#allParams}} (Client : in out Client_Type{{#hasParams}};{{/hasParams}}{{#allParams}}
{{paramName}} : in {{^isFile}}{{^isString}}{{^isPrimitiveType}}{{^isContainer}}{{package}}.Models.{{/isContainer}}{{/isPrimitiveType}}{{/isString}}{{/isFile}}{{dataType}}{{#hasMore}};{{/hasMore}}{{/allParams}}{{#returnType}}; {{paramName}} : in {{^isFile}}{{^isString}}{{^isPrimitiveType}}{{^isContainer}}{{package}}.Models.{{/isContainer}}{{/isPrimitiveType}}{{/isString}}{{/isFile}}{{dataType}}{{^-last}};{{/-last}}{{/allParams}}{{#returnType}};
Result : out {{returnType}}{{/returnType}}); Result : out {{returnType}}{{/returnType}});
{{/operation}} {{/operation}}

View File

@ -21,8 +21,8 @@ package body {{package}}.Servers is
overriding overriding
procedure {{operationId}} procedure {{operationId}}
(Server : in out Server_Type{{#hasParams}};{{/hasParams}} (Server : in out Server_Type{{#hasParams}};{{/hasParams}}
{{#allParams}}{{paramName}} : in {{dataType}}{{#hasMore}}; {{#allParams}}{{paramName}} : in {{dataType}}{{^-last}};
{{/hasMore}}{{/allParams}}{{#returnType}}; {{/-last}}{{/allParams}}{{#returnType}};
Result : out {{returnType}}{{/returnType}}; Result : out {{returnType}}{{/returnType}};
Context : in out Swagger.Servers.Context_Type) is Context : in out Swagger.Servers.Context_Type) is
begin begin

View File

@ -65,8 +65,8 @@ package body {{package}}.Skeletons is
Deserialize (Input, "{{baseName}}", {{paramName}});{{/isLong}}{{/isFile}}{{/vendorExtensions.x-is-model-type}}{{/bodyParams}} Deserialize (Input, "{{baseName}}", {{paramName}});{{/isLong}}{{/isFile}}{{/vendorExtensions.x-is-model-type}}{{/bodyParams}}
{{/hasBodyParam}} {{/hasBodyParam}}
Impl.{{operationId}} Impl.{{operationId}}
({{#allParams}}{{paramName}}{{#hasMore}}, ({{#allParams}}{{paramName}}{{^-last}},
{{/hasMore}}{{/allParams}}{{#returnType}}{{#hasParams}}, {{/hasParams}}Result{{/returnType}}, Context); {{/-last}}{{/allParams}}{{#returnType}}{{#hasParams}}, {{/hasParams}}Result{{/returnType}}, Context);
{{/hasParams}} {{/hasParams}}
{{^hasParams}} {{^hasParams}}
{{#returnType}} {{#returnType}}
@ -161,8 +161,8 @@ package body {{package}}.Skeletons is
Deserialize (Input, "{{baseName}}", {{paramName}});{{/isLong}}{{/isFile}}{{/vendorExtensions.x-is-model-type}}{{/bodyParams}} Deserialize (Input, "{{baseName}}", {{paramName}});{{/isLong}}{{/isFile}}{{/vendorExtensions.x-is-model-type}}{{/bodyParams}}
{{/hasBodyParam}} {{/hasBodyParam}}
Server.{{operationId}} Server.{{operationId}}
({{#allParams}}{{paramName}}{{#hasMore}}, ({{#allParams}}{{paramName}}{{^-last}},
{{/hasMore}}{{/allParams}}{{#returnType}}{{#hasParams}}, {{/hasParams}}Result{{/returnType}}, Context); {{/-last}}{{/allParams}}{{#returnType}}{{#hasParams}}, {{/hasParams}}Result{{/returnType}}, Context);
{{/hasParams}} {{/hasParams}}
{{^hasParams}} {{^hasParams}}
{{#returnType}} {{#returnType}}
@ -212,14 +212,14 @@ package body {{package}}.Skeletons is
-- {{summary}} -- {{summary}}
{{#hasParams}} {{#hasParams}}
procedure {{operationId}} procedure {{operationId}}
({{#allParams}}{{paramName}} : in {{dataType}}{{#hasMore}}; ({{#allParams}}{{paramName}} : in {{dataType}}{{^-last}};
{{/hasMore}}{{/allParams}}{{#returnType}}; {{/-last}}{{/allParams}}{{#returnType}};
Result : out {{returnType}}{{/returnType}}; Result : out {{returnType}}{{/returnType}};
Context : in out Swagger.Servers.Context_Type) is Context : in out Swagger.Servers.Context_Type) is
begin begin
Impl.{{operationId}} Impl.{{operationId}}
({{#allParams}}{{paramName}}{{#hasMore}}, ({{#allParams}}{{paramName}}{{^-last}},
{{/hasMore}}{{/allParams}}{{#returnType}}, {{/-last}}{{/allParams}}{{#returnType}},
Result{{/returnType}}, Result{{/returnType}},
Context); Context);
end {{operationId}}; end {{operationId}};

View File

@ -21,8 +21,8 @@ package {{package}}.Skeletons is
-- {{#lambdaAdaComment}}{{unescapedNotes}}{{/lambdaAdaComment}}{{/vendorExtensions.x-has-notes}} -- {{#lambdaAdaComment}}{{unescapedNotes}}{{/lambdaAdaComment}}{{/vendorExtensions.x-has-notes}}
procedure {{operationId}} procedure {{operationId}}
(Server : in out Server_Type{{#hasParams}};{{/hasParams}} (Server : in out Server_Type{{#hasParams}};{{/hasParams}}
{{#allParams}}{{paramName}} : in {{dataType}}{{#hasMore}}; {{#allParams}}{{paramName}} : in {{dataType}}{{^-last}};
{{/hasMore}}{{/allParams}}{{#returnType}}; {{/-last}}{{/allParams}}{{#returnType}};
Result : out {{returnType}}{{/returnType}}; Result : out {{returnType}}{{/returnType}};
Context : in out Swagger.Servers.Context_Type) is abstract; Context : in out Swagger.Servers.Context_Type) is abstract;
{{/operation}} {{/operation}}
@ -89,8 +89,8 @@ package {{package}}.Skeletons is
-- {{summary}} -- {{summary}}
{{#hasParams}} {{#hasParams}}
procedure {{operationId}} procedure {{operationId}}
({{#allParams}}{{paramName}} : in {{dataType}}{{#hasMore}}; ({{#allParams}}{{paramName}} : in {{dataType}}{{^-last}};
{{/hasMore}}{{/allParams}}{{#returnType}}; {{/-last}}{{/allParams}}{{#returnType}};
Result : out {{returnType}}{{/returnType}}; Result : out {{returnType}}{{/returnType}};
Context : in out Swagger.Servers.Context_Type); Context : in out Swagger.Servers.Context_Type);
{{/hasParams}} {{/hasParams}}

View File

@ -28,8 +28,8 @@ package {{package}}.Servers is
overriding overriding
procedure {{operationId}} procedure {{operationId}}
(Server : in out Server_Type{{#hasParams}};{{/hasParams}} (Server : in out Server_Type{{#hasParams}};{{/hasParams}}
{{#allParams}}{{paramName}} : in {{dataType}}{{#hasMore}}; {{#allParams}}{{paramName}} : in {{dataType}}{{^-last}};
{{/hasMore}}{{/allParams}}{{#returnType}}; {{/-last}}{{/allParams}}{{#returnType}};
Result : out {{returnType}}{{/returnType}}; Result : out {{returnType}}{{/returnType}};
Context : in out Swagger.Servers.Context_Type); Context : in out Swagger.Servers.Context_Type);
{{/operation}} {{/operation}}

View File

@ -66,5 +66,5 @@ Note: You don't need to specify includes for models and include folder seperatel
## Author ## Author
{{#apiInfo}}{{#apis}}{{^hasMore}}{{infoEmail}} {{#apiInfo}}{{#apis}}{{#-last}}{{infoEmail}}
{{/hasMore}}{{/apis}}{{/apiInfo}} {{/-last}}{{/apis}}{{/apiInfo}}

View File

@ -116,7 +116,7 @@ end:
{{#pathParams}} {{#pathParams}}
// Path Params // Path Params
long sizeOfPathParams_{{{paramName}}} = {{#pathParams}}{{#isLong}}sizeof({{paramName}})+3{{/isLong}}{{#isString}}strlen({{paramName}})+3{{/isString}}{{#hasMore}} + {{/hasMore}}{{/pathParams}} + strlen("{ {{paramName}} }"); long sizeOfPathParams_{{{paramName}}} = {{#pathParams}}{{#isLong}}sizeof({{paramName}})+3{{/isLong}}{{#isString}}strlen({{paramName}})+3{{/isString}}{{^-last}} + {{/-last}}{{/pathParams}} + strlen("{ {{paramName}} }");
{{#isNumeric}} {{#isNumeric}}
if({{paramName}} == 0){ if({{paramName}} == 0){
goto end; goto end;

View File

@ -130,64 +130,64 @@ char* {{name}}{{classname}}_ToString({{projectName}}_{{classVarName}}_{{enumName
{{^isPrimitiveType}} {{^isPrimitiveType}}
{{#isModel}} {{#isModel}}
{{#isEnum}} {{#isEnum}}
{{projectName}}_{{classVarName}}_{{enumName}}_e {{name}}{{#hasMore}},{{/hasMore}} {{projectName}}_{{classVarName}}_{{enumName}}_e {{name}}{{^-last}},{{/-last}}
{{/isEnum}} {{/isEnum}}
{{^isEnum}} {{^isEnum}}
{{datatype}}_t *{{name}}{{#hasMore}},{{/hasMore}} {{datatype}}_t *{{name}}{{^-last}},{{/-last}}
{{/isEnum}} {{/isEnum}}
{{/isModel}} {{/isModel}}
{{#isUuid}} {{#isUuid}}
{{datatype}} *{{name}}{{#hasMore}},{{/hasMore}} {{datatype}} *{{name}}{{^-last}},{{/-last}}
{{/isUuid}} {{/isUuid}}
{{#isEmail}} {{#isEmail}}
{{datatype}} *{{name}}{{#hasMore}},{{/hasMore}} {{datatype}} *{{name}}{{^-last}},{{/-last}}
{{/isEmail}} {{/isEmail}}
{{#isFreeFormObject}} {{#isFreeFormObject}}
{{datatype}}_t *{{name}}{{#hasMore}},{{/hasMore}} {{datatype}}_t *{{name}}{{^-last}},{{/-last}}
{{/isFreeFormObject}} {{/isFreeFormObject}}
{{/isPrimitiveType}} {{/isPrimitiveType}}
{{#isPrimitiveType}} {{#isPrimitiveType}}
{{#isNumeric}} {{#isNumeric}}
{{datatype}} {{name}}{{#hasMore}},{{/hasMore}} {{datatype}} {{name}}{{^-last}},{{/-last}}
{{/isNumeric}} {{/isNumeric}}
{{#isBoolean}} {{#isBoolean}}
{{datatype}} {{name}}{{#hasMore}},{{/hasMore}} {{datatype}} {{name}}{{^-last}},{{/-last}}
{{/isBoolean}} {{/isBoolean}}
{{#isEnum}} {{#isEnum}}
{{#isString}} {{#isString}}
{{projectName}}_{{classVarName}}_{{enumName}}_e {{name}}{{#hasMore}},{{/hasMore}} {{projectName}}_{{classVarName}}_{{enumName}}_e {{name}}{{^-last}},{{/-last}}
{{/isString}} {{/isString}}
{{/isEnum}} {{/isEnum}}
{{^isEnum}} {{^isEnum}}
{{#isString}} {{#isString}}
{{datatype}} *{{name}}{{#hasMore}},{{/hasMore}} {{datatype}} *{{name}}{{^-last}},{{/-last}}
{{/isString}} {{/isString}}
{{/isEnum}} {{/isEnum}}
{{#isByteArray}} {{#isByteArray}}
{{datatype}} {{name}}{{#hasMore}},{{/hasMore}} {{datatype}} {{name}}{{^-last}},{{/-last}}
{{/isByteArray}} {{/isByteArray}}
{{#isBinary}} {{#isBinary}}
{{datatype}} {{name}}{{#hasMore}},{{/hasMore}} {{datatype}} {{name}}{{^-last}},{{/-last}}
{{/isBinary}} {{/isBinary}}
{{#isDate}} {{#isDate}}
{{datatype}} *{{name}}{{#hasMore}},{{/hasMore}} {{datatype}} *{{name}}{{^-last}},{{/-last}}
{{/isDate}} {{/isDate}}
{{#isDateTime}} {{#isDateTime}}
{{datatype}} *{{name}}{{#hasMore}},{{/hasMore}} {{datatype}} *{{name}}{{^-last}},{{/-last}}
{{/isDateTime}} {{/isDateTime}}
{{/isPrimitiveType}} {{/isPrimitiveType}}
{{/isContainer}} {{/isContainer}}
{{#isContainer}} {{#isContainer}}
{{#isArray}} {{#isArray}}
{{#isPrimitiveType}} {{#isPrimitiveType}}
{{datatype}}_t *{{name}}{{#hasMore}},{{/hasMore}} {{datatype}}_t *{{name}}{{^-last}},{{/-last}}
{{/isPrimitiveType}} {{/isPrimitiveType}}
{{^isPrimitiveType}} {{^isPrimitiveType}}
{{datatype}}_t *{{name}}{{#hasMore}},{{/hasMore}} {{datatype}}_t *{{name}}{{^-last}},{{/-last}}
{{/isPrimitiveType}} {{/isPrimitiveType}}
{{/isArray}} {{/isArray}}
{{#isMap}} {{#isMap}}
{{datatype}} {{name}}{{#hasMore}},{{/hasMore}} {{datatype}} {{name}}{{^-last}},{{/-last}}
{{/isMap}} {{/isMap}}
{{/isContainer}} {{/isContainer}}
{{/vars}} {{/vars}}
@ -704,64 +704,64 @@ fail:
{{^isPrimitiveType}} {{^isPrimitiveType}}
{{#isModel}} {{#isModel}}
{{#isEnum}} {{#isEnum}}
{{^required}}{{{name}}} ? {{/required}}{{{name}}}_local_nonprim_enum{{^required}} : -1{{/required}}{{#hasMore}},{{/hasMore}} {{^required}}{{{name}}} ? {{/required}}{{{name}}}_local_nonprim_enum{{^required}} : -1{{/required}}{{^-last}},{{/-last}}
{{/isEnum}} {{/isEnum}}
{{^isEnum}} {{^isEnum}}
{{^required}}{{{name}}} ? {{/required}}{{{name}}}_local_nonprim{{^required}} : NULL{{/required}}{{#hasMore}},{{/hasMore}} {{^required}}{{{name}}} ? {{/required}}{{{name}}}_local_nonprim{{^required}} : NULL{{/required}}{{^-last}},{{/-last}}
{{/isEnum}} {{/isEnum}}
{{/isModel}} {{/isModel}}
{{#isUuid}} {{#isUuid}}
{{^required}}{{{name}}} ? {{/required}}strdup({{{name}}}->valuestring){{^required}} : NULL{{/required}}{{#hasMore}},{{/hasMore}} {{^required}}{{{name}}} ? {{/required}}strdup({{{name}}}->valuestring){{^required}} : NULL{{/required}}{{^-last}},{{/-last}}
{{/isUuid}} {{/isUuid}}
{{#isEmail}} {{#isEmail}}
{{^required}}{{{name}}} ? {{/required}}strdup({{{name}}}->valuestring){{^required}} : NULL{{/required}}{{#hasMore}},{{/hasMore}} {{^required}}{{{name}}} ? {{/required}}strdup({{{name}}}->valuestring){{^required}} : NULL{{/required}}{{^-last}},{{/-last}}
{{/isEmail}} {{/isEmail}}
{{#isFreeFormObject}} {{#isFreeFormObject}}
{{^required}}{{{name}}} ? {{/required}}{{{name}}}_local_object{{^required}} : NULL{{/required}}{{#hasMore}},{{/hasMore}} {{^required}}{{{name}}} ? {{/required}}{{{name}}}_local_object{{^required}} : NULL{{/required}}{{^-last}},{{/-last}}
{{/isFreeFormObject}} {{/isFreeFormObject}}
{{/isPrimitiveType}} {{/isPrimitiveType}}
{{#isPrimitiveType}} {{#isPrimitiveType}}
{{#isNumeric}} {{#isNumeric}}
{{^required}}{{{name}}} ? {{/required}}{{{name}}}->valuedouble{{^required}} : 0{{/required}}{{#hasMore}},{{/hasMore}} {{^required}}{{{name}}} ? {{/required}}{{{name}}}->valuedouble{{^required}} : 0{{/required}}{{^-last}},{{/-last}}
{{/isNumeric}} {{/isNumeric}}
{{#isBoolean}} {{#isBoolean}}
{{^required}}{{{name}}} ? {{/required}}{{{name}}}->valueint{{^required}} : 0{{/required}}{{#hasMore}},{{/hasMore}} {{^required}}{{{name}}} ? {{/required}}{{{name}}}->valueint{{^required}} : 0{{/required}}{{^-last}},{{/-last}}
{{/isBoolean}} {{/isBoolean}}
{{#isEnum}} {{#isEnum}}
{{#isString}} {{#isString}}
{{^required}}{{{name}}} ? {{/required}}{{name}}Variable{{^required}} : -1{{/required}}{{#hasMore}},{{/hasMore}} {{^required}}{{{name}}} ? {{/required}}{{name}}Variable{{^required}} : -1{{/required}}{{^-last}},{{/-last}}
{{/isString}} {{/isString}}
{{/isEnum}} {{/isEnum}}
{{^isEnum}} {{^isEnum}}
{{#isString}} {{#isString}}
{{^required}}{{{name}}} ? {{/required}}strdup({{{name}}}->valuestring){{^required}} : NULL{{/required}}{{#hasMore}},{{/hasMore}} {{^required}}{{{name}}} ? {{/required}}strdup({{{name}}}->valuestring){{^required}} : NULL{{/required}}{{^-last}},{{/-last}}
{{/isString}} {{/isString}}
{{/isEnum}} {{/isEnum}}
{{#isByteArray}} {{#isByteArray}}
{{^required}}{{{name}}} ? {{/required}}{{{name}}}->valueint{{^required}} : 0{{/required}}{{#hasMore}},{{/hasMore}} {{^required}}{{{name}}} ? {{/required}}{{{name}}}->valueint{{^required}} : 0{{/required}}{{^-last}},{{/-last}}
{{/isByteArray}} {{/isByteArray}}
{{#isBinary}} {{#isBinary}}
{{^required}}{{{name}}} ? {{/required}}decoded_str_{{{name}}}{{^required}} : NULL{{/required}}{{#hasMore}},{{/hasMore}} {{^required}}{{{name}}} ? {{/required}}decoded_str_{{{name}}}{{^required}} : NULL{{/required}}{{^-last}},{{/-last}}
{{/isBinary}} {{/isBinary}}
{{#isDate}} {{#isDate}}
{{^required}}{{{name}}} ? {{/required}}strdup({{{name}}}->valuestring){{^required}} : NULL{{/required}}{{#hasMore}},{{/hasMore}} {{^required}}{{{name}}} ? {{/required}}strdup({{{name}}}->valuestring){{^required}} : NULL{{/required}}{{^-last}},{{/-last}}
{{/isDate}} {{/isDate}}
{{#isDateTime}} {{#isDateTime}}
{{^required}}{{{name}}} ? {{/required}}strdup({{{name}}}->valuestring){{^required}} : NULL{{/required}}{{#hasMore}},{{/hasMore}} {{^required}}{{{name}}} ? {{/required}}strdup({{{name}}}->valuestring){{^required}} : NULL{{/required}}{{^-last}},{{/-last}}
{{/isDateTime}} {{/isDateTime}}
{{/isPrimitiveType}} {{/isPrimitiveType}}
{{/isContainer}} {{/isContainer}}
{{#isContainer}} {{#isContainer}}
{{#isArray}} {{#isArray}}
{{#isPrimitiveType}} {{#isPrimitiveType}}
{{^required}}{{{name}}} ? {{/required}}{{{name}}}List{{^required}} : NULL{{/required}}{{#hasMore}},{{/hasMore}} {{^required}}{{{name}}} ? {{/required}}{{{name}}}List{{^required}} : NULL{{/required}}{{^-last}},{{/-last}}
{{/isPrimitiveType}} {{/isPrimitiveType}}
{{^isPrimitiveType}} {{^isPrimitiveType}}
{{^required}}{{{name}}} ? {{/required}}{{{name}}}List{{^required}} : NULL{{/required}}{{#hasMore}},{{/hasMore}} {{^required}}{{{name}}} ? {{/required}}{{{name}}}List{{^required}} : NULL{{/required}}{{^-last}},{{/-last}}
{{/isPrimitiveType}} {{/isPrimitiveType}}
{{/isArray}} {{/isArray}}
{{#isMap}} {{#isMap}}
{{^required}}{{{name}}} ? {{/required}}{{{name}}}List{{^required}} : NULL{{/required}}{{#hasMore}},{{/hasMore}} {{^required}}{{{name}}} ? {{/required}}{{{name}}}List{{^required}} : NULL{{/required}}{{^-last}},{{/-last}}
{{/isMap}} {{/isMap}}
{{/isContainer}} {{/isContainer}}
{{/vars}} {{/vars}}

View File

@ -150,64 +150,64 @@ typedef struct {{classname}}_t {
{{^isPrimitiveType}} {{^isPrimitiveType}}
{{#isModel}} {{#isModel}}
{{#isEnum}} {{#isEnum}}
{{projectName}}_{{classVarName}}_{{enumName}}_e {{name}}{{#hasMore}},{{/hasMore}} {{projectName}}_{{classVarName}}_{{enumName}}_e {{name}}{{^-last}},{{/-last}}
{{/isEnum}} {{/isEnum}}
{{^isEnum}} {{^isEnum}}
{{datatype}}_t *{{name}}{{#hasMore}},{{/hasMore}} {{datatype}}_t *{{name}}{{^-last}},{{/-last}}
{{/isEnum}} {{/isEnum}}
{{/isModel}} {{/isModel}}
{{#isUuid}} {{#isUuid}}
{{datatype}} *{{name}}{{#hasMore}},{{/hasMore}} {{datatype}} *{{name}}{{^-last}},{{/-last}}
{{/isUuid}} {{/isUuid}}
{{#isEmail}} {{#isEmail}}
{{datatype}} *{{name}}{{#hasMore}},{{/hasMore}} {{datatype}} *{{name}}{{^-last}},{{/-last}}
{{/isEmail}} {{/isEmail}}
{{#isFreeFormObject}} {{#isFreeFormObject}}
{{datatype}}_t *{{name}}{{#hasMore}},{{/hasMore}} {{datatype}}_t *{{name}}{{^-last}},{{/-last}}
{{/isFreeFormObject}} {{/isFreeFormObject}}
{{/isPrimitiveType}} {{/isPrimitiveType}}
{{#isPrimitiveType}} {{#isPrimitiveType}}
{{#isNumeric}} {{#isNumeric}}
{{datatype}} {{name}}{{#hasMore}},{{/hasMore}} {{datatype}} {{name}}{{^-last}},{{/-last}}
{{/isNumeric}} {{/isNumeric}}
{{#isBoolean}} {{#isBoolean}}
{{datatype}} {{name}}{{#hasMore}},{{/hasMore}} {{datatype}} {{name}}{{^-last}},{{/-last}}
{{/isBoolean}} {{/isBoolean}}
{{#isEnum}} {{#isEnum}}
{{#isString}} {{#isString}}
{{projectName}}_{{classVarName}}_{{enumName}}_e {{name}}{{#hasMore}},{{/hasMore}} {{projectName}}_{{classVarName}}_{{enumName}}_e {{name}}{{^-last}},{{/-last}}
{{/isString}} {{/isString}}
{{/isEnum}} {{/isEnum}}
{{^isEnum}} {{^isEnum}}
{{#isString}} {{#isString}}
{{datatype}} *{{name}}{{#hasMore}},{{/hasMore}} {{datatype}} *{{name}}{{^-last}},{{/-last}}
{{/isString}} {{/isString}}
{{/isEnum}} {{/isEnum}}
{{#isByteArray}} {{#isByteArray}}
{{datatype}} {{name}}{{#hasMore}},{{/hasMore}} {{datatype}} {{name}}{{^-last}},{{/-last}}
{{/isByteArray}} {{/isByteArray}}
{{#isBinary}} {{#isBinary}}
{{datatype}} {{name}}{{#hasMore}},{{/hasMore}} {{datatype}} {{name}}{{^-last}},{{/-last}}
{{/isBinary}} {{/isBinary}}
{{#isDate}} {{#isDate}}
{{datatype}} *{{name}}{{#hasMore}},{{/hasMore}} {{datatype}} *{{name}}{{^-last}},{{/-last}}
{{/isDate}} {{/isDate}}
{{#isDateTime}} {{#isDateTime}}
{{datatype}} *{{name}}{{#hasMore}},{{/hasMore}} {{datatype}} *{{name}}{{^-last}},{{/-last}}
{{/isDateTime}} {{/isDateTime}}
{{/isPrimitiveType}} {{/isPrimitiveType}}
{{/isContainer}} {{/isContainer}}
{{#isContainer}} {{#isContainer}}
{{#isArray}} {{#isArray}}
{{#isPrimitiveType}} {{#isPrimitiveType}}
{{datatype}}_t *{{name}}{{#hasMore}},{{/hasMore}} {{datatype}}_t *{{name}}{{^-last}},{{/-last}}
{{/isPrimitiveType}} {{/isPrimitiveType}}
{{^isPrimitiveType}} {{^isPrimitiveType}}
{{datatype}}_t *{{name}}{{#hasMore}},{{/hasMore}} {{datatype}}_t *{{name}}{{^-last}},{{/-last}}
{{/isPrimitiveType}} {{/isPrimitiveType}}
{{/isArray}} {{/isArray}}
{{#isMap}} {{#isMap}}
{{datatype}} {{name}}{{#hasMore}},{{/hasMore}} {{datatype}} {{name}}{{^-last}},{{/-last}}
{{/isMap}} {{/isMap}}
{{/isContainer}} {{/isContainer}}
{{/vars}} {{/vars}}

View File

@ -29,13 +29,13 @@
{{classname}} = {{classname}}_create( {{classname}} = {{classname}}_create(
{{#vars}} {{#isEnum}}{{^isContainer}}{{#example}}{{projectName}}_{{classVarName}}_{{enumName}}_{{{.}}}{{/example}}{{/isContainer}}{{#isContainer}}{{#example}}{{{.}}}{{/example}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{#example}}{{{.}}}{{/example}}{{/isEnum}}{{^example}}{{#isModel}}{{#isEnum}}// enum {{datatypeWithEnum}}_e Work in Progress {{#vars}} {{#isEnum}}{{^isContainer}}{{#example}}{{projectName}}_{{classVarName}}_{{enumName}}_{{{.}}}{{/example}}{{/isContainer}}{{#isContainer}}{{#example}}{{{.}}}{{/example}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{#example}}{{{.}}}{{/example}}{{/isEnum}}{{^example}}{{#isModel}}{{#isEnum}}// enum {{datatypeWithEnum}}_e Work in Progress
{{/isEnum}}{{^isEnum}} // false, not to have infinite recursion {{/isEnum}}{{^isEnum}} // false, not to have infinite recursion
instantiate_{{{dataType}}}(0){{/isEnum}}{{/isModel}}{{^isModel}}0{{/isModel}}{{/example}}{{#hasMore}},{{/hasMore}} instantiate_{{{dataType}}}(0){{/isEnum}}{{/isModel}}{{^isModel}}0{{/isModel}}{{/example}}{{^-last}},{{/-last}}
{{/vars}} {{/vars}}
); );
} else { } else {
{{classname}} = {{classname}}_create( {{classname}} = {{classname}}_create(
{{#vars}} {{#isEnum}}{{^isContainer}}{{#example}}{{projectName}}_{{classVarName}}_{{enumName}}_{{{.}}}{{/example}}{{/isContainer}}{{#isContainer}}{{#example}}{{{.}}}{{/example}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{#example}}{{{.}}}{{/example}}{{/isEnum}}{{^example}}{{#isModel}}{{#isEnum}}// enum {{datatypeWithEnum}}_e Work in Progress {{#vars}} {{#isEnum}}{{^isContainer}}{{#example}}{{projectName}}_{{classVarName}}_{{enumName}}_{{{.}}}{{/example}}{{/isContainer}}{{#isContainer}}{{#example}}{{{.}}}{{/example}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{#example}}{{{.}}}{{/example}}{{/isEnum}}{{^example}}{{#isModel}}{{#isEnum}}// enum {{datatypeWithEnum}}_e Work in Progress
{{/isEnum}}{{^isEnum}}NULL{{/isEnum}}{{/isModel}}{{^isModel}}0{{/isModel}}{{/example}}{{#hasMore}},{{/hasMore}} {{/isEnum}}{{^isEnum}}NULL{{/isEnum}}{{/isModel}}{{^isModel}}0{{/isModel}}{{/example}}{{^-last}},{{/-last}}
{{/vars}} {{/vars}}
); );
} }

View File

@ -61,5 +61,5 @@ Class | Method | HTTP request | Description
## Author ## Author
{{#apiInfo}}{{#apis}}{{^hasMore}}{{infoEmail}} {{#apiInfo}}{{#apis}}{{#-last}}{{infoEmail}}
{{/hasMore}}{{/apis}}{{/apiInfo}} {{/-last}}{{/apis}}{{/apiInfo}}

View File

@ -13,7 +13,7 @@ feature -- API Access
{{#operation}} {{#operation}}
{{operationId}} {{#hasParams}}({{#allParams}}{{paramName}}: {{#required}}{{{dataType}}}{{/required}}{{^required}}{{#isPrimitiveType}}{{{dataType}}}{{/isPrimitiveType}}{{^isPrimitiveType}}detachable {{{dataType}}}{{/isPrimitiveType}}{{/required}}{{#hasMore}}; {{/hasMore}}{{/allParams}}){{/hasParams}}{{#returnType}}: detachable {{{returnType}}}{{/returnType}}{{^returnType}}{{/returnType}} {{operationId}} {{#hasParams}}({{#allParams}}{{paramName}}: {{#required}}{{{dataType}}}{{/required}}{{^required}}{{#isPrimitiveType}}{{{dataType}}}{{/isPrimitiveType}}{{^isPrimitiveType}}detachable {{{dataType}}}{{/isPrimitiveType}}{{/required}}{{^-last}}; {{/-last}}{{/allParams}}){{/hasParams}}{{#returnType}}: detachable {{{returnType}}}{{/returnType}}{{^returnType}}{{/returnType}}
-- {{summary}} -- {{summary}}
-- {{notes}} -- {{notes}}
-- {{#allParams}} -- {{#allParams}}
@ -59,11 +59,11 @@ feature -- API Access
end end
{{/formParams}} {{/formParams}}
if attached {STRING} api_client.select_header_accept (<<{{#produces}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/produces}}>>) as l_accept then if attached {STRING} api_client.select_header_accept (<<{{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}}>>) as l_accept then
l_request.add_header(l_accept,"Accept"); l_request.add_header(l_accept,"Accept");
end end
l_request.add_header(api_client.select_header_content_type (<<{{#consumes}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/consumes}}>>),"Content-Type") l_request.add_header(api_client.select_header_content_type (<<{{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}}>>),"Content-Type")
l_request.set_auth_names (<<{{#authMethods}}"{{name}}"{{#hasMore}}, {{/hasMore}}{{/authMethods}}>>) l_request.set_auth_names (<<{{#authMethods}}"{{name}}"{{^-last}}, {{/-last}}{{/authMethods}}>>)
l_response := api_client.call_api (l_path, "{{httpMethod}}", l_request, {{#returnType}}Void{{/returnType}}{{^returnType}}agent serializer{{/returnType}}, {{#returnType}}agent deserializer{{/returnType}}{{^returnType}}Void{{/returnType}}) l_response := api_client.call_api (l_path, "{{httpMethod}}", l_request, {{#returnType}}Void{{/returnType}}{{^returnType}}agent serializer{{/returnType}}, {{#returnType}}agent deserializer{{/returnType}}{{^returnType}}Void{{/returnType}})
{{#returnType}} {{#returnType}}
if l_response.has_error then if l_response.has_error then

View File

@ -11,7 +11,7 @@ Feature | HTTP request | Description
{{#operations}} {{#operations}}
{{#operation}} {{#operation}}
# **{{{operationId}}}** # **{{{operationId}}}**
> {{operationId}} {{#hasParams}}({{#allParams}}{{paramName}}: {{#required}}{{{dataType}}}{{/required}}{{^required}} detachable {{{dataType}}}{{/required}} {{#hasMore}}; {{/hasMore}}{{/allParams}}){{/hasParams}}{{#returnType}}: detachable {{{returnType}}}{{/returnType}}{{^returnType}}{{/returnType}} > {{operationId}} {{#hasParams}}({{#allParams}}{{paramName}}: {{#required}}{{{dataType}}}{{/required}}{{^required}} detachable {{{dataType}}}{{/required}} {{^-last}}; {{/-last}}{{/allParams}}){{/hasParams}}{{#returnType}}: detachable {{{returnType}}}{{/returnType}}{{^returnType}}{{/returnType}}
{{{summary}}}{{#notes}} {{{summary}}}{{#notes}}
@ -36,8 +36,8 @@ Name | Type | Description | Notes
### HTTP request headers ### HTTP request headers
- **Content-Type**: {{#consumes}}{{{mediaType}}}{{#hasMore}}, {{/hasMore}}{{/consumes}}{{^consumes}}Not defined{{/consumes}} - **Content-Type**: {{#consumes}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/consumes}}{{^consumes}}Not defined{{/consumes}}
- **Accept**: {{#produces}}{{{mediaType}}}{{#hasMore}}, {{/hasMore}}{{/produces}}{{^produces}}Not defined{{/produces}} - **Accept**: {{#produces}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/produces}}{{^produces}}Not defined{{/produces}}
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

View File

@ -42,10 +42,10 @@ feature -- Test routines
{{/allParams}} {{/allParams}}
{{#returnType}} {{#returnType}}
-- l_response := api.{{operationId}}{{#hasParams}}({{#allParams}}l_{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}){{/hasParams}} -- l_response := api.{{operationId}}{{#hasParams}}({{#allParams}}l_{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}){{/hasParams}}
{{/returnType}} {{/returnType}}
{{^returnType}} {{^returnType}}
-- api.{{operationId}}{{#hasParams}}({{#allParams}}l_{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}){{/hasParams}} -- api.{{operationId}}{{#hasParams}}({{#allParams}}l_{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}){{/hasParams}}
{{/returnType}} {{/returnType}}
assert ("not_implemented", False) assert ("not_implemented", False)
end end

View File

@ -45,7 +45,7 @@ def apiInstance = new {{classname}}()
{{#allParams}}def {{paramName}} = {{{example}}} // {{{dataType}}} | {{{description}}} {{#allParams}}def {{paramName}} = {{{example}}} // {{{dataType}}} | {{{description}}}
{{/allParams}} {{/allParams}}
apiInstance.{{{operationId}}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) apiInstance.{{{operationId}}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}})
{ {
// on success // on success
{{#returnType}}def result = ({{returnType}})it {{#returnType}}def result = ({{returnType}})it

View File

@ -48,39 +48,26 @@ class {{classname}} {
{{#consumes.0}} {{#consumes.0}}
contentType = '{{{mediaType}}}'; contentType = '{{{mediaType}}}';
{{/consumes.0}} {{/consumes.0}}
{{/bodyParam}}
{{#bodyParams.0}}
{{^hasMore}}
bodyParams = {{paramName}} bodyParams = {{paramName}}
{{/hasMore}} {{/bodyParam}}
{{#hasMore}}
bodyParams = [:]
bodyParams.put("{{baseName}}", {{paramName}})
{{/hasMore}}
{{/bodyParams.0}}
{{#bodyParams}}
{{#secondaryParam}}
bodyParams.put("{{baseName}}", {{paramName}})
{{/secondaryParam}}
{{/bodyParams}}
{{#hasFormParams}} {{#hasFormParams}}
{{#consumes.0}} {{#consumes.0}}
contentType = '{{{mediaType}}}'; contentType = '{{{mediaType}}}';
{{/consumes.0}} {{/consumes.0}}
{{#formParams.0}} {{#formParams}}
{{^hasMore}} {{#-first}}
bodyParams = {{paramName}} {{^-last}}
{{/hasMore}}
{{#hasMore}}
bodyParams = [:] bodyParams = [:]
bodyParams.put("{{baseName}}", {{paramName}}) bodyParams.put("{{baseName}}", {{paramName}})
{{/hasMore}} {{/-last}}
{{/formParams.0}} {{#-last}}
{{#formParams}} bodyParams = {{paramName}}
{{#secondaryParam}} {{/-last}}
{{/-first}}
{{^-first}}
bodyParams.put("{{baseName}}", {{paramName}}) bodyParams.put("{{baseName}}", {{paramName}})
{{/secondaryParam}} {{/-first}}
{{/formParams}} {{/formParams}}
{{/hasFormParams}} {{/hasFormParams}}

View File

@ -157,7 +157,7 @@ public class {{{classname}}}Example {
{{{dataType}}} {{{paramName}}} = {{{example}}}; // {{{dataType}}} | {{{description}}} {{{dataType}}} {{{paramName}}} = {{{example}}}; // {{{dataType}}} | {{{description}}}
{{/allParams}} {{/allParams}}
try { try {
{{#returnType}}{{{returnType}}} result = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{{paramName}}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{#returnType}} {{#returnType}}{{{returnType}}} result = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}});{{#returnType}}
System.out.println(result);{{/returnType}} System.out.println(result);{{/returnType}}
} catch (ApiException e) { } catch (ApiException e) {
System.err.println("Exception when calling {{{classname}}}#{{{operationId}}}"); System.err.println("Exception when calling {{{classname}}}#{{{operationId}}}");
@ -219,5 +219,5 @@ It's recommended to create an instance of `ApiClient` per thread in a multithrea
## Author ## Author
{{#apiInfo}}{{#apis}}{{^hasMore}}{{infoEmail}} {{#apiInfo}}{{#apis}}{{#-last}}{{infoEmail}}
{{/hasMore}}{{/apis}}{{/apiInfo}} {{/-last}}{{/apis}}{{/apiInfo}}

View File

@ -63,7 +63,7 @@ public class {{classname}} {
{{#isDeprecated}} {{#isDeprecated}}
@Deprecated @Deprecated
{{/isDeprecated}} {{/isDeprecated}}
public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws ApiException { public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException {
Object localVarPostBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}}; Object localVarPostBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}};
{{#allParams}}{{#required}} {{#allParams}}{{#required}}
// verify the required parameter '{{paramName}}' is set // verify the required parameter '{{paramName}}' is set
@ -99,16 +99,16 @@ public class {{classname}} {
{{/formParams}} {{/formParams}}
final String[] localVarAccepts = { final String[] localVarAccepts = {
{{#produces}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/produces}} {{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}}
}; };
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { final String[] localVarContentTypes = {
{{#consumes}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/consumes}} {{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}}
}; };
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { {{#authMethods}}"{{name}}"{{#hasMore}}, {{/hasMore}}{{/authMethods}} }; String[] localVarAuthNames = new String[] { {{#authMethods}}"{{name}}"{{^-last}}, {{/-last}}{{/authMethods}} };
{{#returnType}} {{#returnType}}
GenericType<{{{returnType}}}> localVarReturnType = new GenericType<{{{returnType}}}>() {}; GenericType<{{{returnType}}}> localVarReturnType = new GenericType<{{{returnType}}}>() {};

View File

@ -14,7 +14,7 @@ Method | HTTP request | Description
## {{operationId}} ## {{operationId}}
> {{#returnType}}{{returnType}} {{/returnType}}{{operationId}}({{#allParams}}{{{paramName}}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) > {{#returnType}}{{returnType}} {{/returnType}}{{operationId}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}})
{{summary}}{{#notes}} {{summary}}{{#notes}}
@ -60,7 +60,7 @@ public class Example {
{{{dataType}}} {{{paramName}}} = {{{example}}}; // {{{dataType}}} | {{{description}}} {{{dataType}}} {{{paramName}}} = {{{example}}}; // {{{dataType}}} | {{{description}}}
{{/allParams}} {{/allParams}}
try { try {
{{#returnType}}{{{returnType}}} result = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{{paramName}}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{#returnType}} {{#returnType}}{{{returnType}}} result = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}});{{#returnType}}
System.out.println(result);{{/returnType}} System.out.println(result);{{/returnType}}
} catch (ApiException e) { } catch (ApiException e) {
System.err.println("Exception when calling {{{classname}}}#{{{operationId}}}"); System.err.println("Exception when calling {{{classname}}}#{{{operationId}}}");
@ -91,8 +91,8 @@ Name | Type | Description | Notes
### HTTP request headers ### HTTP request headers
- **Content-Type**: {{#consumes}}{{{mediaType}}}{{#hasMore}}, {{/hasMore}}{{/consumes}}{{^consumes}}Not defined{{/consumes}} - **Content-Type**: {{#consumes}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/consumes}}{{^consumes}}Not defined{{/consumes}}
- **Accept**: {{#produces}}{{{mediaType}}}{{#hasMore}}, {{/hasMore}}{{/produces}}{{^produces}}Not defined{{/produces}} - **Accept**: {{#produces}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/produces}}{{^produces}}Not defined{{/produces}}
{{#responses.0}} {{#responses.0}}
### HTTP response details ### HTTP response details

View File

@ -42,7 +42,7 @@ public class {{classname}}Test {
//{{#allParams}} //{{#allParams}}
//{{{dataType}}} {{paramName}} = null; //{{{dataType}}} {{paramName}} = null;
//{{/allParams}} //{{/allParams}}
//{{#returnType}}{{{returnType}}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); //{{#returnType}}{{{returnType}}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});
// TODO: test validations // TODO: test validations
} }

View File

@ -75,7 +75,7 @@ public class ApiClient {
auth = new ApiKeyAuth({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{#isKeyInQuery}}"query"{{/isKeyInQuery}}{{#isKeyInCookie}}"cookie"{{/isKeyInCookie}}, "{{keyParamName}}"); auth = new ApiKeyAuth({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{#isKeyInQuery}}"query"{{/isKeyInQuery}}{{#isKeyInCookie}}"cookie"{{/isKeyInCookie}}, "{{keyParamName}}");
{{/isApiKey}} {{/isApiKey}}
{{#isOAuth}} {{#isOAuth}}
auth = new OAuth(OAuthFlow.{{flow}}, "{{authorizationUrl}}", "{{tokenUrl}}", "{{#scopes}}{{scope}}{{#hasMore}}, {{/hasMore}}{{/scopes}}"); auth = new OAuth(OAuthFlow.{{flow}}, "{{authorizationUrl}}", "{{tokenUrl}}", "{{#scopes}}{{scope}}{{^-last}}, {{/-last}}{{/scopes}}");
{{/isOAuth}} {{/isOAuth}}
} else {{/authMethods}}{ } else {{/authMethods}}{
throw new RuntimeException("auth name \"" + authName + "\" not found in available auth names"); throw new RuntimeException("auth name \"" + authName + "\" not found in available auth names");

View File

@ -38,6 +38,6 @@ It's recommended to create an instance of `ApiClient` per thread in a multithrea
## Author ## Author
{{#apiInfo}}{{#apis}}{{^hasMore}}{{infoEmail}} {{#apiInfo}}{{#apis}}{{#-last}}{{infoEmail}}
{{/hasMore}}{{/apis}}{{/apiInfo}} {{/-last}}{{/apis}}{{/apiInfo}}

View File

@ -35,14 +35,14 @@ public interface {{classname}} extends ApiClient.Api {
* @see <a href="{{url}}">{{summary}} Documentation</a> * @see <a href="{{url}}">{{summary}} Documentation</a>
{{/externalDocs}} {{/externalDocs}}
*/ */
@RequestLine("{{httpMethod}} {{{path}}}{{#hasQueryParams}}?{{/hasQueryParams}}{{#queryParams}}{{baseName}}={{=<% %>=}}{<%paramName%>}<%={{ }}=%>{{#hasMore}}&{{/hasMore}}{{/queryParams}}") @RequestLine("{{httpMethod}} {{{path}}}{{#hasQueryParams}}?{{/hasQueryParams}}{{#queryParams}}{{baseName}}={{=<% %>=}}{<%paramName%>}<%={{ }}=%>{{^-last}}&{{/-last}}{{/queryParams}}")
@Headers({ @Headers({
{{#vendorExtensions.x-contentType}} "Content-Type: {{vendorExtensions.x-contentType}}", {{#vendorExtensions.x-contentType}} "Content-Type: {{vendorExtensions.x-contentType}}",
{{/vendorExtensions.x-contentType}} "Accept: {{vendorExtensions.x-accepts}}",{{#headerParams}} {{/vendorExtensions.x-contentType}} "Accept: {{vendorExtensions.x-accepts}}",{{#headerParams}}
"{{baseName}}: {{=<% %>=}}{<%paramName%>}<%={{ }}=%>"{{#hasMore}}, "{{baseName}}: {{=<% %>=}}{<%paramName%>}<%={{ }}=%>"{{^-last}},
{{/hasMore}}{{/headerParams}} {{/-last}}{{/headerParams}}
}) })
{{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{nickname}}({{#allParams}}{{^isBodyParam}}{{^legacyDates}}@Param("{{paramName}}") {{/legacyDates}}{{#legacyDates}}@Param(value="{{baseName}}", expander=ParamExpander.class) {{/legacyDates}}{{/isBodyParam}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{nickname}}({{#allParams}}{{^isBodyParam}}{{^legacyDates}}@Param("{{paramName}}") {{/legacyDates}}{{#legacyDates}}@Param(value="{{baseName}}", expander=ParamExpander.class) {{/legacyDates}}{{/isBodyParam}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}});
{{#hasQueryParams}} {{#hasQueryParams}}
/** /**
@ -73,12 +73,12 @@ public interface {{classname}} extends ApiClient.Api {
* @see <a href="{{url}}">{{summary}} Documentation</a> * @see <a href="{{url}}">{{summary}} Documentation</a>
{{/externalDocs}} {{/externalDocs}}
*/ */
@RequestLine("{{httpMethod}} {{{path}}}?{{#queryParams}}{{baseName}}={{=<% %>=}}{<%paramName%>}<%={{ }}=%>{{#hasMore}}&{{/hasMore}}{{/queryParams}}") @RequestLine("{{httpMethod}} {{{path}}}?{{#queryParams}}{{baseName}}={{=<% %>=}}{<%paramName%>}<%={{ }}=%>{{^-last}}&{{/-last}}{{/queryParams}}")
@Headers({ @Headers({
{{#vendorExtensions.x-contentType}} "Content-Type: {{vendorExtensions.x-contentType}}", {{#vendorExtensions.x-contentType}} "Content-Type: {{vendorExtensions.x-contentType}}",
{{/vendorExtensions.x-contentType}} "Accept: {{vendorExtensions.x-accepts}}",{{#headerParams}} {{/vendorExtensions.x-contentType}} "Accept: {{vendorExtensions.x-accepts}}",{{#headerParams}}
"{{baseName}}: {{=<% %>=}}{<%paramName%>}<%={{ }}=%>"{{#hasMore}}, "{{baseName}}: {{=<% %>=}}{<%paramName%>}<%={{ }}=%>"{{^-last}},
{{/hasMore}}{{/headerParams}} {{/-last}}{{/headerParams}}
}) })
{{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{nickname}}({{#allParams}}{{^isQueryParam}}{{^isBodyParam}}{{^legacyDates}}@Param("{{paramName}}") {{/legacyDates}}{{#legacyDates}}@Param(value="{{baseName}}", expander=ParamExpander.class) {{/legacyDates}}{{/isBodyParam}}{{{dataType}}} {{paramName}}, {{/isQueryParam}}{{/allParams}}@QueryMap(encoded=true) Map<String, Object> queryParams); {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{nickname}}({{#allParams}}{{^isQueryParam}}{{^isBodyParam}}{{^legacyDates}}@Param("{{paramName}}") {{/legacyDates}}{{#legacyDates}}@Param(value="{{baseName}}", expander=ParamExpander.class) {{/legacyDates}}{{/isBodyParam}}{{{dataType}}} {{paramName}}, {{/isQueryParam}}{{/allParams}}@QueryMap(encoded=true) Map<String, Object> queryParams);

View File

@ -36,7 +36,7 @@ public class {{classname}}Test {
{{#allParams}} {{#allParams}}
{{{dataType}}} {{paramName}} = null; {{{dataType}}} {{paramName}} = null;
{{/allParams}} {{/allParams}}
// {{#returnType}}{{{returnType}}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); // {{#returnType}}{{{returnType}}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});
// TODO: test validations // TODO: test validations
} }
@ -59,7 +59,7 @@ public class {{classname}}Test {
{{/allParams}} {{/allParams}}
{{classname}}.{{operationIdCamelCase}}QueryParams queryParams = new {{classname}}.{{operationIdCamelCase}}QueryParams() {{classname}}.{{operationIdCamelCase}}QueryParams queryParams = new {{classname}}.{{operationIdCamelCase}}QueryParams()
{{#queryParams}} {{#queryParams}}
.{{paramName}}(null){{^hasMore}};{{/hasMore}} .{{paramName}}(null){{#-last}};{{/-last}}
{{/queryParams}} {{/queryParams}}
// {{#returnType}}{{{returnType}}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{^isQueryParam}}{{paramName}}, {{/isQueryParam}}{{/allParams}}queryParams); // {{#returnType}}{{{returnType}}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{^isQueryParam}}{{paramName}}, {{/isQueryParam}}{{/allParams}}queryParams);

View File

@ -56,8 +56,8 @@ public class {{classname}} {
{{/externalDocs}} {{/externalDocs}}
**/ **/
public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws IOException { public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws IOException {
{{#returnType}}HttpResponse response = {{/returnType}}{{operationId}}ForHttpResponse({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{#returnType}} {{#returnType}}HttpResponse response = {{/returnType}}{{operationId}}ForHttpResponse({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{#returnType}}
TypeReference<{{{returnType}}}> typeRef = new TypeReference<{{{returnType}}}>() {}; TypeReference<{{{returnType}}}> typeRef = new TypeReference<{{{returnType}}}>() {};
return apiClient.getObjectMapper().readValue(response.getContent(), typeRef);{{/returnType}} return apiClient.getObjectMapper().readValue(response.getContent(), typeRef);{{/returnType}}
} }
@ -75,13 +75,13 @@ public class {{classname}} {
{{/externalDocs}} {{/externalDocs}}
**/ **/
public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#bodyParam}}{{^required}}{{{dataType}}} {{paramName}}, {{/required}}{{/bodyParam}}{{#requiredParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/requiredParams}}{{#hasRequiredParams}}, {{/hasRequiredParams}}Map<String, Object> params) throws IOException { public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#bodyParam}}{{^required}}{{{dataType}}} {{paramName}}, {{/required}}{{/bodyParam}}{{#requiredParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/requiredParams}}{{#hasRequiredParams}}, {{/hasRequiredParams}}Map<String, Object> params) throws IOException {
{{#returnType}}HttpResponse response = {{/returnType}}{{operationId}}ForHttpResponse({{#bodyParam}}{{^required}}{{paramName}}, {{/required}}{{/bodyParam}}{{#requiredParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/requiredParams}}{{#hasRequiredParams}}, {{/hasRequiredParams}}params);{{#returnType}} {{#returnType}}HttpResponse response = {{/returnType}}{{operationId}}ForHttpResponse({{#bodyParam}}{{^required}}{{paramName}}, {{/required}}{{/bodyParam}}{{#requiredParams}}{{paramName}}{{^-last}}, {{/-last}}{{/requiredParams}}{{#hasRequiredParams}}, {{/hasRequiredParams}}params);{{#returnType}}
TypeReference<{{{returnType}}}> typeRef = new TypeReference<{{{returnType}}}>() {}; TypeReference<{{{returnType}}}> typeRef = new TypeReference<{{{returnType}}}>() {};
return apiClient.getObjectMapper().readValue(response.getContent(), typeRef);{{/returnType}} return apiClient.getObjectMapper().readValue(response.getContent(), typeRef);{{/returnType}}
} }
public HttpResponse {{operationId}}ForHttpResponse({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws IOException { public HttpResponse {{operationId}}ForHttpResponse({{#allParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws IOException {
{{#allParams}}{{#required}}// verify the required parameter '{{paramName}}' is set {{#allParams}}{{#required}}// verify the required parameter '{{paramName}}' is set
if ({{paramName}} == null) { if ({{paramName}} == null) {
throw new IllegalArgumentException("Missing the required parameter '{{paramName}}' when calling {{operationId}}"); throw new IllegalArgumentException("Missing the required parameter '{{paramName}}' when calling {{operationId}}");
@ -112,7 +112,7 @@ public class {{classname}} {
return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.{{httpMethod}}, genericUrl, content).execute(); return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.{{httpMethod}}, genericUrl, content).execute();
}{{#bodyParam}} }{{#bodyParam}}
public HttpResponse {{operationId}}ForHttpResponse({{#allParams}}{{#isBodyParam}}java.io.InputStream {{paramName}}{{/isBodyParam}}{{^isBodyParam}}{{{dataType}}} {{paramName}}{{/isBodyParam}}{{#hasMore}}, {{/hasMore}}{{/allParams}}, String mediaType) throws IOException { public HttpResponse {{operationId}}ForHttpResponse({{#allParams}}{{#isBodyParam}}java.io.InputStream {{paramName}}{{/isBodyParam}}{{^isBodyParam}}{{{dataType}}} {{paramName}}{{/isBodyParam}}{{^-last}}, {{/-last}}{{/allParams}}, String mediaType) throws IOException {
{{#allParams}}{{#required}}// verify the required parameter '{{paramName}}' is set {{#allParams}}{{#required}}// verify the required parameter '{{paramName}}' is set
if ({{paramName}} == null) { if ({{paramName}} == null) {
throw new IllegalArgumentException("Missing the required parameter '{{paramName}}' when calling {{operationId}}"); throw new IllegalArgumentException("Missing the required parameter '{{paramName}}' when calling {{operationId}}");
@ -145,7 +145,7 @@ public class {{classname}} {
return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.{{httpMethod}}, genericUrl, content).execute(); return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.{{httpMethod}}, genericUrl, content).execute();
}{{/bodyParam}} }{{/bodyParam}}
public HttpResponse {{operationId}}ForHttpResponse({{#bodyParam}}{{^required}}{{{dataType}}} {{paramName}}, {{/required}}{{/bodyParam}}{{#requiredParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/requiredParams}}{{#hasRequiredParams}}, {{/hasRequiredParams}}Map<String, Object> params) throws IOException { public HttpResponse {{operationId}}ForHttpResponse({{#bodyParam}}{{^required}}{{{dataType}}} {{paramName}}, {{/required}}{{/bodyParam}}{{#requiredParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/requiredParams}}{{#hasRequiredParams}}, {{/hasRequiredParams}}Map<String, Object> params) throws IOException {
{{#allParams}}{{#required}}// verify the required parameter '{{paramName}}' is set {{#allParams}}{{#required}}// verify the required parameter '{{paramName}}' is set
if ({{paramName}} == null) { if ({{paramName}} == null) {
throw new IllegalArgumentException("Missing the required parameter '{{paramName}}' when calling {{operationId}}"); throw new IllegalArgumentException("Missing the required parameter '{{paramName}}' when calling {{operationId}}");

View File

@ -37,7 +37,7 @@ public class {{classname}}Test {
{{#allParams}} {{#allParams}}
{{{dataType}}} {{paramName}} = null; {{{dataType}}} {{paramName}} = null;
{{/allParams}} {{/allParams}}
{{#returnType}}{{{returnType}}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); {{#returnType}}{{{returnType}}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});
// TODO: test validations // TODO: test validations
} }

View File

@ -81,8 +81,8 @@ public class {{classname}} {
{{#isDeprecated}} {{#isDeprecated}}
@Deprecated @Deprecated
{{/isDeprecated}} {{/isDeprecated}}
public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws ApiException { public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException {
{{#returnType}}return {{/returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}){{#returnType}}.getData(){{/returnType}}; {{#returnType}}return {{/returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}){{#returnType}}.getData(){{/returnType}};
} }
{{/vendorExtensions.x-group-parameters}} {{/vendorExtensions.x-group-parameters}}
@ -115,7 +115,7 @@ public class {{classname}} {
{{#isDeprecated}} {{#isDeprecated}}
@Deprecated @Deprecated
{{/isDeprecated}} {{/isDeprecated}}
public{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}private{{/vendorExtensions.x-group-parameters}} ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws ApiException { public{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}private{{/vendorExtensions.x-group-parameters}} ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException {
Object localVarPostBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}}; Object localVarPostBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}};
{{#allParams}}{{#required}} {{#allParams}}{{#required}}
// verify the required parameter '{{paramName}}' is set // verify the required parameter '{{paramName}}' is set
@ -150,16 +150,16 @@ public class {{classname}} {
{{/formParams}} {{/formParams}}
final String[] localVarAccepts = { final String[] localVarAccepts = {
{{#produces}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/produces}} {{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}}
}; };
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { final String[] localVarContentTypes = {
{{#consumes}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/consumes}} {{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}}
}; };
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { {{#authMethods}}"{{name}}"{{#hasMore}}, {{/hasMore}}{{/authMethods}} }; String[] localVarAuthNames = new String[] { {{#authMethods}}"{{name}}"{{^-last}}, {{/-last}}{{/authMethods}} };
{{#returnType}} {{#returnType}}
GenericType<{{{returnType}}}> localVarReturnType = new GenericType<{{{returnType}}}>() {}; GenericType<{{{returnType}}}> localVarReturnType = new GenericType<{{{returnType}}}>() {};
@ -176,7 +176,7 @@ public class {{classname}} {
private {{#isRequired}}final {{/isRequired}}{{{dataType}}} {{paramName}}; private {{#isRequired}}final {{/isRequired}}{{{dataType}}} {{paramName}};
{{/allParams}} {{/allParams}}
private API{{operationId}}Request({{#pathParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/pathParams}}) { private API{{operationId}}Request({{#pathParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/pathParams}}) {
{{#pathParams}} {{#pathParams}}
this.{{paramName}} = {{paramName}}; this.{{paramName}} = {{paramName}};
{{/pathParams}} {{/pathParams}}
@ -236,7 +236,7 @@ public class {{classname}} {
@Deprecated @Deprecated
{{/isDeprecated}} {{/isDeprecated}}
public ApiResponse<{{#returnType}}{{{.}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> executeWithHttpInfo() throws ApiException { public ApiResponse<{{#returnType}}{{{.}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> executeWithHttpInfo() throws ApiException {
return {{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); return {{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});
} }
} }
@ -253,8 +253,8 @@ public class {{classname}} {
{{#isDeprecated}} {{#isDeprecated}}
@Deprecated @Deprecated
{{/isDeprecated}} {{/isDeprecated}}
public API{{operationId}}Request {{operationId}}({{#pathParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/pathParams}}) throws ApiException { public API{{operationId}}Request {{operationId}}({{#pathParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/pathParams}}) throws ApiException {
return new API{{operationId}}Request({{#pathParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/pathParams}}); return new API{{operationId}}Request({{#pathParams}}{{paramName}}{{^-last}}, {{/-last}}{{/pathParams}});
} }
{{/vendorExtensions.x-group-parameters}} {{/vendorExtensions.x-group-parameters}}
{{/operation}} {{/operation}}

View File

@ -15,10 +15,10 @@ Method | HTTP request | Description
## {{operationId}} ## {{operationId}}
{{^vendorExtensions.x-group-parameters}} {{^vendorExtensions.x-group-parameters}}
> {{#returnType}}{{returnType}} {{/returnType}}{{operationId}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) > {{#returnType}}{{returnType}} {{/returnType}}{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}})
{{/vendorExtensions.x-group-parameters}} {{/vendorExtensions.x-group-parameters}}
{{#vendorExtensions.x-group-parameters}} {{#vendorExtensions.x-group-parameters}}
> {{#returnType}}{{returnType}} {{/returnType}}{{operationId}}({{#pathParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/pathParams}}){{#allParams}}{{^isPathParam}}.{{paramName}}({{paramName}}){{/isPathParam}}{{/allParams}}.execute(); > {{#returnType}}{{returnType}} {{/returnType}}{{operationId}}({{#pathParams}}{{paramName}}{{^-last}}, {{/-last}}{{/pathParams}}){{#allParams}}{{^isPathParam}}.{{paramName}}({{paramName}}){{/isPathParam}}{{/allParams}}.execute();
{{/vendorExtensions.x-group-parameters}} {{/vendorExtensions.x-group-parameters}}
{{summary}}{{#notes}} {{summary}}{{#notes}}
@ -66,10 +66,10 @@ public class Example {
{{/allParams}} {{/allParams}}
try { try {
{{^vendorExtensions.x-group-parameters}} {{^vendorExtensions.x-group-parameters}}
{{#returnType}}{{{returnType}}} result = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{{paramName}}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); {{#returnType}}{{{returnType}}} result = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}});
{{/vendorExtensions.x-group-parameters}} {{/vendorExtensions.x-group-parameters}}
{{#vendorExtensions.x-group-parameters}} {{#vendorExtensions.x-group-parameters}}
{{#returnType}}{{{returnType}}} result = {{/returnType}}api.{{operationId}}({{#pathParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/pathParams}}){{#allParams}}{{^isPathParam}} {{#returnType}}{{{returnType}}} result = {{/returnType}}api.{{operationId}}({{#pathParams}}{{paramName}}{{^-last}}, {{/-last}}{{/pathParams}}){{#allParams}}{{^isPathParam}}
.{{paramName}}({{paramName}}){{/isPathParam}}{{/allParams}} .{{paramName}}({{paramName}}){{/isPathParam}}{{/allParams}}
.execute(); .execute();
{{/vendorExtensions.x-group-parameters}} {{/vendorExtensions.x-group-parameters}}
@ -105,8 +105,8 @@ Name | Type | Description | Notes
### HTTP request headers ### HTTP request headers
- **Content-Type**: {{#consumes}}{{{mediaType}}}{{#hasMore}}, {{/hasMore}}{{/consumes}}{{^consumes}}Not defined{{/consumes}} - **Content-Type**: {{#consumes}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/consumes}}{{^consumes}}Not defined{{/consumes}}
- **Accept**: {{#produces}}{{{mediaType}}}{{#hasMore}}, {{/hasMore}}{{/produces}}{{^produces}}Not defined{{/produces}} - **Accept**: {{#produces}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/produces}}{{^produces}}Not defined{{/produces}}
{{#responses.0}} {{#responses.0}}
### HTTP response details ### HTTP response details

View File

@ -41,10 +41,10 @@ public class {{classname}}Test {
//{{{dataType}}} {{paramName}} = null; //{{{dataType}}} {{paramName}} = null;
{{/allParams}} {{/allParams}}
{{^vendorExtensions.x-group-parameters}} {{^vendorExtensions.x-group-parameters}}
//{{#returnType}}{{{returnType}}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); //{{#returnType}}{{{returnType}}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});
{{/vendorExtensions.x-group-parameters}} {{/vendorExtensions.x-group-parameters}}
{{#vendorExtensions.x-group-parameters}} {{#vendorExtensions.x-group-parameters}}
//{{#returnType}}{{{returnType}}} response = {{/returnType}}api.{{operationId}}({{#pathParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/pathParams}}){{#allParams}}{{^isPathParam}} //{{#returnType}}{{{returnType}}} response = {{/returnType}}api.{{operationId}}({{#pathParams}}{{paramName}}{{^-last}}, {{/-last}}{{/pathParams}}){{#allParams}}{{^isPathParam}}
// .{{paramName}}({{paramName}}){{/isPathParam}}{{/allParams}} // .{{paramName}}({{paramName}}){{/isPathParam}}{{/allParams}}
// .execute(); // .execute();
{{/vendorExtensions.x-group-parameters}} {{/vendorExtensions.x-group-parameters}}

View File

@ -268,8 +268,8 @@ public class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{{#vendorE
return false; return false;
}{{#hasVars}} }{{#hasVars}}
{{classname}} {{classVarName}} = ({{classname}}) o; {{classname}} {{classVarName}} = ({{classname}}) o;
return {{#vars}}{{#isByteArray}}Arrays{{/isByteArray}}{{^isByteArray}}Objects{{/isByteArray}}.equals(this.{{name}}, {{classVarName}}.{{name}}){{#hasMore}} && return {{#vars}}{{#isByteArray}}Arrays{{/isByteArray}}{{^isByteArray}}Objects{{/isByteArray}}.equals(this.{{name}}, {{classVarName}}.{{name}}){{^-last}} &&
{{/hasMore}}{{/vars}}{{#additionalPropertiesType}}&& {{/-last}}{{/vars}}{{#additionalPropertiesType}}&&
Objects.equals(this.additionalProperties, {{classVarName}}.additionalProperties){{/additionalPropertiesType}}{{#parent}} && Objects.equals(this.additionalProperties, {{classVarName}}.additionalProperties){{/additionalPropertiesType}}{{#parent}} &&
super.equals(o){{/parent}};{{/hasVars}}{{^hasVars}} super.equals(o){{/parent}};{{/hasVars}}{{^hasVars}}
return {{#parent}}super.equals(o){{/parent}}{{^parent}}true{{/parent}};{{/hasVars}} return {{#parent}}super.equals(o){{/parent}}{{^parent}}true{{/parent}};{{/hasVars}}
@ -282,7 +282,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{{#vendorE
return HashCodeBuilder.reflectionHashCode(this); return HashCodeBuilder.reflectionHashCode(this);
{{/useReflectionEqualsHashCode}} {{/useReflectionEqualsHashCode}}
{{^useReflectionEqualsHashCode}} {{^useReflectionEqualsHashCode}}
return Objects.hash({{#vars}}{{^isByteArray}}{{name}}{{/isByteArray}}{{#isByteArray}}Arrays.hashCode({{name}}){{/isByteArray}}{{#hasMore}}, {{/hasMore}}{{/vars}}{{#parent}}{{#hasVars}}, {{/hasVars}}super.hashCode(){{/parent}}{{#additionalPropertiesType}}, additionalProperties{{/additionalPropertiesType}}); return Objects.hash({{#vars}}{{^isByteArray}}{{name}}{{/isByteArray}}{{#isByteArray}}Arrays.hashCode({{name}}){{/isByteArray}}{{^-last}}, {{/-last}}{{/vars}}{{#parent}}{{#hasVars}}, {{/hasVars}}super.hashCode(){{/parent}}{{#additionalPropertiesType}}, additionalProperties{{/additionalPropertiesType}});
{{/useReflectionEqualsHashCode}} {{/useReflectionEqualsHashCode}}
} }
@ -297,15 +297,15 @@ public class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{{#vendorE
return false; return false;
}{{#hasVars}} }{{#hasVars}}
{{classname}} {{classVarName}} = ({{classname}}) o; {{classname}} {{classVarName}} = ({{classname}}) o;
return {{#vars}}ObjectUtils.equals(this.{{name}}, {{classVarName}}.{{name}}){{#hasMore}} && return {{#vars}}ObjectUtils.equals(this.{{name}}, {{classVarName}}.{{name}}){{^-last}} &&
{{/hasMore}}{{/vars}}{{#parent}} && {{/-last}}{{/vars}}{{#parent}} &&
super.equals(o){{/parent}};{{/hasVars}}{{^hasVars}} super.equals(o){{/parent}};{{/hasVars}}{{^hasVars}}
return true;{{/hasVars}} return true;{{/hasVars}}
} }
@Override @Override
public int hashCode() { public int hashCode() {
return ObjectUtils.hashCodeMulti({{#vars}}{{name}}{{#hasMore}}, {{/hasMore}}{{/vars}}{{#parent}}{{#hasVars}}, {{/hasVars}}super.hashCode(){{/parent}}); return ObjectUtils.hashCodeMulti({{#vars}}{{name}}{{^-last}}, {{/-last}}{{/vars}}{{#parent}}{{#hasVars}}, {{/hasVars}}super.hashCode(){{/parent}});
} }
{{/supportJava6}} {{/supportJava6}}

View File

@ -49,12 +49,12 @@ public interface {{classname}} {
@{{httpMethod}} @{{httpMethod}}
{{#subresourceOperation}}@Path("{{{path}}}"){{/subresourceOperation}} {{#subresourceOperation}}@Path("{{{path}}}"){{/subresourceOperation}}
{{#hasConsumes}} {{#hasConsumes}}
@Consumes({ {{#consumes}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/consumes}} }) @Consumes({ {{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}} })
{{/hasConsumes}} {{/hasConsumes}}
{{#hasProduces}} {{#hasProduces}}
@Produces({ {{#produces}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/produces}} }) @Produces({ {{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}} })
{{/hasProduces}} {{/hasProduces}}
public {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}} {{nickname}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws ApiException, ProcessingException; public {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}} {{nickname}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException, ProcessingException;
{{/operation}} {{/operation}}
} }
{{/operations}} {{/operations}}

View File

@ -66,7 +66,7 @@ public class {{classname}}Test {
{{#allParams}} {{#allParams}}
{{^isFile}}{{{dataType}}} {{paramName}} = null;{{/isFile}}{{#isFile}}org.apache.cxf.jaxrs.ext.multipart.Attachment {{paramName}} = null;{{/isFile}} {{^isFile}}{{{dataType}}} {{paramName}} = null;{{/isFile}}{{#isFile}}org.apache.cxf.jaxrs.ext.multipart.Attachment {{paramName}} = null;{{/isFile}}
{{/allParams}} {{/allParams}}
//{{#returnType}}{{{returnType}}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); //{{#returnType}}{{{returnType}}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});
//{{#returnType}}assertNotNull(response);{{/returnType}} //{{#returnType}}assertNotNull(response);{{/returnType}}

View File

@ -99,7 +99,7 @@ public class {{{classname}}}Example {
{{/allParams}} {{/allParams}}
try { try {
{{^vendorExtensions.x-group-parameters}} {{^vendorExtensions.x-group-parameters}}
{{#returnType}}{{#asyncNative}}CompletableFuture<{{{returnType}}}>{{/asyncNative}}{{^asyncNative}}{{{returnType}}}{{/asyncNative}} result = {{/returnType}}{{^returnType}}{{#asyncNative}}CompletableFuture<Void> result = {{/asyncNative}}{{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{{paramName}}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); {{#returnType}}{{#asyncNative}}CompletableFuture<{{{returnType}}}>{{/asyncNative}}{{^asyncNative}}{{{returnType}}}{{/asyncNative}} result = {{/returnType}}{{^returnType}}{{#asyncNative}}CompletableFuture<Void> result = {{/asyncNative}}{{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}});
{{/vendorExtensions.x-group-parameters}} {{/vendorExtensions.x-group-parameters}}
{{#vendorExtensions.x-group-parameters}} {{#vendorExtensions.x-group-parameters}}
{{#hasParams}} {{#hasParams}}
@ -174,5 +174,5 @@ However, the instances of the api clients created from the `ApiClient` are threa
## Author ## Author
{{#apiInfo}}{{#apis}}{{^hasMore}}{{infoEmail}} {{#apiInfo}}{{#apis}}{{#-last}}{{infoEmail}}
{{/hasMore}}{{/apis}}{{/apiInfo}} {{/-last}}{{/apis}}{{/apiInfo}}

View File

@ -91,7 +91,7 @@ public class {{classname}} {
{{#allParams}} {{#allParams}}
{{{dataType}}} {{paramName}} = apiRequest.{{paramName}}(); {{{dataType}}} {{paramName}} = apiRequest.{{paramName}}();
{{/allParams}} {{/allParams}}
{{#returnType}}return {{/returnType}}{{^returnType}}{{#asyncNative}}return {{/asyncNative}}{{/returnType}}{{operationId}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); {{#returnType}}return {{/returnType}}{{^returnType}}{{#asyncNative}}return {{/asyncNative}}{{/returnType}}{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});
} }
/** /**
@ -115,7 +115,7 @@ public class {{classname}} {
{{#allParams}} {{#allParams}}
{{{dataType}}} {{paramName}} = apiRequest.{{paramName}}(); {{{dataType}}} {{paramName}} = apiRequest.{{paramName}}();
{{/allParams}} {{/allParams}}
return {{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); return {{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});
} }
{{/hasParams}} {{/hasParams}}
@ -141,16 +141,16 @@ public class {{classname}} {
{{#isDeprecated}} {{#isDeprecated}}
@Deprecated @Deprecated
{{/isDeprecated}} {{/isDeprecated}}
public {{#returnType}}{{#asyncNative}}CompletableFuture<{{{returnType}}}>{{/asyncNative}}{{^asyncNative}}{{{returnType}}}{{/asyncNative}}{{/returnType}}{{^returnType}}{{#asyncNative}}CompletableFuture<Void>{{/asyncNative}}{{^asyncNative}}void{{/asyncNative}}{{/returnType}} {{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws ApiException { public {{#returnType}}{{#asyncNative}}CompletableFuture<{{{returnType}}}>{{/asyncNative}}{{^asyncNative}}{{{returnType}}}{{/asyncNative}}{{/returnType}}{{^returnType}}{{#asyncNative}}CompletableFuture<Void>{{/asyncNative}}{{^asyncNative}}void{{/asyncNative}}{{/returnType}} {{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException {
{{^asyncNative}} {{^asyncNative}}
{{#returnType}}ApiResponse<{{{returnType}}}> localVarResponse = {{/returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); {{#returnType}}ApiResponse<{{{returnType}}}> localVarResponse = {{/returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});
{{#returnType}} {{#returnType}}
return localVarResponse.getData(); return localVarResponse.getData();
{{/returnType}} {{/returnType}}
{{/asyncNative}} {{/asyncNative}}
{{#asyncNative}} {{#asyncNative}}
try { try {
HttpRequest.Builder localVarRequestBuilder = {{operationId}}RequestBuilder({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); HttpRequest.Builder localVarRequestBuilder = {{operationId}}RequestBuilder({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});
return memberVarHttpClient.sendAsync( return memberVarHttpClient.sendAsync(
localVarRequestBuilder.build(), localVarRequestBuilder.build(),
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> { HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
@ -196,9 +196,9 @@ public class {{classname}} {
{{#isDeprecated}} {{#isDeprecated}}
@Deprecated @Deprecated
{{/isDeprecated}} {{/isDeprecated}}
public {{#asyncNative}}CompletableFuture<{{/asyncNative}}ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}>{{#asyncNative}}>{{/asyncNative}} {{operationId}}WithHttpInfo({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws ApiException { public {{#asyncNative}}CompletableFuture<{{/asyncNative}}ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}>{{#asyncNative}}>{{/asyncNative}} {{operationId}}WithHttpInfo({{#allParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException {
{{^asyncNative}} {{^asyncNative}}
HttpRequest.Builder localVarRequestBuilder = {{operationId}}RequestBuilder({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); HttpRequest.Builder localVarRequestBuilder = {{operationId}}RequestBuilder({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});
try { try {
HttpResponse<InputStream> localVarResponse = memberVarHttpClient.send( HttpResponse<InputStream> localVarResponse = memberVarHttpClient.send(
localVarRequestBuilder.build(), localVarRequestBuilder.build(),
@ -227,7 +227,7 @@ public class {{classname}} {
{{/asyncNative}} {{/asyncNative}}
{{#asyncNative}} {{#asyncNative}}
try { try {
HttpRequest.Builder localVarRequestBuilder = {{operationId}}RequestBuilder({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); HttpRequest.Builder localVarRequestBuilder = {{operationId}}RequestBuilder({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});
return memberVarHttpClient.sendAsync( return memberVarHttpClient.sendAsync(
localVarRequestBuilder.build(), localVarRequestBuilder.build(),
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> { HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
@ -260,7 +260,7 @@ public class {{classname}} {
{{/asyncNative}} {{/asyncNative}}
} }
private HttpRequest.Builder {{operationId}}RequestBuilder({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws ApiException { private HttpRequest.Builder {{operationId}}RequestBuilder({{#allParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException {
{{#allParams}} {{#allParams}}
{{#required}} {{#required}}
// verify the required parameter '{{paramName}}' is set // verify the required parameter '{{paramName}}' is set

View File

@ -16,7 +16,7 @@ Method | HTTP request | Description
## {{operationId}} ## {{operationId}}
{{^vendorExtensions.x-group-parameters}} {{^vendorExtensions.x-group-parameters}}
> {{#returnType}}{{#asyncNative}}CompletableFuture<{{{returnType}}}>{{/asyncNative}}{{^asyncNative}}{{{returnType}}}{{/asyncNative}}{{/returnType}}{{^returnType}}{{#asyncNative}}CompletableFuture<Void>{{/asyncNative}}{{^asyncNative}}void{{/asyncNative}}{{/returnType}} {{operationId}}({{#allParams}}{{{paramName}}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) > {{#returnType}}{{#asyncNative}}CompletableFuture<{{{returnType}}}>{{/asyncNative}}{{^asyncNative}}{{{returnType}}}{{/asyncNative}}{{/returnType}}{{^returnType}}{{#asyncNative}}CompletableFuture<Void>{{/asyncNative}}{{^asyncNative}}void{{/asyncNative}}{{/returnType}} {{operationId}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}})
{{/vendorExtensions.x-group-parameters}} {{/vendorExtensions.x-group-parameters}}
{{#vendorExtensions.x-group-parameters}} {{#vendorExtensions.x-group-parameters}}
> {{#returnType}}{{#asyncNative}}CompletableFuture<{{{returnType}}}>{{/asyncNative}}{{^asyncNative}}{{{returnType}}}{{/asyncNative}}{{/returnType}}{{^returnType}}{{#asyncNative}}CompletableFuture<Void>{{/asyncNative}}{{^asyncNative}}void{{/asyncNative}}{{/returnType}} {{operationId}}({{#hasParams}}{{operationId}}Request{{/hasParams}}) > {{#returnType}}{{#asyncNative}}CompletableFuture<{{{returnType}}}>{{/asyncNative}}{{^asyncNative}}{{{returnType}}}{{/asyncNative}}{{/returnType}}{{^returnType}}{{#asyncNative}}CompletableFuture<Void>{{/asyncNative}}{{^asyncNative}}void{{/asyncNative}}{{/returnType}} {{operationId}}({{#hasParams}}{{operationId}}Request{{/hasParams}})
@ -71,7 +71,7 @@ public class Example {
{{/allParams}} {{/allParams}}
try { try {
{{^vendorExtensions.x-group-parameters}} {{^vendorExtensions.x-group-parameters}}
{{#returnType}}{{#asyncNative}}CompletableFuture<{{{returnType}}}>{{/asyncNative}}{{^asyncNative}}{{{returnType}}}{{/asyncNative}} result = {{/returnType}}{{^returnType}}{{#asyncNative}}CompletableFuture<Void> result = {{/asyncNative}}{{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{{paramName}}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); {{#returnType}}{{#asyncNative}}CompletableFuture<{{{returnType}}}>{{/asyncNative}}{{^asyncNative}}{{{returnType}}}{{/asyncNative}} result = {{/returnType}}{{^returnType}}{{#asyncNative}}CompletableFuture<Void> result = {{/asyncNative}}{{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}});
{{/vendorExtensions.x-group-parameters}} {{/vendorExtensions.x-group-parameters}}
{{#vendorExtensions.x-group-parameters}} {{#vendorExtensions.x-group-parameters}}
{{#hasParams}} {{#hasParams}}
@ -121,8 +121,8 @@ Name | Type | Description | Notes
### HTTP request headers ### HTTP request headers
- **Content-Type**: {{#consumes}}{{{mediaType}}}{{#hasMore}}, {{/hasMore}}{{/consumes}}{{^consumes}}Not defined{{/consumes}} - **Content-Type**: {{#consumes}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/consumes}}{{^consumes}}Not defined{{/consumes}}
- **Accept**: {{#produces}}{{{mediaType}}}{{#hasMore}}, {{/hasMore}}{{/produces}}{{^produces}}Not defined{{/produces}} - **Accept**: {{#produces}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/produces}}{{^produces}}Not defined{{/produces}}
{{#responses.0}} {{#responses.0}}
### HTTP response details ### HTTP response details
@ -136,7 +136,7 @@ Name | Type | Description | Notes
## {{operationId}}WithHttpInfo ## {{operationId}}WithHttpInfo
{{^vendorExtensions.x-group-parameters}} {{^vendorExtensions.x-group-parameters}}
> {{#asyncNative}}CompletableFuture<{{/asyncNative}}ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}>{{#asyncNative}}>{{/asyncNative}} {{operationId}} {{operationId}}WithHttpInfo({{#allParams}}{{{paramName}}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) > {{#asyncNative}}CompletableFuture<{{/asyncNative}}ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}>{{#asyncNative}}>{{/asyncNative}} {{operationId}} {{operationId}}WithHttpInfo({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}})
{{/vendorExtensions.x-group-parameters}} {{/vendorExtensions.x-group-parameters}}
{{#vendorExtensions.x-group-parameters}} {{#vendorExtensions.x-group-parameters}}
> {{#asyncNative}}CompletableFuture<{{/asyncNative}}ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}>{{#asyncNative}}>{{/asyncNative}} {{operationId}} {{operationId}}WithHttpInfo({{#hasParams}}{{operationId}}Request{{/hasParams}}) > {{#asyncNative}}CompletableFuture<{{/asyncNative}}ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}>{{#asyncNative}}>{{/asyncNative}} {{operationId}} {{operationId}}WithHttpInfo({{#hasParams}}{{operationId}}Request{{/hasParams}})
@ -192,7 +192,7 @@ public class Example {
{{/allParams}} {{/allParams}}
try { try {
{{^vendorExtensions.x-group-parameters}} {{^vendorExtensions.x-group-parameters}}
{{#asyncNative}}CompletableFuture<{{/asyncNative}}ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}>{{#asyncNative}}>{{/asyncNative}} response = apiInstance.{{{operationId}}}WithHttpInfo({{#allParams}}{{{paramName}}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); {{#asyncNative}}CompletableFuture<{{/asyncNative}}ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}>{{#asyncNative}}>{{/asyncNative}} response = apiInstance.{{{operationId}}}WithHttpInfo({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}});
{{/vendorExtensions.x-group-parameters}} {{/vendorExtensions.x-group-parameters}}
{{#vendorExtensions.x-group-parameters}} {{#vendorExtensions.x-group-parameters}}
{{#hasParams}} {{#hasParams}}
@ -253,8 +253,8 @@ Name | Type | Description | Notes
### HTTP request headers ### HTTP request headers
- **Content-Type**: {{#consumes}}{{{mediaType}}}{{#hasMore}}, {{/hasMore}}{{/consumes}}{{^consumes}}Not defined{{/consumes}} - **Content-Type**: {{#consumes}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/consumes}}{{^consumes}}Not defined{{/consumes}}
- **Accept**: {{#produces}}{{{mediaType}}}{{#hasMore}}, {{/hasMore}}{{/produces}}{{^produces}}Not defined{{/produces}} - **Accept**: {{#produces}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/produces}}{{^produces}}Not defined{{/produces}}
{{#responses.0}} {{#responses.0}}
### HTTP response details ### HTTP response details

View File

@ -43,7 +43,7 @@ public class {{classname}}Test {
{{/allParams}} {{/allParams}}
{{^vendorExtensions.x-group-parameters}} {{^vendorExtensions.x-group-parameters}}
{{#returnType}}{{#asyncNative}}CompletableFuture<{{{returnType}}}>{{/asyncNative}}{{^asyncNative}}{{{returnType}}}{{/asyncNative}} response = {{/returnType}} {{#returnType}}{{#asyncNative}}CompletableFuture<{{{returnType}}}>{{/asyncNative}}{{^asyncNative}}{{{returnType}}}{{/asyncNative}} response = {{/returnType}}
{{^returnType}}{{#asyncNative}}CompletableFuture<Void> response = {{/asyncNative}}{{/returnType}}api.{{operationId}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); {{^returnType}}{{#asyncNative}}CompletableFuture<Void> response = {{/asyncNative}}{{/returnType}}api.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});
{{/vendorExtensions.x-group-parameters}} {{/vendorExtensions.x-group-parameters}}
{{#vendorExtensions.x-group-parameters}}{{#hasParams}} {{#vendorExtensions.x-group-parameters}}{{#hasParams}}
{{classname}}.API{{operationId}}Request request = {{classname}}.API{{operationId}}Request.newBuilder(){{#allParams}} {{classname}}.API{{operationId}}Request request = {{classname}}.API{{operationId}}Request.newBuilder(){{#allParams}}

View File

@ -267,8 +267,8 @@ public class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{{#vendorE
return false; return false;
}{{#hasVars}} }{{#hasVars}}
{{classname}} {{classVarName}} = ({{classname}}) o; {{classname}} {{classVarName}} = ({{classname}}) o;
return {{#vars}}{{#isByteArray}}Arrays{{/isByteArray}}{{^isByteArray}}Objects{{/isByteArray}}.equals(this.{{name}}, {{classVarName}}.{{name}}){{#hasMore}} && return {{#vars}}{{#isByteArray}}Arrays{{/isByteArray}}{{^isByteArray}}Objects{{/isByteArray}}.equals(this.{{name}}, {{classVarName}}.{{name}}){{^-last}} &&
{{/hasMore}}{{/vars}}{{#additionalPropertiesType}}&& {{/-last}}{{/vars}}{{#additionalPropertiesType}}&&
Objects.equals(this.additionalProperties, {{classVarName}}.additionalProperties){{/additionalPropertiesType}}{{#parent}} && Objects.equals(this.additionalProperties, {{classVarName}}.additionalProperties){{/additionalPropertiesType}}{{#parent}} &&
super.equals(o){{/parent}};{{/hasVars}}{{^hasVars}} super.equals(o){{/parent}};{{/hasVars}}{{^hasVars}}
return {{#parent}}super.equals(o){{/parent}}{{^parent}}true{{/parent}};{{/hasVars}} return {{#parent}}super.equals(o){{/parent}}{{^parent}}true{{/parent}};{{/hasVars}}
@ -281,7 +281,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{{#vendorE
return HashCodeBuilder.reflectionHashCode(this); return HashCodeBuilder.reflectionHashCode(this);
{{/useReflectionEqualsHashCode}} {{/useReflectionEqualsHashCode}}
{{^useReflectionEqualsHashCode}} {{^useReflectionEqualsHashCode}}
return Objects.hash({{#vars}}{{^isByteArray}}{{name}}{{/isByteArray}}{{#isByteArray}}Arrays.hashCode({{name}}){{/isByteArray}}{{#hasMore}}, {{/hasMore}}{{/vars}}{{#parent}}{{#hasVars}}, {{/hasVars}}super.hashCode(){{/parent}}{{#additionalPropertiesType}}, additionalProperties{{/additionalPropertiesType}}); return Objects.hash({{#vars}}{{^isByteArray}}{{name}}{{/isByteArray}}{{#isByteArray}}Arrays.hashCode({{name}}){{/isByteArray}}{{^-last}}, {{/-last}}{{/vars}}{{#parent}}{{#hasVars}}, {{/hasVars}}super.hashCode(){{/parent}}{{#additionalPropertiesType}}, additionalProperties{{/additionalPropertiesType}});
{{/useReflectionEqualsHashCode}} {{/useReflectionEqualsHashCode}}
} }

View File

@ -114,7 +114,7 @@ public class Example {
{{{dataType}}} {{{paramName}}} = {{{example}}}; // {{{dataType}}} | {{{description}}} {{{dataType}}} {{{paramName}}} = {{{example}}}; // {{{dataType}}} | {{{description}}}
{{/allParams}} {{/allParams}}
try { try {
{{#returnType}}{{{returnType}}} result = {{/returnType}}apiInstance.{{{operationId}}}{{^vendorExtensions.x-group-parameters}}({{#allParams}}{{{paramName}}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}({{#requiredParams}}{{{paramName}}}{{#hasMore}}, {{/hasMore}}{{/requiredParams}}){{#optionalParams}} {{#returnType}}{{{returnType}}} result = {{/returnType}}apiInstance.{{{operationId}}}{{^vendorExtensions.x-group-parameters}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}});{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}({{#requiredParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/requiredParams}}){{#optionalParams}}
.{{{paramName}}}({{{paramName}}}){{/optionalParams}} .{{{paramName}}}({{{paramName}}}){{/optionalParams}}
.execute();{{/vendorExtensions.x-group-parameters}}{{#returnType}} .execute();{{/vendorExtensions.x-group-parameters}}{{#returnType}}
System.out.println(result);{{/returnType}} System.out.println(result);{{/returnType}}
@ -172,5 +172,5 @@ It's recommended to create an instance of `ApiClient` per thread in a multithrea
## Author ## Author
{{#apiInfo}}{{#apis}}{{^hasMore}}{{infoEmail}} {{#apiInfo}}{{#apis}}{{#-last}}{{infoEmail}}
{{/hasMore}}{{/apis}}{{/apiInfo}} {{/-last}}{{/apis}}{{/apiInfo}}

View File

@ -126,7 +126,7 @@ public class {{classname}} {
{{/formParams}} {{/formParams}}
final String[] localVarAccepts = { final String[] localVarAccepts = {
{{#produces}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/produces}} {{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}}
}; };
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) { if (localVarAccept != null) {
@ -134,12 +134,12 @@ public class {{classname}} {
} }
final String[] localVarContentTypes = { final String[] localVarContentTypes = {
{{#consumes}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/consumes}} {{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}}
}; };
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType); localVarHeaderParams.put("Content-Type", localVarContentType);
String[] localVarAuthNames = new String[] { {{#authMethods}}"{{name}}"{{#hasMore}}, {{/hasMore}}{{/authMethods}} }; String[] localVarAuthNames = new String[] { {{#authMethods}}"{{name}}"{{^-last}}, {{/-last}}{{/authMethods}} };
return localVarApiClient.buildCall(localVarPath, "{{httpMethod}}", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); return localVarApiClient.buildCall(localVarPath, "{{httpMethod}}", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
} }
@ -165,7 +165,7 @@ public class {{classname}} {
ValidatorFactory factory = Validation.buildDefaultValidatorFactory(); ValidatorFactory factory = Validation.buildDefaultValidatorFactory();
ExecutableValidator executableValidator = factory.getValidator().forExecutables(); ExecutableValidator executableValidator = factory.getValidator().forExecutables();
Object[] parameterValues = { {{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}} }; Object[] parameterValues = { {{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}} };
Method method = this.getClass().getMethod("{{operationId}}WithHttpInfo"{{#allParams}}, {{#isArray}}java.util.List{{/isArray}}{{#isMap}}java.util.Map{{/isMap}}{{^isArray}}{{^isMap}}{{{dataType}}}{{/isMap}}{{/isArray}}.class{{/allParams}}); Method method = this.getClass().getMethod("{{operationId}}WithHttpInfo"{{#allParams}}, {{#isArray}}java.util.List{{/isArray}}{{#isMap}}java.util.Map{{/isMap}}{{^isArray}}{{^isMap}}{{{dataType}}}{{/isMap}}{{/isArray}}.class{{/allParams}});
Set<ConstraintViolation<{{classname}}>> violations = executableValidator.validateParameters(this, method, Set<ConstraintViolation<{{classname}}>> violations = executableValidator.validateParameters(this, method,
parameterValues); parameterValues);
@ -215,8 +215,8 @@ public class {{classname}} {
{{#isDeprecated}} {{#isDeprecated}}
@Deprecated @Deprecated
{{/isDeprecated}} {{/isDeprecated}}
public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws ApiException { public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException {
{{#returnType}}ApiResponse<{{{returnType}}}> localVarResp = {{/returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{#returnType}} {{#returnType}}ApiResponse<{{{returnType}}}> localVarResp = {{/returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{#returnType}}
return localVarResp.getData();{{/returnType}} return localVarResp.getData();{{/returnType}}
} }
{{/vendorExtensions.x-group-parameters}} {{/vendorExtensions.x-group-parameters}}
@ -247,7 +247,7 @@ public class {{classname}} {
{{#isDeprecated}} {{#isDeprecated}}
@Deprecated @Deprecated
{{/isDeprecated}} {{/isDeprecated}}
public{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}private{{/vendorExtensions.x-group-parameters}} ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws ApiException { public{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}private{{/vendorExtensions.x-group-parameters}} ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException {
okhttp3.Call localVarCall = {{operationId}}ValidateBeforeCall({{#allParams}}{{paramName}}, {{/allParams}}null); okhttp3.Call localVarCall = {{operationId}}ValidateBeforeCall({{#allParams}}{{paramName}}, {{/allParams}}null);
{{#returnType}}Type localVarReturnType = new TypeToken<{{{returnType}}}>(){}.getType(); {{#returnType}}Type localVarReturnType = new TypeToken<{{{returnType}}}>(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);{{/returnType}}{{^returnType}}return localVarApiClient.execute(localVarCall);{{/returnType}} return localVarApiClient.execute(localVarCall, localVarReturnType);{{/returnType}}{{^returnType}}return localVarApiClient.execute(localVarCall);{{/returnType}}
@ -297,7 +297,7 @@ public class {{classname}} {
private {{{dataType}}} {{paramName}}; private {{{dataType}}} {{paramName}};
{{/optionalParams}} {{/optionalParams}}
private API{{operationId}}Request({{#requiredParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/requiredParams}}) { private API{{operationId}}Request({{#requiredParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/requiredParams}}) {
{{#requiredParams}} {{#requiredParams}}
this.{{paramName}} = {{paramName}}; this.{{paramName}} = {{paramName}};
{{/requiredParams}} {{/requiredParams}}
@ -361,7 +361,7 @@ public class {{classname}} {
@Deprecated @Deprecated
{{/isDeprecated}} {{/isDeprecated}}
public {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}} execute() throws ApiException { public {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}} execute() throws ApiException {
{{#returnType}}ApiResponse<{{{returnType}}}> localVarResp = {{/returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{#returnType}} {{#returnType}}ApiResponse<{{{returnType}}}> localVarResp = {{/returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{#returnType}}
return localVarResp.getData();{{/returnType}} return localVarResp.getData();{{/returnType}}
} }
@ -386,7 +386,7 @@ public class {{classname}} {
@Deprecated @Deprecated
{{/isDeprecated}} {{/isDeprecated}}
public ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> executeWithHttpInfo() throws ApiException { public ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> executeWithHttpInfo() throws ApiException {
return {{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); return {{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});
} }
/** /**
@ -440,8 +440,8 @@ public class {{classname}} {
{{#isDeprecated}} {{#isDeprecated}}
@Deprecated @Deprecated
{{/isDeprecated}} {{/isDeprecated}}
public API{{operationId}}Request {{operationId}}({{#requiredParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/requiredParams}}) { public API{{operationId}}Request {{operationId}}({{#requiredParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/requiredParams}}) {
return new API{{operationId}}Request({{#requiredParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/requiredParams}}); return new API{{operationId}}Request({{#requiredParams}}{{paramName}}{{^-last}}, {{/-last}}{{/requiredParams}});
} }
{{/vendorExtensions.x-group-parameters}} {{/vendorExtensions.x-group-parameters}}
{{/operation}} {{/operation}}

View File

@ -12,8 +12,8 @@ Method | HTTP request | Description
{{#operation}} {{#operation}}
<a name="{{operationId}}"></a> <a name="{{operationId}}"></a>
# **{{operationId}}**{{^vendorExtensions.x-group-parameters}} # **{{operationId}}**{{^vendorExtensions.x-group-parameters}}
> {{#returnType}}{{returnType}} {{/returnType}}{{operationId}}({{#allParams}}{{{paramName}}}{{#hasMore}}, {{/hasMore}}{{/allParams}}){{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}} > {{#returnType}}{{returnType}} {{/returnType}}{{operationId}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}){{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}
> {{#returnType}}{{returnType}} {{/returnType}}{{operationId}}({{#requiredParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/requiredParams}}){{#optionalParams}}.{{paramName}}({{paramName}}){{/optionalParams}}.execute();{{/vendorExtensions.x-group-parameters}} > {{#returnType}}{{returnType}} {{/returnType}}{{operationId}}({{#requiredParams}}{{paramName}}{{^-last}}, {{/-last}}{{/requiredParams}}){{#optionalParams}}.{{paramName}}({{paramName}}){{/optionalParams}}.execute();{{/vendorExtensions.x-group-parameters}}
{{summary}}{{#notes}} {{summary}}{{#notes}}
@ -58,7 +58,7 @@ public class Example {
{{{dataType}}} {{{paramName}}} = {{{example}}}; // {{{dataType}}} | {{{description}}} {{{dataType}}} {{{paramName}}} = {{{example}}}; // {{{dataType}}} | {{{description}}}
{{/allParams}} {{/allParams}}
try { try {
{{#returnType}}{{{returnType}}} result = {{/returnType}}apiInstance.{{{operationId}}}{{^vendorExtensions.x-group-parameters}}({{#allParams}}{{{paramName}}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}({{#requiredParams}}{{{paramName}}}{{#hasMore}}, {{/hasMore}}{{/requiredParams}}){{#optionalParams}} {{#returnType}}{{{returnType}}} result = {{/returnType}}apiInstance.{{{operationId}}}{{^vendorExtensions.x-group-parameters}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}});{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}({{#requiredParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/requiredParams}}){{#optionalParams}}
.{{{paramName}}}({{{paramName}}}){{/optionalParams}} .{{{paramName}}}({{{paramName}}}){{/optionalParams}}
.execute();{{/vendorExtensions.x-group-parameters}}{{#returnType}} .execute();{{/vendorExtensions.x-group-parameters}}{{#returnType}}
System.out.println(result);{{/returnType}} System.out.println(result);{{/returnType}}
@ -90,8 +90,8 @@ Name | Type | Description | Notes
### HTTP request headers ### HTTP request headers
- **Content-Type**: {{#consumes}}{{{mediaType}}}{{#hasMore}}, {{/hasMore}}{{/consumes}}{{^consumes}}Not defined{{/consumes}} - **Content-Type**: {{#consumes}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/consumes}}{{^consumes}}Not defined{{/consumes}}
- **Accept**: {{#produces}}{{{mediaType}}}{{#hasMore}}, {{/hasMore}}{{/produces}}{{^produces}}Not defined{{/produces}} - **Accept**: {{#produces}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/produces}}{{^produces}}Not defined{{/produces}}
{{#responses.0}} {{#responses.0}}
### HTTP response details ### HTTP response details

View File

@ -37,7 +37,7 @@ public class {{classname}}Test {
{{#allParams}} {{#allParams}}
{{{dataType}}} {{paramName}} = null; {{{dataType}}} {{paramName}} = null;
{{/allParams}} {{/allParams}}
{{#returnType}}{{{returnType}}} response = {{/returnType}}api.{{operationId}}{{^vendorExtensions.x-group-parameters}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}({{#requiredParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/requiredParams}}){{#optionalParams}} {{#returnType}}{{{returnType}}} response = {{/returnType}}api.{{operationId}}{{^vendorExtensions.x-group-parameters}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}({{#requiredParams}}{{paramName}}{{^-last}}, {{/-last}}{{/requiredParams}}){{#optionalParams}}
.{{paramName}}({{paramName}}){{/optionalParams}} .{{paramName}}({{paramName}}){{/optionalParams}}
.execute();{{/vendorExtensions.x-group-parameters}} .execute();{{/vendorExtensions.x-group-parameters}}

View File

@ -38,6 +38,6 @@ It's recommended to create an instance of `ApiClient` per thread in a multithrea
## Author ## Author
{{#apiInfo}}{{#apis}}{{^hasMore}}{{infoEmail}} {{#apiInfo}}{{#apis}}{{#-last}}{{infoEmail}}
{{/hasMore}}{{/apis}}{{/apiInfo}} {{/-last}}{{/apis}}{{/apiInfo}}

View File

@ -73,7 +73,7 @@ public class {{classname}} {
nickname = "{{{operationId}}}", nickname = "{{{operationId}}}",
tags = { {{#tags}}{{#name}}"{{{name}}}"{{/name}}{{^-last}}, {{/-last}}{{/tags}} }) tags = { {{#tags}}{{#name}}"{{{name}}}"{{/name}}{{^-last}}, {{/-last}}{{/tags}} })
@ApiResponses(value = { {{#responses}} @ApiResponses(value = { {{#responses}}
@ApiResponse(code = {{{code}}}, message = "{{{message}}}") {{#hasMore}},{{/hasMore}}{{/responses}} }) @ApiResponse(code = {{{code}}}, message = "{{{message}}}") {{^-last}},{{/-last}}{{/responses}} })
{{#isDeprecated}} {{#isDeprecated}}
@Deprecated @Deprecated
{{/isDeprecated}} {{/isDeprecated}}

View File

@ -12,7 +12,7 @@ Method | HTTP request | Description
{{#operation}} {{#operation}}
<a name="{{operationId}}"></a> <a name="{{operationId}}"></a>
# **{{operationId}}** # **{{operationId}}**
> {{#returnType}}{{returnType}} {{/returnType}}{{operationId}}({{#allParams}}{{{paramName}}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) > {{#returnType}}{{returnType}} {{/returnType}}{{operationId}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}})
{{summary}}{{#notes}} {{summary}}{{#notes}}
@ -55,8 +55,8 @@ Name | Type | Description | Notes
### HTTP request headers ### HTTP request headers
- **Content-Type**: {{#consumes}}{{{mediaType}}}{{#hasMore}}, {{/hasMore}}{{/consumes}}{{^consumes}}Not defined{{/consumes}} - **Content-Type**: {{#consumes}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/consumes}}{{^consumes}}Not defined{{/consumes}}
- **Accept**: {{#produces}}{{{mediaType}}}{{#hasMore}}, {{/hasMore}}{{/produces}}{{^produces}}Not defined{{/produces}} - **Accept**: {{#produces}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/produces}}{{^produces}}Not defined{{/produces}}
{{/operation}} {{/operation}}
{{/operations}} {{/operations}}

View File

@ -56,7 +56,7 @@ public class {{classname}} {
{{#isDeprecated}} {{#isDeprecated}}
@Deprecated @Deprecated
{{/isDeprecated}} {{/isDeprecated}}
public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws ApiException { public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException {
Object localVarPostBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}}; Object localVarPostBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}};
{{#allParams}}{{#required}} {{#allParams}}{{#required}}
// verify the required parameter '{{paramName}}' is set // verify the required parameter '{{paramName}}' is set
@ -91,16 +91,16 @@ public class {{classname}} {
{{/formParams}} {{/formParams}}
final String[] localVarAccepts = { final String[] localVarAccepts = {
{{#produces}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/produces}} {{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}}
}; };
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { final String[] localVarContentTypes = {
{{#consumes}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/consumes}} {{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}}
}; };
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { {{#authMethods}}"{{name}}"{{#hasMore}}, {{/hasMore}}{{/authMethods}} }; String[] localVarAuthNames = new String[] { {{#authMethods}}"{{name}}"{{^-last}}, {{/-last}}{{/authMethods}} };
{{#returnType}} {{#returnType}}
GenericType<{{{returnType}}}> localVarReturnType = new GenericType<{{{returnType}}}>() {}; GenericType<{{{returnType}}}> localVarReturnType = new GenericType<{{{returnType}}}>() {};

View File

@ -71,12 +71,12 @@ public class {{classname}} {
{{#isDeprecated}} {{#isDeprecated}}
@Deprecated @Deprecated
{{/isDeprecated}} {{/isDeprecated}}
public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection<org.springframework.core.io.Resource>{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.Resource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws RestClientException { public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection<org.springframework.core.io.Resource>{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.Resource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws RestClientException {
{{#returnType}} {{#returnType}}
return {{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}).getBody(); return {{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}).getBody();
{{/returnType}} {{/returnType}}
{{^returnType}} {{^returnType}}
{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); {{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});
{{/returnType}} {{/returnType}}
} }
@ -99,7 +99,7 @@ public class {{classname}} {
{{#isDeprecated}} {{#isDeprecated}}
@Deprecated @Deprecated
{{/isDeprecated}} {{/isDeprecated}}
public ResponseEntity<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection<org.springframework.core.io.Resource>{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.Resource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws RestClientException { public ResponseEntity<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection<org.springframework.core.io.Resource>{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.Resource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws RestClientException {
Object postBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}}; Object postBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}};
{{#allParams}}{{#required}} {{#allParams}}{{#required}}
// verify the required parameter '{{paramName}}' is set // verify the required parameter '{{paramName}}' is set
@ -117,31 +117,31 @@ public class {{classname}} {
final MultiValueMap<String, String> cookieParams = new LinkedMultiValueMap<String, String>(); final MultiValueMap<String, String> cookieParams = new LinkedMultiValueMap<String, String>();
final MultiValueMap<String, Object> formParams = new LinkedMultiValueMap<String, Object>();{{#hasQueryParams}} final MultiValueMap<String, Object> formParams = new LinkedMultiValueMap<String, Object>();{{#hasQueryParams}}
{{#queryParams}}queryParams.putAll(apiClient.parameterToMultiValueMap({{#collectionFormat}}ApiClient.CollectionFormat.valueOf("{{{collectionFormat}}}".toUpperCase(Locale.ROOT)){{/collectionFormat}}{{^collectionFormat}}null{{/collectionFormat}}, "{{baseName}}", {{paramName}}));{{#hasMore}} {{#queryParams}}queryParams.putAll(apiClient.parameterToMultiValueMap({{#collectionFormat}}ApiClient.CollectionFormat.valueOf("{{{collectionFormat}}}".toUpperCase(Locale.ROOT)){{/collectionFormat}}{{^collectionFormat}}null{{/collectionFormat}}, "{{baseName}}", {{paramName}}));{{^-last}}
{{/hasMore}}{{/queryParams}}{{/hasQueryParams}}{{#hasHeaderParams}} {{/-last}}{{/queryParams}}{{/hasQueryParams}}{{#hasHeaderParams}}
{{#headerParams}}if ({{paramName}} != null) {{#headerParams}}if ({{paramName}} != null)
headerParams.add("{{baseName}}", apiClient.parameterToString({{paramName}}));{{#hasMore}} headerParams.add("{{baseName}}", apiClient.parameterToString({{paramName}}));{{^-last}}
{{/hasMore}}{{/headerParams}}{{/hasHeaderParams}}{{#hasCookieParams}} {{/-last}}{{/headerParams}}{{/hasHeaderParams}}{{#hasCookieParams}}
{{#cookieParams}}if ({{paramName}} != null) {{#cookieParams}}if ({{paramName}} != null)
cookieParams.add("{{baseName}}", apiClient.parameterToString({{paramName}}));{{#hasMore}} cookieParams.add("{{baseName}}", apiClient.parameterToString({{paramName}}));{{^-last}}
{{/hasMore}}{{/cookieParams}}{{/hasCookieParams}}{{#hasFormParams}} {{/-last}}{{/cookieParams}}{{/hasCookieParams}}{{#hasFormParams}}
{{#formParams}}if ({{paramName}} != null) {{#formParams}}if ({{paramName}} != null)
formParams.{{^collectionFormat}}add{{/collectionFormat}}{{#collectionFormat}}addAll{{/collectionFormat}}("{{baseName}}", {{#isFile}}{{^collectionFormat}}{{#useAbstractionForFiles}}{{paramName}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}new FileSystemResource({{paramName}}){{/useAbstractionForFiles}}{{/collectionFormat}}{{/isFile}}{{#isFile}}{{#collectionFormat}}{{paramName}}.stream(){{^useAbstractionForFiles}}.map(FileSystemResource::new){{/useAbstractionForFiles}}.collect(Collectors.toList()){{/collectionFormat}}{{/isFile}}{{^isFile}}{{paramName}}{{/isFile}});{{#hasMore}} formParams.{{^collectionFormat}}add{{/collectionFormat}}{{#collectionFormat}}addAll{{/collectionFormat}}("{{baseName}}", {{#isFile}}{{^collectionFormat}}{{#useAbstractionForFiles}}{{paramName}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}new FileSystemResource({{paramName}}){{/useAbstractionForFiles}}{{/collectionFormat}}{{/isFile}}{{#isFile}}{{#collectionFormat}}{{paramName}}.stream(){{^useAbstractionForFiles}}.map(FileSystemResource::new){{/useAbstractionForFiles}}.collect(Collectors.toList()){{/collectionFormat}}{{/isFile}}{{^isFile}}{{paramName}}{{/isFile}});{{^-last}}
{{/hasMore}}{{/formParams}}{{/hasFormParams}} {{/-last}}{{/formParams}}{{/hasFormParams}}
final String[] localVarAccepts = { {{#hasProduces}} final String[] localVarAccepts = { {{#hasProduces}}
{{#produces}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/produces}} {{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}}
{{/hasProduces}} }; {{/hasProduces}} };
final List<MediaType> localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final List<MediaType> localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] contentTypes = { {{#hasConsumes}} final String[] contentTypes = { {{#hasConsumes}}
{{#consumes}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/consumes}} {{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}}
{{/hasConsumes}} }; {{/hasConsumes}} };
final MediaType contentType = apiClient.selectHeaderContentType(contentTypes); final MediaType contentType = apiClient.selectHeaderContentType(contentTypes);
String[] authNames = new String[] { {{#authMethods}}"{{name}}"{{#hasMore}}, {{/hasMore}}{{/authMethods}} }; String[] authNames = new String[] { {{#authMethods}}"{{name}}"{{^-last}}, {{/-last}}{{/authMethods}} };
{{#returnType}}ParameterizedTypeReference<{{{returnType}}}> returnType = new ParameterizedTypeReference<{{{returnType}}}>() {};{{/returnType}}{{^returnType}}ParameterizedTypeReference<Void> returnType = new ParameterizedTypeReference<Void>() {};{{/returnType}} {{#returnType}}ParameterizedTypeReference<{{{returnType}}}> returnType = new ParameterizedTypeReference<{{{returnType}}}>() {};{{/returnType}}{{^returnType}}ParameterizedTypeReference<Void> returnType = new ParameterizedTypeReference<Void>() {};{{/returnType}}
return apiClient.invokeAPI(path, HttpMethod.{{httpMethod}}, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, contentType, authNames, returnType); return apiClient.invokeAPI(path, HttpMethod.{{httpMethod}}, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, contentType, authNames, returnType);

View File

@ -36,7 +36,7 @@ public class {{classname}}Test {
{{#allParams}} {{#allParams}}
{{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection<org.springframework.core.io.Resource>{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.Resource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}} = null; {{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection<org.springframework.core.io.Resource>{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.Resource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}} = null;
{{/allParams}} {{/allParams}}
{{#returnType}}{{{returnType}}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); {{#returnType}}{{{returnType}}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});
// TODO: test validations // TODO: test validations
} }

View File

@ -73,7 +73,7 @@ public class ApiClient {
auth = new ApiKeyAuth({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{#isKeyInQuery}}"query"{{/isKeyInQuery}}{{#isKeyInCookie}}"cookie"{{/isKeyInCookie}}, "{{keyParamName}}"); auth = new ApiKeyAuth({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{#isKeyInQuery}}"query"{{/isKeyInQuery}}{{#isKeyInCookie}}"cookie"{{/isKeyInCookie}}, "{{keyParamName}}");
{{/isApiKey}} {{/isApiKey}}
{{#isOAuth}} {{#isOAuth}}
auth = new OAuth(OAuthFlow.{{flow}}, "{{authorizationUrl}}", "{{tokenUrl}}", "{{#scopes}}{{scope}}{{#hasMore}}, {{/hasMore}}{{/scopes}}"); auth = new OAuth(OAuthFlow.{{flow}}, "{{authorizationUrl}}", "{{tokenUrl}}", "{{#scopes}}{{scope}}{{^-last}}, {{/-last}}{{/scopes}}");
{{/isOAuth}} {{/isOAuth}}
} else {{/authMethods}}{ } else {{/authMethods}}{
throw new RuntimeException("auth name \"" + authName + "\" not found in available auth names"); throw new RuntimeException("auth name \"" + authName + "\" not found in available auth names");

View File

@ -38,6 +38,6 @@ It's recommended to create an instance of `ApiClient` per thread in a multithrea
## Author ## Author
{{#apiInfo}}{{#apis}}{{^hasMore}}{{infoEmail}} {{#apiInfo}}{{#apis}}{{#-last}}{{infoEmail}}
{{/hasMore}}{{/apis}}{{/apiInfo}} {{/-last}}{{/apis}}{{/apiInfo}}

View File

@ -36,8 +36,8 @@ public interface {{classname}} {
{{#isMultipart}}@retrofit.http.Multipart{{/isMultipart}}{{^isMultipart}}@retrofit.http.FormUrlEncoded{{/isMultipart}}{{/-first}}{{/formParams}} {{#isMultipart}}@retrofit.http.Multipart{{/isMultipart}}{{^isMultipart}}@retrofit.http.FormUrlEncoded{{/isMultipart}}{{/-first}}{{/formParams}}
@{{httpMethod}}("{{{path}}}") @{{httpMethod}}("{{{path}}}")
{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}} {{operationId}}({{^allParams}});{{/allParams}} {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}} {{operationId}}({{^allParams}});{{/allParams}}
{{#allParams}}{{>libraries/retrofit/queryParams}}{{>libraries/retrofit/pathParams}}{{>libraries/retrofit/headerParams}}{{>libraries/retrofit/bodyParams}}{{>libraries/retrofit/formParams}}{{#hasMore}}, {{/hasMore}}{{^hasMore}} {{#allParams}}{{>libraries/retrofit/queryParams}}{{>libraries/retrofit/pathParams}}{{>libraries/retrofit/headerParams}}{{>libraries/retrofit/bodyParams}}{{>libraries/retrofit/formParams}}{{^-last}}, {{/-last}}{{#-last}}
);{{/hasMore}}{{/allParams}} );{{/-last}}{{/allParams}}
/** /**
* {{summary}} * {{summary}}

View File

@ -36,7 +36,7 @@ public class {{classname}}Test {
{{#allParams}} {{#allParams}}
{{{dataType}}} {{paramName}} = null; {{{dataType}}} {{paramName}} = null;
{{/allParams}} {{/allParams}}
// {{#returnType}}{{{returnType}}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); // {{#returnType}}{{{returnType}}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});
// TODO: test validations // TODO: test validations
} }

View File

@ -85,7 +85,7 @@ public class ApiClient {
auth = new ApiKeyAuth({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{#isKeyInQuery}}"query"{{/isKeyInQuery}}{{#isKeyInCookie}}"cookie"{{/isKeyInCookie}}, "{{keyParamName}}"); auth = new ApiKeyAuth({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{#isKeyInQuery}}"query"{{/isKeyInQuery}}{{#isKeyInCookie}}"cookie"{{/isKeyInCookie}}, "{{keyParamName}}");
{{/isApiKey}} {{/isApiKey}}
{{#isOAuth}} {{#isOAuth}}
auth = new OAuth(OAuthFlow.{{flow}}, "{{authorizationUrl}}", "{{tokenUrl}}", "{{#scopes}}{{scope}}{{#hasMore}}, {{/hasMore}}{{/scopes}}"); auth = new OAuth(OAuthFlow.{{flow}}, "{{authorizationUrl}}", "{{tokenUrl}}", "{{#scopes}}{{scope}}{{^-last}}, {{/-last}}{{/scopes}}");
{{/isOAuth}} {{/isOAuth}}
} else {{/authMethods}}{ } else {{/authMethods}}{
throw new RuntimeException("auth name \"" + authName + "\" not found in available auth names"); throw new RuntimeException("auth name \"" + authName + "\" not found in available auth names");

View File

@ -34,6 +34,6 @@ After the client library is installed/deployed, you can use it in your Maven pro
## Author ## Author
{{#apiInfo}}{{#apis}}{{^hasMore}}{{infoEmail}} {{#apiInfo}}{{#apis}}{{#-last}}{{infoEmail}}
{{/hasMore}}{{/apis}}{{/apiInfo}} {{/-last}}{{/apis}}{{/apiInfo}}

View File

@ -75,8 +75,8 @@ public interface {{classname}} {
{{/formParams}} {{/formParams}}
@{{httpMethod}}("{{{path}}}") @{{httpMethod}}("{{{path}}}")
{{^doNotUseRx}}{{#useRxJava}}Observable<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}{{/isResponseFile}}>{{/useRxJava}}{{#useRxJava2}}{{#returnType}}Observable<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}>{{/returnType}}{{^returnType}}Completable{{/returnType}}{{/useRxJava2}}{{#useRxJava3}}{{#returnType}}Observable<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}>{{/returnType}}{{^returnType}}Completable{{/returnType}}{{/useRxJava3}}{{/doNotUseRx}}{{#doNotUseRx}}Call<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}{{/isResponseFile}}>{{/doNotUseRx}} {{operationId}}({{^allParams}});{{/allParams}} {{^doNotUseRx}}{{#useRxJava}}Observable<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}{{/isResponseFile}}>{{/useRxJava}}{{#useRxJava2}}{{#returnType}}Observable<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}>{{/returnType}}{{^returnType}}Completable{{/returnType}}{{/useRxJava2}}{{#useRxJava3}}{{#returnType}}Observable<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}>{{/returnType}}{{^returnType}}Completable{{/returnType}}{{/useRxJava3}}{{/doNotUseRx}}{{#doNotUseRx}}Call<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}{{/isResponseFile}}>{{/doNotUseRx}} {{operationId}}({{^allParams}});{{/allParams}}
{{#allParams}}{{>libraries/retrofit2/queryParams}}{{>libraries/retrofit2/pathParams}}{{>libraries/retrofit2/headerParams}}{{>libraries/retrofit2/bodyParams}}{{>libraries/retrofit2/formParams}}{{#hasMore}}, {{/hasMore}}{{^hasMore}} {{#allParams}}{{>libraries/retrofit2/queryParams}}{{>libraries/retrofit2/pathParams}}{{>libraries/retrofit2/headerParams}}{{>libraries/retrofit2/bodyParams}}{{>libraries/retrofit2/formParams}}{{^-last}}, {{/-last}}{{#-last}}
);{{/hasMore}}{{/allParams}} );{{/-last}}{{/allParams}}
{{/operation}} {{/operation}}
} }

View File

@ -37,7 +37,7 @@ public class {{classname}}Test {
{{#allParams}} {{#allParams}}
{{{dataType}}} {{paramName}} = null; {{{dataType}}} {{paramName}} = null;
{{/allParams}} {{/allParams}}
// {{#returnType}}{{{returnType}}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); // {{#returnType}}{{{returnType}}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});
// TODO: test validations // TODO: test validations
} }

View File

@ -51,8 +51,8 @@ public interface {{classname}} {
{{/formParams}} {{/formParams}}
@{{httpMethod}}("{{{path}}}") @{{httpMethod}}("{{{path}}}")
F.Promise<Response<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}>> {{operationId}}({{^allParams}});{{/allParams}} F.Promise<Response<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}>> {{operationId}}({{^allParams}});{{/allParams}}
{{#allParams}}{{>libraries/retrofit2/queryParams}}{{>libraries/retrofit2/pathParams}}{{>libraries/retrofit2/headerParams}}{{>libraries/retrofit2/bodyParams}}{{>libraries/retrofit2/formParams}}{{#hasMore}}, {{/hasMore}}{{^hasMore}} {{#allParams}}{{>libraries/retrofit2/queryParams}}{{>libraries/retrofit2/pathParams}}{{>libraries/retrofit2/headerParams}}{{>libraries/retrofit2/bodyParams}}{{>libraries/retrofit2/formParams}}{{^-last}}, {{/-last}}{{#-last}}
);{{/hasMore}}{{/allParams}} );{{/-last}}{{/allParams}}
{{/operation}} {{/operation}}
} }

View File

@ -51,8 +51,8 @@ public interface {{classname}} {
{{/formParams}} {{/formParams}}
@{{httpMethod}}("{{{path}}}") @{{httpMethod}}("{{{path}}}")
CompletionStage<Response<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}>> {{operationId}}({{^allParams}});{{/allParams}} CompletionStage<Response<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}>> {{operationId}}({{^allParams}});{{/allParams}}
{{#allParams}}{{>libraries/retrofit2/queryParams}}{{>libraries/retrofit2/pathParams}}{{>libraries/retrofit2/headerParams}}{{>libraries/retrofit2/bodyParams}}{{>libraries/retrofit2/formParams}}{{#hasMore}}, {{/hasMore}}{{^hasMore}} {{#allParams}}{{>libraries/retrofit2/queryParams}}{{>libraries/retrofit2/pathParams}}{{>libraries/retrofit2/headerParams}}{{>libraries/retrofit2/bodyParams}}{{>libraries/retrofit2/formParams}}{{^-last}}, {{/-last}}{{#-last}}
);{{/hasMore}}{{/allParams}} );{{/-last}}{{/allParams}}
{{/operation}} {{/operation}}
} }

View File

@ -51,8 +51,8 @@ public interface {{classname}} {
{{/formParams}} {{/formParams}}
@{{httpMethod}}("{{{path}}}") @{{httpMethod}}("{{{path}}}")
CompletionStage<Response<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}>> {{operationId}}({{^allParams}});{{/allParams}} CompletionStage<Response<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}>> {{operationId}}({{^allParams}});{{/allParams}}
{{#allParams}}{{>libraries/retrofit2/queryParams}}{{>libraries/retrofit2/pathParams}}{{>libraries/retrofit2/headerParams}}{{>libraries/retrofit2/bodyParams}}{{>libraries/retrofit2/formParams}}{{#hasMore}}, {{/hasMore}}{{^hasMore}} {{#allParams}}{{>libraries/retrofit2/queryParams}}{{>libraries/retrofit2/pathParams}}{{>libraries/retrofit2/headerParams}}{{>libraries/retrofit2/bodyParams}}{{>libraries/retrofit2/formParams}}{{^-last}}, {{/-last}}{{#-last}}
);{{/hasMore}}{{/allParams}} );{{/-last}}{{/allParams}}
{{/operation}} {{/operation}}
} }

View File

@ -100,9 +100,9 @@ public class {{classname}}Impl implements {{classname}} {
{{#formParams}}if ({{paramName}} != null) localVarFormParams.put("{{baseName}}", {{paramName}}); {{#formParams}}if ({{paramName}} != null) localVarFormParams.put("{{baseName}}", {{paramName}});
{{/formParams}} {{/formParams}}
String[] localVarAccepts = { {{#produces}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/produces}} }; String[] localVarAccepts = { {{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}} };
String[] localVarContentTypes = { {{#consumes}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/consumes}} }; String[] localVarContentTypes = { {{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}} };
String[] localVarAuthNames = new String[] { {{#authMethods}}"{{name}}"{{#hasMore}}, {{/hasMore}}{{/authMethods}} }; String[] localVarAuthNames = new String[] { {{#authMethods}}"{{name}}"{{^-last}}, {{/-last}}{{/authMethods}} };
{{#returnType}} {{#returnType}}
TypeReference<{{{returnType}}}> localVarReturnType = new TypeReference<{{{returnType}}}>() {}; TypeReference<{{{returnType}}}> localVarReturnType = new TypeReference<{{{returnType}}}>() {};
apiClient.invokeAPI(localVarPath, "{{httpMethod}}", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, authInfo, localVarReturnType, resultHandler);{{/returnType}}{{^returnType}} apiClient.invokeAPI(localVarPath, "{{httpMethod}}", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, authInfo, localVarReturnType, resultHandler);{{/returnType}}{{^returnType}}

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