forked from loafle/openapi-generator-original
Merge remote-tracking branch 'origin/5.1.x' into 6.0.x
This commit is contained in:
15
.github/PULL_REQUEST_TEMPLATE.md
vendored
15
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -5,7 +5,16 @@
|
||||
|
||||
- [ ] Read the [contribution guidelines](https://github.com/openapitools/openapi-generator/blob/master/CONTRIBUTING.md).
|
||||
- [ ] Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community.
|
||||
- [ ] If contributing template-only or documentation-only changes which will change sample output, [build the project](https://github.com/OpenAPITools/openapi-generator#14---build-projects) beforehand.
|
||||
- [ ] Run the shell script `./bin/generate-samples.sh`to update all Petstore samples related to your fix. This is important, as CI jobs will verify _all_ generator outputs of your HEAD commit as it would merge with master. These must match the expectations made by your contribution. You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example `./bin/generate-samples.sh bin/configs/java*`. For Windows users, please run the script in [Git BASH](https://gitforwindows.org/).
|
||||
- [ ] Run the following to [build the project](https://github.com/OpenAPITools/openapi-generator#14---build-projects) and update samples:
|
||||
```
|
||||
./mvnw clean package
|
||||
./bin/generate-samples.sh
|
||||
./bin/utils/export_docs_generators.sh
|
||||
```
|
||||
Commit all changed files.
|
||||
This is important, as CI jobs will verify _all_ generator outputs of your HEAD commit as it would merge with master.
|
||||
These must match the expectations made by your contribution.
|
||||
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example `./bin/generate-samples.sh bin/configs/java*`.
|
||||
For Windows users, please run the script in [Git BASH](https://gitforwindows.org/).
|
||||
- [ ] File the PR against the [correct branch](https://github.com/OpenAPITools/openapi-generator/wiki/Git-Branches): `master`, `5.1.x`, `6.0.x`
|
||||
- [ ] Copy the [technical committee](https://github.com/openapitools/openapi-generator/#62---openapi-generator-technical-committee) to review the pull request if your PR is targeting a particular programming language.
|
||||
- [ ] If your PR is targeting a particular programming language, @mention the [technical committee](https://github.com/openapitools/openapi-generator/#62---openapi-generator-technical-committee) members, so they are more likely to review the pull request.
|
||||
|
||||
@@ -808,6 +808,7 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in
|
||||
- 2020-12-01 - [OpenAPI GeneratorでGoのAPIサーバー/クライアントコードを自動生成する](https://qiita.com/saki-engineering/items/b20d8b6074c4da9664a5) by [@saki-engineering](https://qiita.com/saki-engineering)
|
||||
- 2020-12-09 - [プロジェクトにOpenAPI Generatorで自動生成された型付きAPI Clientを導入した話](https://qiita.com/yoshifujiT/items/905c18700ede23f40840) by [@yoshifujiT](https://github.com/yoshifujiT)
|
||||
- 2020-12-15 - [Next.js + NestJS + GraphQLで変化に追従するフロントエンドへ 〜 ショッピングクーポンの事例紹介](https://techblog.yahoo.co.jp/entry/2020121530052952/) by [小倉 陸](https://github.com/ogugu9) at [Yahoo! JAPAN Tech Blog](https://techblog.yahoo.co.jp/)
|
||||
- 2021-01-08 - [Hello, New API – Part 1](https://www.nginx.com/blog/hello-new-api-part-1/) by [Jeremy Schulman](https://www.nginx.com/people/jeremy-schulman/) at [Major League Baseball](https://www.mlb.com)
|
||||
|
||||
## [6 - About Us](#table-of-contents)
|
||||
|
||||
|
||||
@@ -188,7 +188,7 @@ The default is generate *everything* supported by the specific library. Once you
|
||||
To control the specific files being generated, you can pass a CSV list of what you want:
|
||||
```sh
|
||||
# generate the User and Pet models only
|
||||
--global-property models="User,Pet"
|
||||
--global-property models="User:Pet"
|
||||
|
||||
# generate the User model and the supportingFile `StringUtil.java`:
|
||||
--global-property models=User,supportingFiles=StringUtil.java
|
||||
@@ -205,7 +205,7 @@ These options default to true and don't limit the generation of the feature opti
|
||||
--global-property models,modelDocs=false
|
||||
|
||||
# generate only User and Pet models (no tests and no documentation)
|
||||
--global-property models="User,Pet",modelTests=false
|
||||
--global-property models="User:Pet",modelTests=false
|
||||
|
||||
# generate only apis (without tests)
|
||||
--global-property apis,apiTests=false
|
||||
|
||||
@@ -469,9 +469,6 @@ openApiGenerate {
|
||||
apiPackage = "org.openapi.example.api"
|
||||
invokerPackage = "org.openapi.example.invoker"
|
||||
modelPackage = "org.openapi.example.model"
|
||||
modelFilesConstrainedTo = [
|
||||
"Error"
|
||||
]
|
||||
configOptions = [
|
||||
dateLibrary: "java8"
|
||||
]
|
||||
|
||||
@@ -226,7 +226,7 @@ public class CodegenConstants {
|
||||
public static final String API_NAME_PREFIX_DESC = "Prefix that will be appended to all API names ('tags'). Default: empty string. e.g. Pet => Pet.";
|
||||
|
||||
public static final String API_NAME_SUFFIX = "apiNameSuffix";
|
||||
public static final String API_NAME_SUFFIX_DESC = "Suffix that will be appended to all API names ('tags'). Default: Api. e.g. Pet => PetApi. Note: Only ruby, python, jaxrs generators suppport this feature at the moment.";
|
||||
public static final String API_NAME_SUFFIX_DESC = "Suffix that will be appended to all API names ('tags'). Default: Api. e.g. Pet => PetApi. Note: Only ruby, python, jaxrs generators support this feature at the moment.";
|
||||
|
||||
public static final String MODEL_NAME_PREFIX = "modelNamePrefix";
|
||||
public static final String MODEL_NAME_PREFIX_DESC = "Prefix that will be prepended to all model names.";
|
||||
|
||||
@@ -95,6 +95,7 @@ public class CodegenModel implements IJsonSchemaValidationProperties {
|
||||
public boolean isArray;
|
||||
public boolean hasChildren;
|
||||
public boolean isMap;
|
||||
public boolean isNull;
|
||||
/**
|
||||
* Indicates the OAS schema specifies "deprecated: true".
|
||||
*/
|
||||
@@ -702,6 +703,16 @@ public class CodegenModel implements IJsonSchemaValidationProperties {
|
||||
this.xmlPrefix = xmlPrefix;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getIsNull() {
|
||||
return isNull;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setIsNull(boolean isNull) {
|
||||
this.isNull = isNull;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
@@ -730,6 +741,7 @@ public class CodegenModel implements IJsonSchemaValidationProperties {
|
||||
isMap == that.isMap &&
|
||||
isDeprecated == that.isDeprecated &&
|
||||
hasOnlyReadOnly == that.hasOnlyReadOnly &&
|
||||
isNull == that.isNull &&
|
||||
getUniqueItems() == that.getUniqueItems() &&
|
||||
getExclusiveMinimum() == that.getExclusiveMinimum() &&
|
||||
getExclusiveMaximum() == that.getExclusiveMaximum() &&
|
||||
@@ -794,7 +806,7 @@ public class CodegenModel implements IJsonSchemaValidationProperties {
|
||||
getDescription(), getClassVarName(), getModelJson(), getDataType(), getXmlPrefix(), getXmlNamespace(),
|
||||
getXmlName(), getClassFilename(), getUnescapedDescription(), getDiscriminator(), getDefaultValue(),
|
||||
getArrayModelType(), isAlias, isString, isInteger, isLong, isNumber, isNumeric, isFloat, isDouble,
|
||||
isDate, isDateTime,
|
||||
isDate, isDateTime, isNull,
|
||||
getVars(), getAllVars(), getRequiredVars(), getOptionalVars(), getReadOnlyVars(), getReadWriteVars(),
|
||||
getParentVars(), getAllowableValues(), getMandatory(), getAllMandatory(), getImports(), hasVars,
|
||||
isEmptyVars(), hasMoreModels, hasEnums, isEnum, isNullable, hasRequired, hasOptional, isArray,
|
||||
@@ -885,6 +897,7 @@ public class CodegenModel implements IJsonSchemaValidationProperties {
|
||||
sb.append(", items='").append(items).append('\'');
|
||||
sb.append(", additionalProperties='").append(additionalProperties).append('\'');
|
||||
sb.append(", isModel='").append(isModel).append('\'');
|
||||
sb.append(", isNull='").append(isNull);
|
||||
sb.append('}');
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
@@ -101,6 +101,7 @@ public class CodegenParameter implements IJsonSchemaValidationProperties {
|
||||
public Number multipleOf;
|
||||
private Integer maxProperties;
|
||||
private Integer minProperties;
|
||||
public boolean isNull;
|
||||
|
||||
public CodegenParameter copy() {
|
||||
CodegenParameter output = new CodegenParameter();
|
||||
@@ -147,6 +148,7 @@ public class CodegenParameter implements IJsonSchemaValidationProperties {
|
||||
output.minimum = this.minimum;
|
||||
output.pattern = this.pattern;
|
||||
output.additionalProperties = this.additionalProperties;
|
||||
output.isNull = this.isNull;
|
||||
|
||||
if (this._enum != null) {
|
||||
output._enum = new ArrayList<String>(this._enum);
|
||||
@@ -200,7 +202,7 @@ public class CodegenParameter implements IJsonSchemaValidationProperties {
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
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);
|
||||
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, isNull);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -244,6 +246,7 @@ public class CodegenParameter implements IJsonSchemaValidationProperties {
|
||||
hasValidation == that.hasValidation &&
|
||||
isNullable == that.isNullable &&
|
||||
required == that.required &&
|
||||
isNull == that.isNull &&
|
||||
getExclusiveMaximum() == that.getExclusiveMaximum() &&
|
||||
getExclusiveMinimum() == that.getExclusiveMinimum() &&
|
||||
getUniqueItems() == that.getUniqueItems() &&
|
||||
@@ -357,6 +360,7 @@ public class CodegenParameter implements IJsonSchemaValidationProperties {
|
||||
sb.append(", uniqueItems=").append(uniqueItems);
|
||||
sb.append(", contentType=").append(contentType);
|
||||
sb.append(", multipleOf=").append(multipleOf);
|
||||
sb.append(", isNull=").append(isNull);
|
||||
sb.append('}');
|
||||
return sb.toString();
|
||||
}
|
||||
@@ -568,5 +572,15 @@ public class CodegenParameter implements IJsonSchemaValidationProperties {
|
||||
public void setRequiredVars(List<CodegenProperty> requiredVars) {
|
||||
this.requiredVars = requiredVars;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getIsNull() {
|
||||
return isNull;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setIsNull(boolean isNull) {
|
||||
this.isNull = isNull;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -132,6 +132,7 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti
|
||||
public boolean isUuid;
|
||||
public boolean isUri;
|
||||
public boolean isEmail;
|
||||
public boolean isNull;
|
||||
/**
|
||||
* The type is a free-form object, i.e. it is a map of string to values with no declared properties.
|
||||
* A OAS free-form schema may include the 'additionalProperties' attribute, which puts a constraint
|
||||
@@ -676,6 +677,16 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti
|
||||
this.requiredVars = requiredVars;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getIsNull() {
|
||||
return isNull;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setIsNull(boolean isNull) {
|
||||
this.isNull = isNull;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
final StringBuilder sb = new StringBuilder("CodegenProperty{");
|
||||
@@ -764,6 +775,7 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti
|
||||
sb.append(", xmlName='").append(xmlName).append('\'');
|
||||
sb.append(", xmlNamespace='").append(xmlNamespace).append('\'');
|
||||
sb.append(", isXmlWrapped=").append(isXmlWrapped);
|
||||
sb.append(", isNull=").append(isNull);
|
||||
sb.append('}');
|
||||
return sb.toString();
|
||||
}
|
||||
@@ -812,6 +824,7 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti
|
||||
isInherited == that.isInherited &&
|
||||
isXmlAttribute == that.isXmlAttribute &&
|
||||
isXmlWrapped == that.isXmlWrapped &&
|
||||
isNull == that.isNull &&
|
||||
Objects.equals(openApiType, that.openApiType) &&
|
||||
Objects.equals(baseName, that.baseName) &&
|
||||
Objects.equals(complexType, that.complexType) &&
|
||||
@@ -873,6 +886,6 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti
|
||||
items, mostInnerItems, additionalProperties, vars, requiredVars,
|
||||
vendorExtensions, hasValidation, isInherited, discriminatorValue, nameInCamelCase,
|
||||
nameInSnakeCase, enumName, maxItems, minItems, isXmlAttribute, xmlPrefix, xmlName,
|
||||
xmlNamespace, isXmlWrapped);
|
||||
xmlNamespace, isXmlWrapped, isNull);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,6 +57,7 @@ public class CodegenResponse implements IJsonSchemaValidationProperties {
|
||||
public boolean isArray;
|
||||
public boolean isBinary = false;
|
||||
public boolean isFile = false;
|
||||
public boolean isNull;
|
||||
public Object schema;
|
||||
public String jsonSchema;
|
||||
public Map<String, Object> vendorExtensions = new HashMap<String, Object>();
|
||||
@@ -84,7 +85,7 @@ public class CodegenResponse implements IJsonSchemaValidationProperties {
|
||||
isString, isNumeric, isInteger, isLong, isNumber, isFloat, isDouble, isDecimal, isByteArray, isBoolean, isDate,
|
||||
isDateTime, isUuid, isEmail, isModel, isFreeFormObject, isAnyType, isDefault, simpleType, primitiveType,
|
||||
isMap, isArray, isBinary, isFile, schema, jsonSchema, vendorExtensions, items, additionalProperties,
|
||||
vars, requiredVars,
|
||||
vars, requiredVars, isNull,
|
||||
getMaxProperties(), getMinProperties(), uniqueItems, getMaxItems(), getMinItems(), getMaxLength(),
|
||||
getMinLength(), exclusiveMinimum, exclusiveMaximum, getMinimum(), getMaximum(), getPattern(),
|
||||
is1xx, is2xx, is3xx, is4xx, is5xx);
|
||||
@@ -122,6 +123,7 @@ public class CodegenResponse implements IJsonSchemaValidationProperties {
|
||||
isFile == that.isFile &&
|
||||
items == that.items &&
|
||||
additionalProperties == that.additionalProperties &&
|
||||
isNull == that.isNull &&
|
||||
is1xx == that.is1xx &&
|
||||
is2xx == that.is2xx &&
|
||||
is3xx == that.is3xx &&
|
||||
@@ -423,6 +425,7 @@ public class CodegenResponse implements IJsonSchemaValidationProperties {
|
||||
sb.append(", additionalProperties='").append(additionalProperties).append('\'');
|
||||
sb.append(", vars='").append(vars).append('\'');
|
||||
sb.append(", requiredVars='").append(requiredVars).append('\'');
|
||||
sb.append(", isNull='").append(isNull);
|
||||
sb.append('}');
|
||||
return sb.toString();
|
||||
}
|
||||
@@ -443,4 +446,14 @@ public class CodegenResponse implements IJsonSchemaValidationProperties {
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getIsNull() {
|
||||
return isNull;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setIsNull(boolean isNull) {
|
||||
this.isNull = isNull;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2306,6 +2306,8 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
m.arrayModelType = arrayProperty.complexType;
|
||||
addParentContainer(m, name, schema);
|
||||
ModelUtils.syncValidationProperties(schema, m);
|
||||
} else if (ModelUtils.isNullType(schema)) {
|
||||
m.isNull = true;
|
||||
} else if (schema instanceof ComposedSchema) {
|
||||
final ComposedSchema composed = (ComposedSchema) schema;
|
||||
Map<String, Schema> properties = new LinkedHashMap<String, Schema>();
|
||||
@@ -3279,6 +3281,8 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
innerSchema = new StringSchema().description("//TODO automatically added by openapi-generator due to undefined type");
|
||||
p.setAdditionalProperties(innerSchema);
|
||||
}
|
||||
} else if (ModelUtils.isNullType(p)) {
|
||||
property.isNull = true;
|
||||
}
|
||||
|
||||
//Inline enum case:
|
||||
@@ -4044,6 +4048,7 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
if (r.schema != null) {
|
||||
Map<String, Schema> allSchemas = null;
|
||||
CodegenProperty cp = fromProperty("response", responseSchema);
|
||||
r.isNull = cp.isNull;
|
||||
|
||||
if (ModelUtils.isArraySchema(responseSchema)) {
|
||||
ArraySchema as = (ArraySchema) responseSchema;
|
||||
@@ -4317,6 +4322,8 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
imports.add(codegenProperty.baseType);
|
||||
codegenProperty = codegenProperty.items;
|
||||
}
|
||||
} else if (ModelUtils.isNullType(parameterSchema)) {
|
||||
codegenParameter.isNull = true;
|
||||
}
|
||||
/* TODO revise the logic below
|
||||
} else {
|
||||
@@ -6146,6 +6153,7 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
} else {
|
||||
codegenParameter.baseName = bodyParameterName;
|
||||
}
|
||||
codegenParameter.isNull = codegenProperty.isNull;
|
||||
codegenParameter.isPrimitiveType = true;
|
||||
codegenParameter.baseType = codegenProperty.baseType;
|
||||
codegenParameter.dataType = codegenProperty.dataType;
|
||||
|
||||
@@ -90,4 +90,8 @@ public interface IJsonSchemaValidationProperties {
|
||||
List<CodegenProperty> getRequiredVars();
|
||||
|
||||
void setRequiredVars(List<CodegenProperty> requiredVars);
|
||||
|
||||
boolean getIsNull();
|
||||
|
||||
void setIsNull(boolean isNull);
|
||||
}
|
||||
|
||||
@@ -109,15 +109,15 @@ public class TemplateManager implements TemplatingExecutor, TemplateProcessor {
|
||||
if (name == null || name.contains("..")) {
|
||||
throw new IllegalArgumentException("Template location must be constrained to template directory.");
|
||||
}
|
||||
try {
|
||||
Reader reader = getTemplateReader(name);
|
||||
try (Reader reader = getTemplateReader(name)) {
|
||||
if (reader == null) {
|
||||
throw new RuntimeException("no file found");
|
||||
}
|
||||
Scanner s = new Scanner(reader).useDelimiter("\\A");
|
||||
return s.hasNext() ? s.next() : "";
|
||||
try (Scanner s = new Scanner(reader).useDelimiter("\\A")) {
|
||||
return s.hasNext() ? s.next() : "";
|
||||
}
|
||||
} catch (Exception e) {
|
||||
LOGGER.error(e.getMessage());
|
||||
LOGGER.error("{}", e.getMessage(), e);
|
||||
}
|
||||
throw new RuntimeException("can't load template " + name);
|
||||
}
|
||||
@@ -142,7 +142,7 @@ public class TemplateManager implements TemplatingExecutor, TemplateProcessor {
|
||||
if (name == null || name.contains("..")) {
|
||||
throw new IllegalArgumentException("Template location must be constrained to template directory.");
|
||||
}
|
||||
is = new FileInputStream(new File(name)); // May throw but never return a null value
|
||||
is = new FileInputStream(name); // May throw but never return a null value
|
||||
}
|
||||
return is;
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ public final class CodegenConfiguratorUtils {
|
||||
public static void applyGlobalPropertiesKvp(String globalProperties, CodegenConfigurator configurator) {
|
||||
final Map<String, String> map = createMapFromKeyValuePairs(globalProperties);
|
||||
for (Map.Entry<String, String> entry : map.entrySet()) {
|
||||
configurator.addGlobalProperty(entry.getKey(), entry.getValue());
|
||||
configurator.addGlobalProperty(entry.getKey(), entry.getValue().replace(":",","));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -172,9 +172,7 @@ abstract public class AbstractRubyCodegen extends DefaultCodegen implements Code
|
||||
|
||||
@Override
|
||||
public String toVarName(final String name) {
|
||||
String varName;
|
||||
// sanitize name
|
||||
varName = sanitizeName(name);
|
||||
String varName = sanitizeName(name);
|
||||
// if it's all uppper case, convert to lower case
|
||||
if (name.matches("^[A-Z_]*$")) {
|
||||
varName = varName.toLowerCase(Locale.ROOT);
|
||||
@@ -207,7 +205,7 @@ abstract public class AbstractRubyCodegen extends DefaultCodegen implements Code
|
||||
// method name cannot use reserved keyword, e.g. return
|
||||
if (isReservedWord(operationId)) {
|
||||
String newOperationId = underscore("call_" + operationId);
|
||||
LOGGER.warn(operationId + " (reserved word) cannot be used as method name. Renamed to " + newOperationId);
|
||||
LOGGER.warn("{} (reserved word) cannot be used as method name. Renamed to {}", operationId, newOperationId);
|
||||
return newOperationId;
|
||||
}
|
||||
|
||||
@@ -241,15 +239,16 @@ abstract public class AbstractRubyCodegen extends DefaultCodegen implements Code
|
||||
Process p = Runtime.getRuntime().exec(command);
|
||||
int exitValue = p.waitFor();
|
||||
if (exitValue != 0) {
|
||||
BufferedReader br = new BufferedReader(new InputStreamReader(p.getErrorStream(), StandardCharsets.UTF_8));
|
||||
StringBuilder sb = new StringBuilder();
|
||||
String line;
|
||||
while ((line = br.readLine()) != null) {
|
||||
sb.append(line);
|
||||
try(BufferedReader br = new BufferedReader(new InputStreamReader(p.getErrorStream(), StandardCharsets.UTF_8))) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
String line;
|
||||
while ((line = br.readLine()) != null) {
|
||||
sb.append(line);
|
||||
}
|
||||
LOGGER.error("Error running the command ({}). Exit value: {}, Error output: {}", command, exitValue, sb.toString());
|
||||
}
|
||||
LOGGER.error("Error running the command ({}). Exit value: {}, Error output: {}", command, exitValue, sb.toString());
|
||||
} else {
|
||||
LOGGER.info("Successfully executed: " + command);
|
||||
LOGGER.info("Successfully executed: `{}`", command);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("Error running the command ({}). Exception: {}", command, e.getMessage());
|
||||
|
||||
@@ -19,9 +19,14 @@ package org.openapitools.codegen.languages;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.*;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Sets;
|
||||
@@ -116,15 +121,13 @@ public class DartClientCodegen extends DefaultCodegen {
|
||||
modelTestTemplateFiles.put("model_test.mustache", ".dart");
|
||||
apiTestTemplateFiles.put("api_test.mustache", ".dart");
|
||||
|
||||
List<String> reservedWordsList = new ArrayList<>();
|
||||
try {
|
||||
BufferedReader reader = new BufferedReader(
|
||||
final List<String> reservedWordsList = new ArrayList<>();
|
||||
try(BufferedReader reader = new BufferedReader(
|
||||
new InputStreamReader(DartClientCodegen.class.getResourceAsStream("/dart/dart-keywords.txt"),
|
||||
StandardCharsets.UTF_8));
|
||||
StandardCharsets.UTF_8))) {
|
||||
while (reader.ready()) {
|
||||
reservedWordsList.add(reader.readLine());
|
||||
}
|
||||
reader.close();
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("Error reading dart keywords. Exception: {}", e.getMessage());
|
||||
}
|
||||
|
||||
@@ -20,6 +20,8 @@ import com.samskivert.mustache.Mustache;
|
||||
import com.samskivert.mustache.Template;
|
||||
import org.openapitools.codegen.api.TemplatingEngineAdapter;
|
||||
import org.openapitools.codegen.api.TemplatingExecutor;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.Reader;
|
||||
@@ -29,6 +31,8 @@ import java.util.Map;
|
||||
|
||||
public class MustacheEngineAdapter implements TemplatingEngineAdapter {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(TemplatingEngineAdapter.class);
|
||||
|
||||
/**
|
||||
* Provides an identifier used to load the adapter. This could be a name, uuid, or any other string.
|
||||
*
|
||||
@@ -64,9 +68,11 @@ public class MustacheEngineAdapter implements TemplatingEngineAdapter {
|
||||
@SuppressWarnings({"java:S108"}) // catch-all is expected, and is later thrown
|
||||
public Reader findTemplate(TemplatingExecutor generator, String name) {
|
||||
for (String extension : extensions) {
|
||||
final String templateName = name + "." + extension;
|
||||
try {
|
||||
return new StringReader(generator.getFullTemplateContents(name + "." + extension));
|
||||
} catch (Exception ignored) {
|
||||
return new StringReader(generator.getFullTemplateContents(templateName));
|
||||
} catch (Exception exception) {
|
||||
LOGGER.error("Failed to read full template {}, {}", templateName, exception.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -803,6 +803,20 @@ fail:
|
||||
|
||||
return {{classname}}_local_var;
|
||||
end:
|
||||
{{#vars}}
|
||||
{{^isContainer}}
|
||||
{{^isPrimitiveType}}
|
||||
{{#isModel}}
|
||||
{{^isEnum}}
|
||||
if ({{{name}}}_local_nonprim) {
|
||||
{{complexType}}_free({{{name}}}_local_nonprim);
|
||||
{{{name}}}_local_nonprim = NULL;
|
||||
}
|
||||
{{/isEnum}}
|
||||
{{/isModel}}
|
||||
{{/isPrimitiveType}}
|
||||
{{/isContainer}}
|
||||
{{/vars}}
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -150,30 +150,30 @@ ext {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
compile "com.google.code.findbugs:jsr305:3.0.2"
|
||||
compile "com.sun.jersey:jersey-client:$jersey_version"
|
||||
compile "com.sun.jersey.contribs:jersey-multipart:$jersey_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-core:$jackson_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version"
|
||||
compile "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version"
|
||||
implementation "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
implementation "com.google.code.findbugs:jsr305:3.0.2"
|
||||
implementation "com.sun.jersey:jersey-client:$jersey_version"
|
||||
implementation "com.sun.jersey.contribs:jersey-multipart:$jersey_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version"
|
||||
implementation "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version"
|
||||
{{#openApiNullable}}
|
||||
compile "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version"
|
||||
implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version"
|
||||
{{/openApiNullable}}
|
||||
{{#joda}}
|
||||
compile "com.fasterxml.jackson.datatype:jackson-datatype-joda:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.datatype:jackson-datatype-joda:$jackson_version"
|
||||
{{/joda}}
|
||||
{{#java8}}
|
||||
compile "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version"
|
||||
{{/java8}}
|
||||
{{#threetenbp}}
|
||||
compile "com.github.joschi.jackson:jackson-datatype-threetenbp:$jackson_threetenbp_version"
|
||||
implementation "com.github.joschi.jackson:jackson-datatype-threetenbp:$jackson_threetenbp_version"
|
||||
{{/threetenbp}}
|
||||
{{^java8}}
|
||||
compile "com.brsanthu:migbase64:2.2"
|
||||
implementation "com.brsanthu:migbase64:2.2"
|
||||
{{/java8}}
|
||||
compile 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
testCompile "junit:junit:$junit_version"
|
||||
implementation 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
testImplementation "junit:junit:$junit_version"
|
||||
}
|
||||
|
||||
|
||||
@@ -135,29 +135,29 @@ ext {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
compile "com.google.code.findbugs:jsr305:3.0.2"
|
||||
compile "io.github.openfeign:feign-core:$feign_version"
|
||||
compile "io.github.openfeign:feign-jackson:$feign_version"
|
||||
compile "io.github.openfeign:feign-slf4j:$feign_version"
|
||||
compile "io.github.openfeign.form:feign-form:$feign_form_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-core:$jackson_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version"
|
||||
implementation "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
implementation "com.google.code.findbugs:jsr305:3.0.2"
|
||||
implementation "io.github.openfeign:feign-core:$feign_version"
|
||||
implementation "io.github.openfeign:feign-jackson:$feign_version"
|
||||
implementation "io.github.openfeign:feign-slf4j:$feign_version"
|
||||
implementation "io.github.openfeign.form:feign-form:$feign_form_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version"
|
||||
{{#openApiNullable}}
|
||||
compile "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version"
|
||||
implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version"
|
||||
{{/openApiNullable}}
|
||||
{{#joda}}
|
||||
compile "com.fasterxml.jackson.datatype:jackson-datatype-joda:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.datatype:jackson-datatype-joda:$jackson_version"
|
||||
{{/joda}}
|
||||
{{#java8}}
|
||||
compile "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version"
|
||||
{{/java8}}
|
||||
{{#threetenbp}}
|
||||
compile "com.github.joschi.jackson:jackson-datatype-threetenbp:$jackson_threetenbp_version"
|
||||
implementation "com.github.joschi.jackson:jackson-datatype-threetenbp:$jackson_threetenbp_version"
|
||||
{{/threetenbp}}
|
||||
compile "org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:$oltu_version"
|
||||
compile "com.brsanthu:migbase64:2.2"
|
||||
compile 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
testCompile "junit:junit:$junit_version"
|
||||
implementation "org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:$oltu_version"
|
||||
implementation "com.brsanthu:migbase64:2.2"
|
||||
implementation 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
testImplementation "junit:junit:$junit_version"
|
||||
}
|
||||
|
||||
@@ -135,30 +135,30 @@ ext {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
compile "com.google.code.findbugs:jsr305:3.0.2"
|
||||
compile "com.google.api-client:google-api-client:${google_api_client_version}"
|
||||
compile "org.glassfish.jersey.core:jersey-common:${jersey_common_version}"
|
||||
compile "com.fasterxml.jackson.core:jackson-core:$jackson_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version"
|
||||
compile "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version"
|
||||
implementation "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
implementation "com.google.code.findbugs:jsr305:3.0.2"
|
||||
implementation "com.google.api-client:google-api-client:${google_api_client_version}"
|
||||
implementation "org.glassfish.jersey.core:jersey-common:${jersey_common_version}"
|
||||
implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version"
|
||||
implementation "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version"
|
||||
{{#openApiNullable}}
|
||||
compile "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version"
|
||||
implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version"
|
||||
{{/openApiNullable}}
|
||||
{{#java8}}
|
||||
compile "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version"
|
||||
{{/java8}}
|
||||
{{#joda}}
|
||||
compile "com.fasterxml.jackson.datatype:jackson-datatype-joda:$jackson_version"
|
||||
compile "joda-time:joda-time:$jodatime_version"
|
||||
implementation "com.fasterxml.jackson.datatype:jackson-datatype-joda:$jackson_version"
|
||||
implementation "joda-time:joda-time:$jodatime_version"
|
||||
{{/joda}}
|
||||
{{#threetenbp}}
|
||||
compile "com.github.joschi.jackson:jackson-datatype-threetenbp:$jackson_threeten_version"
|
||||
implementation "com.github.joschi.jackson:jackson-datatype-threetenbp:$jackson_threeten_version"
|
||||
{{/threetenbp}}
|
||||
{{#withXml}}
|
||||
compile "com.fasterxml.jackson.dataformat:jackson-dataformat-xml:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.dataformat:jackson-dataformat-xml:$jackson_version"
|
||||
{{/withXml}}
|
||||
compile 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
testCompile "junit:junit:$junit_version"
|
||||
implementation 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
testImplementation "junit:junit:$junit_version"
|
||||
}
|
||||
|
||||
@@ -145,43 +145,43 @@ ext {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
compile "com.google.code.findbugs:jsr305:3.0.2"
|
||||
compile "org.glassfish.jersey.core:jersey-client:$jersey_version"
|
||||
compile "org.glassfish.jersey.inject:jersey-hk2:$jersey_version"
|
||||
compile "org.glassfish.jersey.media:jersey-media-multipart:$jersey_version"
|
||||
compile "org.glassfish.jersey.media:jersey-media-json-jackson:$jersey_version"
|
||||
compile "org.glassfish.jersey.connectors:jersey-apache-connector:$jersey_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-core:$jackson_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version"
|
||||
implementation "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
implementation "com.google.code.findbugs:jsr305:3.0.2"
|
||||
implementation "org.glassfish.jersey.core:jersey-client:$jersey_version"
|
||||
implementation "org.glassfish.jersey.inject:jersey-hk2:$jersey_version"
|
||||
implementation "org.glassfish.jersey.media:jersey-media-multipart:$jersey_version"
|
||||
implementation "org.glassfish.jersey.media:jersey-media-json-jackson:$jersey_version"
|
||||
implementation "org.glassfish.jersey.connectors:jersey-apache-connector:$jersey_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version"
|
||||
{{#openApiNullable}}
|
||||
compile "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version"
|
||||
implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version"
|
||||
{{/openApiNullable}}
|
||||
{{#joda}}
|
||||
compile "com.fasterxml.jackson.datatype:jackson-datatype-joda:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.datatype:jackson-datatype-joda:$jackson_version"
|
||||
{{/joda}}
|
||||
{{#java8}}
|
||||
compile "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version"
|
||||
{{/java8}}
|
||||
{{#hasOAuthMethods}}
|
||||
compile "com.github.scribejava:scribejava-apis:$scribejava_apis_version"
|
||||
implementation "com.github.scribejava:scribejava-apis:$scribejava_apis_version"
|
||||
{{/hasOAuthMethods}}
|
||||
{{#hasHttpSignatureMethods}}
|
||||
compile "org.tomitribe:tomitribe-http-signatures:$tomitribe_http_signatures_version"
|
||||
implementation "org.tomitribe:tomitribe-http-signatures:$tomitribe_http_signatures_version"
|
||||
{{/hasHttpSignatureMethods}}
|
||||
{{#supportJava6}}
|
||||
compile "commons-io:commons-io:$commons_io_version"
|
||||
compile "org.apache.commons:commons-lang3:$commons_lang3_version"
|
||||
implementation "commons-io:commons-io:$commons_io_version"
|
||||
implementation "org.apache.commons:commons-lang3:$commons_lang3_version"
|
||||
{{/supportJava6}}
|
||||
{{#threetenbp}}
|
||||
compile "com.github.joschi.jackson:jackson-datatype-threetenbp:$threetenbp_version"
|
||||
implementation "com.github.joschi.jackson:jackson-datatype-threetenbp:$threetenbp_version"
|
||||
{{/threetenbp}}
|
||||
{{^java8}}
|
||||
compile "com.brsanthu:migbase64:2.2"
|
||||
implementation "com.brsanthu:migbase64:2.2"
|
||||
{{/java8}}
|
||||
compile 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
testCompile "junit:junit:$junit_version"
|
||||
implementation 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
testImplementation "junit:junit:$junit_version"
|
||||
}
|
||||
|
||||
javadoc {
|
||||
|
||||
@@ -60,17 +60,17 @@ ext {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
compile "com.google.code.findbugs:jsr305:3.0.2"
|
||||
compile "com.fasterxml.jackson.core:jackson-core:$jackson_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-databind:$jackson_version"
|
||||
compile "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version"
|
||||
compile "org.openapitools:jackson-databind-nullable:0.2.1"
|
||||
compile 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
compile "javax.ws.rs:javax.ws.rs-api:$ws_rs_version"
|
||||
implementation "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
implementation "com.google.code.findbugs:jsr305:3.0.2"
|
||||
implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version"
|
||||
implementation "org.openapitools:jackson-databind-nullable:0.2.1"
|
||||
implementation 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
implementation "javax.ws.rs:javax.ws.rs-api:$ws_rs_version"
|
||||
{{#threetenbp}}
|
||||
compile "com.github.joschi.jackson:jackson-datatype-threetenbp:$threetenbp_version"
|
||||
implementation "com.github.joschi.jackson:jackson-datatype-threetenbp:$threetenbp_version"
|
||||
{{/threetenbp}}
|
||||
testCompile "junit:junit:$junit_version"
|
||||
testImplementation "junit:junit:$junit_version"
|
||||
}
|
||||
|
||||
@@ -126,27 +126,27 @@ if(hasProperty('target') && target == 'android') {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile 'io.swagger:swagger-annotations:1.5.24'
|
||||
compile "com.google.code.findbugs:jsr305:3.0.2"
|
||||
compile 'com.squareup.okhttp3:okhttp:3.14.7'
|
||||
compile 'com.squareup.okhttp3:logging-interceptor:3.14.7'
|
||||
compile 'com.google.code.gson:gson:2.8.6'
|
||||
compile 'io.gsonfire:gson-fire:1.8.4'
|
||||
implementation 'io.swagger:swagger-annotations:1.5.24'
|
||||
implementation "com.google.code.findbugs:jsr305:3.0.2"
|
||||
implementation 'com.squareup.okhttp3:okhttp:3.14.7'
|
||||
implementation 'com.squareup.okhttp3:logging-interceptor:3.14.7'
|
||||
implementation 'com.google.code.gson:gson:2.8.6'
|
||||
implementation 'io.gsonfire:gson-fire:1.8.4'
|
||||
{{#hasOAuthMethods}}
|
||||
compile group: 'org.apache.oltu.oauth2', name: 'org.apache.oltu.oauth2.client', version: '1.0.1'
|
||||
implementation group: 'org.apache.oltu.oauth2', name: 'org.apache.oltu.oauth2.client', version: '1.0.1'
|
||||
{{/hasOAuthMethods}}
|
||||
compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.10'
|
||||
implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.10'
|
||||
{{#joda}}
|
||||
compile 'joda-time:joda-time:2.9.9'
|
||||
implementation 'joda-time:joda-time:2.9.9'
|
||||
{{/joda}}
|
||||
{{#threetenbp}}
|
||||
compile 'org.threeten:threetenbp:1.4.3'
|
||||
implementation 'org.threeten:threetenbp:1.4.3'
|
||||
{{/threetenbp}}
|
||||
{{#dynamicOperations}}
|
||||
compile 'io.swagger.parser.v3:swagger-parser-v3:2.0.23'
|
||||
implementation 'io.swagger.parser.v3:swagger-parser-v3:2.0.23'
|
||||
{{/dynamicOperations}}
|
||||
compile 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
testCompile 'junit:junit:4.13.1'
|
||||
implementation 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
testImplementation 'junit:junit:4.13.1'
|
||||
}
|
||||
|
||||
javadoc {
|
||||
|
||||
@@ -122,47 +122,47 @@ ext {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
compile "com.google.code.findbugs:jsr305:3.0.2"
|
||||
compile "io.rest-assured:rest-assured:$rest_assured_version"
|
||||
implementation "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
implementation "com.google.code.findbugs:jsr305:3.0.2"
|
||||
implementation "io.rest-assured:rest-assured:$rest_assured_version"
|
||||
{{#jackson}}
|
||||
compile "com.fasterxml.jackson.core:jackson-core:$jackson_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version"
|
||||
compile "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version"
|
||||
implementation "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version"
|
||||
{{#openApiNullable}}
|
||||
compile "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version"
|
||||
implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version"
|
||||
{{/openApiNullable}}
|
||||
{{#withXml}}
|
||||
compile "com.fasterxml.jackson.dataformat:jackson-dataformat-xml:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.dataformat:jackson-dataformat-xml:$jackson_version"
|
||||
{{/withXml}}
|
||||
{{#joda}}
|
||||
compile "com.fasterxml.jackson.datatype:jackson-datatype-joda:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.datatype:jackson-datatype-joda:$jackson_version"
|
||||
{{/joda}}
|
||||
{{#java8}}
|
||||
compile "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version"
|
||||
{{/java8}}
|
||||
{{#threetenbp}}
|
||||
compile "com.github.joschi.jackson:jackson-datatype-threetenbp:$jackson_threetenbp_version"
|
||||
implementation "com.github.joschi.jackson:jackson-datatype-threetenbp:$jackson_threetenbp_version"
|
||||
{{/threetenbp}}
|
||||
{{/jackson}}
|
||||
{{#gson}}
|
||||
compile "io.gsonfire:gson-fire:$gson_fire_version"
|
||||
compile 'com.google.code.gson:gson:$gson_version'
|
||||
implementation "io.gsonfire:gson-fire:$gson_fire_version"
|
||||
implementation 'com.google.code.gson:gson:$gson_version'
|
||||
{{/gson}}
|
||||
{{#joda}}
|
||||
compile "joda-time:joda-time:$jodatime_version"
|
||||
implementation "joda-time:joda-time:$jodatime_version"
|
||||
{{/joda}}
|
||||
{{#threetenbp}}
|
||||
compile "org.threeten:threetenbp:$threetenbp_version"
|
||||
implementation "org.threeten:threetenbp:$threetenbp_version"
|
||||
{{/threetenbp}}
|
||||
compile "com.squareup.okio:okio:$okio_version"
|
||||
implementation "com.squareup.okio:okio:$okio_version"
|
||||
{{#useBeanValidation}}
|
||||
compile "javax.validation:validation-api:2.0.1.Final"
|
||||
implementation "javax.validation:validation-api:2.0.1.Final"
|
||||
{{/useBeanValidation}}
|
||||
{{#performBeanValidation}}
|
||||
compile "org.hibernate:hibernate-validator:6.0.19.Final"
|
||||
implementation "org.hibernate:hibernate-validator:6.0.19.Final"
|
||||
{{/performBeanValidation}}
|
||||
compile 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
testCompile "junit:junit:$junit_version"
|
||||
implementation 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
testImplementation "junit:junit:$junit_version"
|
||||
}
|
||||
|
||||
@@ -137,30 +137,30 @@ ext {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
compile "com.google.code.findbugs:jsr305:3.0.2"
|
||||
compile "org.jboss.resteasy:resteasy-client:$resteasy_version"
|
||||
compile "org.jboss.resteasy:resteasy-multipart-provider:$resteasy_version"
|
||||
compile "org.jboss.resteasy:resteasy-jackson2-provider:$resteasy_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-core:$jackson_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version"
|
||||
compile "com.github.joschi.jackson:jackson-datatype-threetenbp:$threetenbp_version"
|
||||
implementation "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
implementation "com.google.code.findbugs:jsr305:3.0.2"
|
||||
implementation "org.jboss.resteasy:resteasy-client:$resteasy_version"
|
||||
implementation "org.jboss.resteasy:resteasy-multipart-provider:$resteasy_version"
|
||||
implementation "org.jboss.resteasy:resteasy-jackson2-provider:$resteasy_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version"
|
||||
implementation "com.github.joschi.jackson:jackson-datatype-threetenbp:$threetenbp_version"
|
||||
{{#openApiNullable}}
|
||||
compile "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version"
|
||||
implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version"
|
||||
{{/openApiNullable}}
|
||||
{{#java8}}
|
||||
compile "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version"
|
||||
{{/java8}}
|
||||
{{^java8}}
|
||||
compile "com.fasterxml.jackson.datatype:jackson-datatype-joda:$jackson_version"
|
||||
compile "joda-time:joda-time:$jodatime_version"
|
||||
compile "com.brsanthu:migbase64:2.2"
|
||||
implementation "com.fasterxml.jackson.datatype:jackson-datatype-joda:$jackson_version"
|
||||
implementation "joda-time:joda-time:$jodatime_version"
|
||||
implementation "com.brsanthu:migbase64:2.2"
|
||||
{{/java8}}
|
||||
{{#supportJava6}}
|
||||
compile "commons-io:commons-io:$commons_io_version"
|
||||
compile "org.apache.commons:commons-lang3:$commons_lang3_version"
|
||||
implementation "commons-io:commons-io:$commons_io_version"
|
||||
implementation "org.apache.commons:commons-lang3:$commons_lang3_version"
|
||||
{{/supportJava6}}
|
||||
compile 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
testCompile "junit:junit:$junit_version"
|
||||
implementation 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
testImplementation "junit:junit:$junit_version"
|
||||
}
|
||||
|
||||
@@ -134,30 +134,30 @@ ext {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
compile "com.google.code.findbugs:jsr305:3.0.2"
|
||||
compile "org.springframework:spring-web:$spring_web_version"
|
||||
compile "org.springframework:spring-context:$spring_web_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-core:$jackson_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version"
|
||||
compile "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version"
|
||||
implementation "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
implementation "com.google.code.findbugs:jsr305:3.0.2"
|
||||
implementation "org.springframework:spring-web:$spring_web_version"
|
||||
implementation "org.springframework:spring-context:$spring_web_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version"
|
||||
implementation "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version"
|
||||
{{#openApiNullable}}
|
||||
compile "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version"
|
||||
implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version"
|
||||
{{/openApiNullable}}
|
||||
{{#java8}}
|
||||
compile "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version"
|
||||
{{/java8}}
|
||||
{{#joda}}
|
||||
compile "com.fasterxml.jackson.datatype:jackson-datatype-joda:$jackson_version"
|
||||
compile "joda-time:joda-time:$jodatime_version"
|
||||
implementation "com.fasterxml.jackson.datatype:jackson-datatype-joda:$jackson_version"
|
||||
implementation "joda-time:joda-time:$jodatime_version"
|
||||
{{/joda}}
|
||||
{{#threetenbp}}
|
||||
compile "com.github.joschi.jackson:jackson-datatype-threetenbp:$jackson_threeten_version"
|
||||
implementation "com.github.joschi.jackson:jackson-datatype-threetenbp:$jackson_threeten_version"
|
||||
{{/threetenbp}}
|
||||
{{#withXml}}
|
||||
compile "com.fasterxml.jackson.dataformat:jackson-dataformat-xml:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.dataformat:jackson-dataformat-xml:$jackson_version"
|
||||
{{/withXml}}
|
||||
compile 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
testCompile "junit:junit:$junit_version"
|
||||
implementation 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
testImplementation "junit:junit:$junit_version"
|
||||
}
|
||||
|
||||
@@ -119,15 +119,15 @@ ext {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "com.squareup.okhttp:okhttp:$okhttp_version"
|
||||
compile "com.google.code.findbugs:jsr305:3.0.2"
|
||||
compile "com.squareup.retrofit:retrofit:$retrofit_version"
|
||||
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
compile "org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:$oltu_version"
|
||||
compile "joda-time:joda-time:$jodatime_version"
|
||||
implementation "com.squareup.okhttp:okhttp:$okhttp_version"
|
||||
implementation "com.google.code.findbugs:jsr305:3.0.2"
|
||||
implementation "com.squareup.retrofit:retrofit:$retrofit_version"
|
||||
implementation "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
implementation "org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:$oltu_version"
|
||||
implementation "joda-time:joda-time:$jodatime_version"
|
||||
{{#threetenbp}}
|
||||
compile "org.threeten:threetenbp:$threetenbp_version"
|
||||
implementation "org.threeten:threetenbp:$threetenbp_version"
|
||||
{{/threetenbp}}
|
||||
compile 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
testCompile "junit:junit:$junit_version"
|
||||
implementation 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
testImplementation "junit:junit:$junit_version"
|
||||
}
|
||||
|
||||
@@ -158,50 +158,50 @@ ext {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "com.squareup.retrofit2:retrofit:$retrofit_version"
|
||||
compile "com.squareup.retrofit2:converter-scalars:$retrofit_version"
|
||||
compile "com.squareup.retrofit2:converter-gson:$retrofit_version"
|
||||
implementation "com.squareup.retrofit2:retrofit:$retrofit_version"
|
||||
implementation "com.squareup.retrofit2:converter-scalars:$retrofit_version"
|
||||
implementation "com.squareup.retrofit2:converter-gson:$retrofit_version"
|
||||
{{#useRxJava}}
|
||||
compile "com.squareup.retrofit2:adapter-rxjava:$retrofit_version"
|
||||
compile "io.reactivex:rxjava:$rx_java_version"
|
||||
implementation "com.squareup.retrofit2:adapter-rxjava:$retrofit_version"
|
||||
implementation "io.reactivex:rxjava:$rx_java_version"
|
||||
{{/useRxJava}}
|
||||
{{#useRxJava2}}
|
||||
compile 'com.squareup.retrofit2:adapter-rxjava2:2.3.0'
|
||||
compile "io.reactivex.rxjava2:rxjava:$rx_java_version"
|
||||
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.3.0'
|
||||
implementation "io.reactivex.rxjava2:rxjava:$rx_java_version"
|
||||
{{/useRxJava2}}
|
||||
{{#useRxJava3}}
|
||||
compile 'com.github.akarnokd:rxjava3-retrofit-adapter:3.0.0'
|
||||
compile "io.reactivex.rxjava3:rxjava:$rx_java_version"
|
||||
implementation 'com.github.akarnokd:rxjava3-retrofit-adapter:3.0.0'
|
||||
implementation "io.reactivex.rxjava3:rxjava:$rx_java_version"
|
||||
{{/useRxJava3}}
|
||||
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
compile "com.google.code.findbugs:jsr305:3.0.2"
|
||||
compile ("org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:$oltu_version"){
|
||||
implementation "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
implementation "com.google.code.findbugs:jsr305:3.0.2"
|
||||
implementation ("org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:$oltu_version"){
|
||||
exclude group:'org.apache.oltu.oauth2' , module: 'org.apache.oltu.oauth2.common'
|
||||
}
|
||||
compile "io.gsonfire:gson-fire:$json_fire_version"
|
||||
implementation "io.gsonfire:gson-fire:$json_fire_version"
|
||||
{{#joda}}
|
||||
compile "joda-time:joda-time:$jodatime_version"
|
||||
implementation "joda-time:joda-time:$jodatime_version"
|
||||
{{/joda}}
|
||||
{{#threetenbp}}
|
||||
compile "org.threeten:threetenbp:$threetenbp_version"
|
||||
implementation "org.threeten:threetenbp:$threetenbp_version"
|
||||
{{/threetenbp}}
|
||||
{{#usePlayWS}}
|
||||
{{#play26}}
|
||||
compile "com.typesafe.play:play-ahc-ws_2.12:$play_version"
|
||||
compile "javax.validation:validation-api:1.1.0.Final"
|
||||
implementation "com.typesafe.play:play-ahc-ws_2.12:$play_version"
|
||||
implementation "javax.validation:validation-api:1.1.0.Final"
|
||||
{{/play26}}
|
||||
{{^play26}}
|
||||
compile "com.typesafe.play:play-java-ws_2.11:$play_version"
|
||||
implementation "com.typesafe.play:play-java-ws_2.11:$play_version"
|
||||
{{/play26}}
|
||||
compile "com.squareup.retrofit2:converter-jackson:$retrofit_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-core:$jackson_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version"
|
||||
implementation "com.squareup.retrofit2:converter-jackson:$retrofit_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version"
|
||||
{{#openApiNullable}}
|
||||
compile "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version"
|
||||
implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version"
|
||||
{{/openApiNullable}}
|
||||
compile "com.fasterxml.jackson.datatype:jackson-datatype-{{^java8}}joda{{/java8}}{{#java8}}jsr310{{/java8}}:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.datatype:jackson-datatype-{{^java8}}joda{{/java8}}{{#java8}}jsr310{{/java8}}:$jackson_version"
|
||||
{{/usePlayWS}}
|
||||
compile 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
testCompile "junit:junit:$junit_version"
|
||||
implementation 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
testImplementation "junit:junit:$junit_version"
|
||||
}
|
||||
|
||||
@@ -41,26 +41,26 @@ ext {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
compile "com.google.code.findbugs:jsr305:3.0.2"
|
||||
compile "io.vertx:vertx-web-client:$vertx_version"
|
||||
compile "io.vertx:vertx-rx-java:$vertx_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-core:$jackson_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version"
|
||||
implementation "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
implementation "com.google.code.findbugs:jsr305:3.0.2"
|
||||
implementation "io.vertx:vertx-web-client:$vertx_version"
|
||||
implementation "io.vertx:vertx-rx-java:$vertx_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version"
|
||||
{{#joda}}
|
||||
compile "com.fasterxml.jackson.datatype:jackson-datatype-joda:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.datatype:jackson-datatype-joda:$jackson_version"
|
||||
{{/joda}}
|
||||
{{#java8}}
|
||||
compile "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version"
|
||||
{{/java8}}
|
||||
{{#threetenbp}}
|
||||
compile "com.github.joschi.jackson:jackson-datatype-threetenbp:jackson_threeten_version"
|
||||
implementation "com.github.joschi.jackson:jackson-datatype-threetenbp:jackson_threeten_version"
|
||||
{{/threetenbp}}
|
||||
{{#openApiNullable}}
|
||||
compile "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version"
|
||||
implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version"
|
||||
{{/openApiNullable}}
|
||||
compile 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
testCompile "junit:junit:$junit_version"
|
||||
testCompile "io.vertx:vertx-unit:$vertx_version"
|
||||
implementation 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
testImplementation "junit:junit:$junit_version"
|
||||
testImplementation "io.vertx:vertx-unit:$vertx_version"
|
||||
}
|
||||
|
||||
@@ -150,28 +150,28 @@ ext {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
compile "com.google.code.findbugs:jsr305:3.0.2"
|
||||
compile "io.projectreactor:reactor-core:$reactor_version"
|
||||
compile "org.springframework:spring-webflux:$spring_web_version"
|
||||
compile "io.projectreactor.ipc:reactor-netty:$reactor_netty_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-core:$jackson_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version"
|
||||
compile "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version"
|
||||
implementation "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
implementation "com.google.code.findbugs:jsr305:3.0.2"
|
||||
implementation "io.projectreactor:reactor-core:$reactor_version"
|
||||
implementation "org.springframework:spring-webflux:$spring_web_version"
|
||||
implementation "io.projectreactor.ipc:reactor-netty:$reactor_netty_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version"
|
||||
implementation "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version"
|
||||
{{#openApiNullable}}
|
||||
compile "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version"
|
||||
implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version"
|
||||
{{/openApiNullable}}
|
||||
{{#joda}}
|
||||
compile "joda-time:joda-time:$jodatime_version"
|
||||
implementation "joda-time:joda-time:$jodatime_version"
|
||||
{{/joda}}
|
||||
{{#java8}}
|
||||
compile "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version"
|
||||
{{/java8}}
|
||||
{{^java8}}
|
||||
compile "com.brsanthu:migbase64:2.2"
|
||||
implementation "com.brsanthu:migbase64:2.2"
|
||||
{{/java8}}
|
||||
compile "javax.annotation:javax.annotation-api:$javax_annotation_version"
|
||||
testCompile "junit:junit:$junit_version"
|
||||
implementation "javax.annotation:javax.annotation-api:$javax_annotation_version"
|
||||
testImplementation "junit:junit:$junit_version"
|
||||
}
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ type {{classname}} interface {
|
||||
* {{nickname}}Execute executes the request{{#returnType}}
|
||||
* @return {{{.}}}{{/returnType}}
|
||||
*/
|
||||
{{nickname}}Execute(r {{#structPrefix}}{{&classname}}{{/structPrefix}}Api{{operationId}}Request) ({{#returnType}}{{{.}}}, {{/returnType}}*_nethttp.Response, GenericOpenAPIError)
|
||||
{{nickname}}Execute(r {{#structPrefix}}{{&classname}}{{/structPrefix}}Api{{operationId}}Request) ({{#returnType}}{{{.}}}, {{/returnType}}*_nethttp.Response, error)
|
||||
{{/operation}}
|
||||
}
|
||||
{{/generateInterfaces}}
|
||||
@@ -61,7 +61,7 @@ func (r {{#structPrefix}}{{&classname}}{{/structPrefix}}Api{{operationId}}Reques
|
||||
return r
|
||||
}{{/isPathParam}}{{/allParams}}
|
||||
|
||||
func (r {{#structPrefix}}{{&classname}}{{/structPrefix}}Api{{operationId}}Request) Execute() ({{#returnType}}{{{.}}}, {{/returnType}}*_nethttp.Response, GenericOpenAPIError) {
|
||||
func (r {{#structPrefix}}{{&classname}}{{/structPrefix}}Api{{operationId}}Request) Execute() ({{#returnType}}{{{.}}}, {{/returnType}}*_nethttp.Response, error) {
|
||||
return r.ApiService.{{nickname}}Execute(r)
|
||||
}
|
||||
|
||||
@@ -86,14 +86,13 @@ func (a *{{{classname}}}Service) {{{nickname}}}(ctx _context.Context{{#pathParam
|
||||
* Execute executes the request{{#returnType}}
|
||||
* @return {{{.}}}{{/returnType}}
|
||||
*/
|
||||
func (a *{{{classname}}}Service) {{nickname}}Execute(r {{#structPrefix}}{{&classname}}{{/structPrefix}}Api{{operationId}}Request) ({{#returnType}}{{{.}}}, {{/returnType}}*_nethttp.Response, GenericOpenAPIError) {
|
||||
func (a *{{{classname}}}Service) {{nickname}}Execute(r {{#structPrefix}}{{&classname}}{{/structPrefix}}Api{{operationId}}Request) ({{#returnType}}{{{.}}}, {{/returnType}}*_nethttp.Response, error) {
|
||||
var (
|
||||
localVarHTTPMethod = _nethttp.Method{{httpMethod}}
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
executionError GenericOpenAPIError
|
||||
{{#returnType}}
|
||||
localVarReturnValue {{{.}}}
|
||||
{{/returnType}}
|
||||
@@ -101,8 +100,7 @@ func (a *{{{classname}}}Service) {{nickname}}Execute(r {{#structPrefix}}{{&class
|
||||
|
||||
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "{{{classname}}}Service.{{{nickname}}}")
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return {{#returnType}}localVarReturnValue, {{/returnType}}nil, executionError
|
||||
return {{#returnType}}localVarReturnValue, {{/returnType}}nil, GenericOpenAPIError{error: err.Error()}
|
||||
}
|
||||
|
||||
localVarPath := localBasePath + "{{{path}}}"{{#pathParams}}
|
||||
@@ -115,32 +113,27 @@ func (a *{{{classname}}}Service) {{nickname}}Execute(r {{#structPrefix}}{{&class
|
||||
{{#required}}
|
||||
{{^isPathParam}}
|
||||
if r.{{paramName}} == nil {
|
||||
executionError.error = "{{paramName}} is required and must be specified"
|
||||
return {{#returnType}}localVarReturnValue, {{/returnType}}nil, executionError
|
||||
return {{#returnType}}localVarReturnValue, {{/returnType}}nil, reportError("{{paramName}} is required and must be specified")
|
||||
}
|
||||
{{/isPathParam}}
|
||||
{{#minItems}}
|
||||
if len({{^isPathParam}}*{{/isPathParam}}r.{{paramName}}) < {{minItems}} {
|
||||
executionError.error = "{{paramName}} must have at least {{minItems}} elements"
|
||||
return {{#returnType}}localVarReturnValue, {{/returnType}}nil, executionError
|
||||
return {{#returnType}}localVarReturnValue, {{/returnType}}nil, reportError("{{paramName}} must have at least {{minItems}} elements")
|
||||
}
|
||||
{{/minItems}}
|
||||
{{#maxItems}}
|
||||
if len({{^isPathParam}}*{{/isPathParam}}r.{{paramName}}) > {{maxItems}} {
|
||||
executionError.error = "{{paramName}} must have less than {{maxItems}} elements"
|
||||
return {{#returnType}}localVarReturnValue, {{/returnType}}nil, executionError
|
||||
return {{#returnType}}localVarReturnValue, {{/returnType}}nil, reportError("{{paramName}} must have less than {{maxItems}} elements")
|
||||
}
|
||||
{{/maxItems}}
|
||||
{{#minLength}}
|
||||
if strlen({{^isPathParam}}*{{/isPathParam}}r.{{paramName}}) < {{minLength}} {
|
||||
executionError.error = "{{paramName}} must have at least {{minLength}} elements"
|
||||
return {{#returnType}}localVarReturnValue, {{/returnType}}nil, executionError
|
||||
return {{#returnType}}localVarReturnValue, {{/returnType}}nil, reportError("{{paramName}} must have at least {{minLength}} elements")
|
||||
}
|
||||
{{/minLength}}
|
||||
{{#maxLength}}
|
||||
if strlen({{^isPathParam}}*{{/isPathParam}}r.{{paramName}}) > {{maxLength}} {
|
||||
executionError.error = "{{paramName}} must have less than {{maxLength}} elements"
|
||||
return {{#returnType}}localVarReturnValue, {{/returnType}}nil, executionError
|
||||
return {{#returnType}}localVarReturnValue, {{/returnType}}nil, reportError("{{paramName}} must have less than {{maxLength}} elements")
|
||||
}
|
||||
{{/maxLength}}
|
||||
{{#minimum}}
|
||||
@@ -151,8 +144,7 @@ func (a *{{{classname}}}Service) {{nickname}}Execute(r {{#structPrefix}}{{&class
|
||||
{{^isString}}
|
||||
if {{^isPathParam}}*{{/isPathParam}}r.{{paramName}} < {{minimum}} {
|
||||
{{/isString}}
|
||||
executionError.error = "{{paramName}} must be greater than {{minimum}}"
|
||||
return {{#returnType}}localVarReturnValue, {{/returnType}}nil, executionError
|
||||
return {{#returnType}}localVarReturnValue, {{/returnType}}nil, reportError("{{paramName}} must be greater than {{minimum}}")
|
||||
}
|
||||
{{/minimum}}
|
||||
{{#maximum}}
|
||||
@@ -163,8 +155,7 @@ func (a *{{{classname}}}Service) {{nickname}}Execute(r {{#structPrefix}}{{&class
|
||||
{{^isString}}
|
||||
if {{^isPathParam}}*{{/isPathParam}}r.{{paramName}} > {{maximum}} {
|
||||
{{/isString}}
|
||||
executionError.error = "{{paramName}} must be less than {{maximum}}"
|
||||
return {{#returnType}}localVarReturnValue, {{/returnType}}nil, executionError
|
||||
return {{#returnType}}localVarReturnValue, {{/returnType}}nil, reportError("{{paramName}} must be less than {{maximum}}")
|
||||
}
|
||||
{{/maximum}}
|
||||
{{/required}}
|
||||
@@ -267,8 +258,7 @@ func (a *{{{classname}}}Service) {{nickname}}Execute(r {{#structPrefix}}{{&class
|
||||
if r.{{paramName}} != nil {
|
||||
paramJson, err := parameterToJson(*r.{{paramName}})
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return {{#returnType}}localVarReturnValue, {{/returnType}}nil, executionError
|
||||
return {{#returnType}}localVarReturnValue, {{/returnType}}nil, err
|
||||
}
|
||||
localVarFormParams.Add("{{baseName}}", paramJson)
|
||||
}
|
||||
@@ -323,22 +313,19 @@ func (a *{{{classname}}}Service) {{nickname}}Execute(r {{#structPrefix}}{{&class
|
||||
{{/authMethods}}
|
||||
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return {{#returnType}}localVarReturnValue, {{/returnType}}nil, executionError
|
||||
return {{#returnType}}localVarReturnValue, {{/returnType}}nil, err
|
||||
}
|
||||
|
||||
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||
if err != nil || localVarHTTPResponse == nil {
|
||||
executionError.error = err.Error()
|
||||
return {{#returnType}}localVarReturnValue, {{/returnType}}localVarHTTPResponse, executionError
|
||||
return {{#returnType}}localVarReturnValue, {{/returnType}}localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
|
||||
localVarHTTPResponse.Body.Close()
|
||||
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return {{#returnType}}localVarReturnValue, {{/returnType}}localVarHTTPResponse, executionError
|
||||
return {{#returnType}}localVarReturnValue, {{/returnType}}localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
if localVarHTTPResponse.StatusCode >= 300 {
|
||||
@@ -384,7 +371,7 @@ func (a *{{{classname}}}Service) {{nickname}}Execute(r {{#structPrefix}}{{&class
|
||||
}
|
||||
|
||||
{{/returnType}}
|
||||
return {{#returnType}}localVarReturnValue, {{/returnType}}localVarHTTPResponse, executionError
|
||||
return {{#returnType}}localVarReturnValue, {{/returnType}}localVarHTTPResponse, nil
|
||||
}
|
||||
{{/operation}}
|
||||
{{/operations}}
|
||||
|
||||
@@ -43,7 +43,7 @@ func main() {
|
||||
configuration := {{goImportAlias}}.NewConfiguration()
|
||||
api_client := {{goImportAlias}}.NewAPIClient(configuration)
|
||||
resp, r, err := api_client.{{classname}}.{{operationId}}(context.Background(){{#pathParams}}, {{paramName}}{{/pathParams}}){{#allParams}}{{^isPathParam}}.{{vendorExtensions.x-export-param-name}}({{paramName}}){{/isPathParam}}{{/allParams}}.Execute()
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `{{classname}}.{{operationId}}``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ Use specific imports for apis and models like:
|
||||
- `from {{{packageName}}}.api.default_api import DefaultApi`
|
||||
- `from {{{packageName}}}.model.pet import Pet`
|
||||
|
||||
Solution 1:
|
||||
Solution 2:
|
||||
Before importing the package, adjust the maximum recursion limit as shown below:
|
||||
```
|
||||
import sys
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import re # noqa: F401
|
||||
import sys # noqa: F401
|
||||
|
||||
from {{packageName}}.api_client import ApiClient, Endpoint
|
||||
from {{packageName}}.api_client import ApiClient, Endpoint as _Endpoint
|
||||
from {{packageName}}.model_utils import ( # noqa: F401
|
||||
check_allowed_values,
|
||||
check_validations,
|
||||
@@ -125,7 +125,7 @@ class {{classname}}(object):
|
||||
{{/requiredParams}}
|
||||
return self.call_with_http_info(**kwargs)
|
||||
|
||||
self.{{operationId}} = Endpoint(
|
||||
self.{{operationId}} = _Endpoint(
|
||||
settings={
|
||||
'response_type': {{#returnType}}({{{returnType}}},){{/returnType}}{{^returnType}}None{{/returnType}},
|
||||
{{#authMethods}}
|
||||
|
||||
@@ -199,8 +199,6 @@ class ApiClient(object):
|
||||
e.body = e.body.decode('utf-8')
|
||||
raise e
|
||||
|
||||
content_type = response_data.getheader('content-type')
|
||||
|
||||
self.last_response = response_data
|
||||
|
||||
return_data = response_data
|
||||
@@ -214,15 +212,17 @@ class ApiClient(object):
|
||||
{{/tornado}}
|
||||
return return_data
|
||||
|
||||
if response_type not in ["file", "bytes"]:
|
||||
match = None
|
||||
if content_type is not None:
|
||||
match = re.search(r"charset=([a-zA-Z\-\d]+)[\s\;]?", content_type)
|
||||
encoding = match.group(1) if match else "utf-8"
|
||||
response_data.data = response_data.data.decode(encoding)
|
||||
|
||||
# deserialize response data
|
||||
if response_type:
|
||||
if response_type != (file_type,):
|
||||
encoding = "utf-8"
|
||||
content_type = response_data.getheader('content-type')
|
||||
if content_type is not None:
|
||||
match = re.search(r"charset=([a-zA-Z\-\d]+)[\s\;]?", content_type)
|
||||
if match:
|
||||
encoding = match.group(1)
|
||||
response_data.data = response_data.data.decode(encoding)
|
||||
|
||||
return_data = self.deserialize(
|
||||
response_data,
|
||||
response_type,
|
||||
@@ -268,7 +268,7 @@ class ApiClient(object):
|
||||
|
||||
@classmethod
|
||||
def sanitize_for_serialization(cls, obj):
|
||||
"""Builds a JSON POST object.
|
||||
"""Prepares data for transmission before it is sent with the rest client
|
||||
If obj is None, return None.
|
||||
If obj is str, int, long, float, bool, return directly.
|
||||
If obj is datetime.datetime, datetime.date
|
||||
@@ -276,6 +276,7 @@ class ApiClient(object):
|
||||
If obj is list, sanitize each element in the list.
|
||||
If obj is dict, return the dict.
|
||||
If obj is OpenAPI model, return the properties dict.
|
||||
If obj is io.IOBase, return the bytes
|
||||
:param obj: The data to serialize.
|
||||
:return: The serialized form of data.
|
||||
"""
|
||||
@@ -283,6 +284,8 @@ class ApiClient(object):
|
||||
return {
|
||||
key: cls.sanitize_for_serialization(val) for key, val in model_to_dict(obj, serialize=True).items()
|
||||
}
|
||||
elif isinstance(obj, io.IOBase):
|
||||
return cls.get_file_data_and_close_file(obj)
|
||||
elif isinstance(obj, (str, int, float, none_type, bool)):
|
||||
return obj
|
||||
elif isinstance(obj, (datetime, date)):
|
||||
@@ -526,6 +529,12 @@ class ApiClient(object):
|
||||
new_params.append((k, v))
|
||||
return new_params
|
||||
|
||||
@staticmethod
|
||||
def get_file_data_and_close_file(file_instance: io.IOBase) -> bytes:
|
||||
file_data = file_instance.read()
|
||||
file_instance.close()
|
||||
return file_data
|
||||
|
||||
def files_parameters(self, files: typing.Optional[typing.Dict[str, typing.List[io.IOBase]]] = None):
|
||||
"""Builds form parameters.
|
||||
|
||||
@@ -551,12 +560,11 @@ class ApiClient(object):
|
||||
"for %s must be open." % param_name
|
||||
)
|
||||
filename = os.path.basename(file_instance.name)
|
||||
filedata = file_instance.read()
|
||||
filedata = self.get_file_data_and_close_file(file_instance)
|
||||
mimetype = (mimetypes.guess_type(filename)[0] or
|
||||
'application/octet-stream')
|
||||
params.append(
|
||||
tuple([param_name, tuple([filename, filedata, mimetype])]))
|
||||
file_instance.close()
|
||||
|
||||
return params
|
||||
|
||||
|
||||
@@ -1211,10 +1211,13 @@ def model_to_dict(model_instance, serialize=True):
|
||||
# exist in attribute_map
|
||||
attr = model_instance.attribute_map.get(attr, attr)
|
||||
if isinstance(value, list):
|
||||
result[attr] = list(map(
|
||||
lambda x: model_to_dict(x, serialize=serialize)
|
||||
if hasattr(x, '_data_store') else x, value
|
||||
))
|
||||
if not value or isinstance(value[0], PRIMITIVE_TYPES):
|
||||
# empty list or primitive types
|
||||
result[attr] = value
|
||||
elif isinstance(value[0], ModelSimple):
|
||||
result[attr] = [x.value for x in value]
|
||||
else:
|
||||
result[attr] = [model_to_dict(x, serialize=serialize) for x in value]
|
||||
elif isinstance(value, dict):
|
||||
result[attr] = dict(map(
|
||||
lambda item: (item[0],
|
||||
|
||||
@@ -25,7 +25,7 @@ class {{classname}}(baseUrl: String) {
|
||||
.method(Method.{{httpMethod.toUpperCase}}, uri"$baseUrl{{{path}}}{{#queryParams.0}}?{{#queryParams}}{{baseName}}=${ {{{paramName}}} }{{^-last}}&{{/-last}}{{/queryParams}}{{/queryParams.0}}{{#isApiKey}}{{#isKeyInQuery}}{{^queryParams.0}}?{{/queryParams.0}}{{#queryParams.0}}&{{/queryParams.0}}{{keyParamName}}=${apiKey.value}&{{/isKeyInQuery}}{{/isApiKey}}")
|
||||
.contentType({{#consumes.0}}"{{{mediaType}}}"{{/consumes.0}}{{^consumes}}"application/json"{{/consumes}}){{#headerParams}}
|
||||
.header({{>paramCreation}}){{/headerParams}}{{#authMethods}}{{#isBasic}}{{#isBasicBasic}}
|
||||
.auth.withCredentials(username, password){{/isBasicBasic}}{{#isBasicBearer}}
|
||||
.auth.basic(username, password){{/isBasicBasic}}{{#isBasicBearer}}
|
||||
.auth.bearer(bearerToken){{/isBasicBearer}}{{/isBasic}}{{#isApiKey}}{{#isKeyInHeader}}
|
||||
.header("{{keyParamName}}", apiKey){{/isKeyInHeader}}{{#isKeyInCookie}}
|
||||
.cookie("{{keyParamName}}", apiKey){{/isKeyInCookie}}{{/isApiKey}}{{/authMethods}}{{#formParams.0}}{{^isMultipart}}
|
||||
|
||||
@@ -8,7 +8,7 @@ import Foundation
|
||||
|
||||
{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} struct APIHelper {
|
||||
{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static func rejectNil(_ source: [String: Any?]) -> [String: Any]? {
|
||||
let destination = source.reduce(into: [String: Any]()) { (result, item) in
|
||||
let destination = source.reduce(into: [String: Any]()) { result, item in
|
||||
if let value = item.value {
|
||||
result[item.key] = value
|
||||
}
|
||||
@@ -21,7 +21,7 @@ import Foundation
|
||||
}
|
||||
|
||||
{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static func rejectNilHeaders(_ source: [String: Any?]) -> [String: String] {
|
||||
return source.reduce(into: [String: String]()) { (result, item) in
|
||||
return source.reduce(into: [String: String]()) { result, item in
|
||||
if let collection = item.value as? [Any?] {
|
||||
result[item.key] = collection.filter { $0 != nil }.map { "\($0!)" }.joined(separator: ",")
|
||||
} else if let value: Any = item.value {
|
||||
@@ -35,27 +35,27 @@ import Foundation
|
||||
return nil
|
||||
}
|
||||
|
||||
return source.reduce(into: [String: Any](), { (result, item) in
|
||||
return source.reduce(into: [String: Any]()) { result, item in
|
||||
switch item.value {
|
||||
case let x as Bool:
|
||||
result[item.key] = x.description
|
||||
default:
|
||||
result[item.key] = item.value
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static func mapValueToPathItem(_ source: Any) -> Any {
|
||||
if let collection = source as? [Any?] {
|
||||
return collection.filter { $0 != nil }.map {"\($0!)"}.joined(separator: ",")
|
||||
return collection.filter { $0 != nil }.map { "\($0!)" }.joined(separator: ",")
|
||||
}
|
||||
return source
|
||||
}
|
||||
|
||||
{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static func mapValuesToQueryItems(_ source: [String: Any?]) -> [URLQueryItem]? {
|
||||
let destination = source.filter({ $0.value != nil}).reduce(into: [URLQueryItem]()) { (result, item) in
|
||||
let destination = source.filter { $0.value != nil }.reduce(into: [URLQueryItem]()) { result, item in
|
||||
if let collection = item.value as? [Any?] {
|
||||
collection.filter { $0 != nil }.map {"\($0!)"}.forEach { value in
|
||||
collection.filter { $0 != nil }.map { "\($0!)" }.forEach { value in
|
||||
result.append(URLQueryItem(name: item.key, value: value))
|
||||
}
|
||||
} else if let value = item.value {
|
||||
|
||||
@@ -52,7 +52,7 @@ import Foundation
|
||||
}
|
||||
|
||||
{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} func addCredential() -> Self {
|
||||
self.credential = {{projectName}}API.credential
|
||||
credential = {{projectName}}API.credential
|
||||
return self
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,41 +8,42 @@
|
||||
import Foundation
|
||||
|
||||
{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class CodableHelper {
|
||||
|
||||
private static var customDateFormatter: DateFormatter?
|
||||
private static var defaultDateFormatter: DateFormatter = OpenISO8601DateFormatter()
|
||||
|
||||
private static var customJSONDecoder: JSONDecoder?
|
||||
private static var defaultJSONDecoder: JSONDecoder = {
|
||||
let decoder = JSONDecoder()
|
||||
decoder.dateDecodingStrategy = .formatted(CodableHelper.dateFormatter)
|
||||
return decoder
|
||||
}()
|
||||
|
||||
private static var customJSONEncoder: JSONEncoder?
|
||||
private static var defaultJSONEncoder: JSONEncoder = {
|
||||
let encoder = JSONEncoder()
|
||||
let encoder = JSONEncoder()
|
||||
encoder.dateEncodingStrategy = .formatted(CodableHelper.dateFormatter)
|
||||
encoder.outputFormatting = .prettyPrinted
|
||||
return encoder
|
||||
}()
|
||||
|
||||
{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static var dateFormatter: DateFormatter {
|
||||
get { return self.customDateFormatter ?? self.defaultDateFormatter }
|
||||
set { self.customDateFormatter = newValue }
|
||||
get { return customDateFormatter ?? defaultDateFormatter }
|
||||
set { customDateFormatter = newValue }
|
||||
}
|
||||
{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static var jsonDecoder: JSONDecoder {
|
||||
get { return self.customJSONDecoder ?? self.defaultJSONDecoder }
|
||||
set { self.customJSONDecoder = newValue }
|
||||
get { return customJSONDecoder ?? defaultJSONDecoder }
|
||||
set { customJSONDecoder = newValue }
|
||||
}
|
||||
{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static var jsonEncoder: JSONEncoder {
|
||||
get { return self.customJSONEncoder ?? self.defaultJSONEncoder }
|
||||
set { self.customJSONEncoder = newValue }
|
||||
get { return customJSONEncoder ?? defaultJSONEncoder }
|
||||
set { customJSONEncoder = newValue }
|
||||
}
|
||||
|
||||
{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class func decode<T>(_ type: T.Type, from data: Data) -> Swift.Result<T, Error> where T: Decodable {
|
||||
return Swift.Result { try self.jsonDecoder.decode(type, from: data) }
|
||||
return Swift.Result { try jsonDecoder.decode(type, from: data) }
|
||||
}
|
||||
|
||||
{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class func encode<T>(_ value: T) -> Swift.Result<Data, Error> where T: Encodable {
|
||||
return Swift.Result { try self.jsonEncoder.encode(value) }
|
||||
return Swift.Result { try jsonEncoder.encode(value) }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,10 +7,8 @@
|
||||
import Foundation
|
||||
|
||||
{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class Configuration {
|
||||
|
||||
// This value is used to configure the date formatter that is used to serialize dates into JSON format.
|
||||
// You must set it prior to encoding any dates, and it will only be read once.
|
||||
@available(*, unavailable, message: "To set a different date format, use CodableHelper.dateFormatter instead.")
|
||||
// This value is used to configure the date formatter that is used to serialize dates into JSON format.
|
||||
// You must set it prior to encoding any dates, and it will only be read once.
|
||||
@available(*, unavailable, message: "To set a different date format, use CodableHelper.dateFormatter instead.")
|
||||
{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static var dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ"
|
||||
|
||||
}
|
||||
|
||||
@@ -8,13 +8,14 @@ let package = Package(
|
||||
.iOS(.v9),
|
||||
.macOS(.v10_11),
|
||||
.tvOS(.v9),
|
||||
.watchOS(.v3)
|
||||
.watchOS(.v3),
|
||||
],
|
||||
products: [
|
||||
// Products define the executables and libraries produced by a package, and make them visible to other packages.
|
||||
.library(
|
||||
name: "{{projectName}}",
|
||||
targets: ["{{projectName}}"]),
|
||||
targets: ["{{projectName}}"]
|
||||
),
|
||||
],
|
||||
dependencies: [
|
||||
// Dependencies declare other packages that this package depends on.
|
||||
|
||||
@@ -117,14 +117,14 @@ private var managerStore = SynchronizedDictionary<String, Alamofire.SessionManag
|
||||
fatalError("Unprocessable value \(v) with key \(k)")
|
||||
}
|
||||
}
|
||||
}, to: URLString, method: xMethod, headers: nil, encodingCompletion: { encodingResult in
|
||||
}, to: URLString, method: xMethod, headers: nil, encodingCompletion: { encodingResult in
|
||||
switch encodingResult {
|
||||
case .success(let upload, _, _):
|
||||
case let .success(upload, _, _):
|
||||
if let onProgressReady = self.onProgressReady {
|
||||
onProgressReady(upload.uploadProgress)
|
||||
}
|
||||
self.processRequest(request: upload, managerId, apiResponseQueue, completion)
|
||||
case .failure(let encodingError):
|
||||
case let .failure(encodingError):
|
||||
apiResponseQueue.async {
|
||||
completion(.failure(ErrorResponse.error(415, nil, nil, encodingError)))
|
||||
}
|
||||
@@ -159,7 +159,7 @@ private var managerStore = SynchronizedDictionary<String, Alamofire.SessionManag
|
||||
|
||||
switch T.self {
|
||||
case is String.Type:
|
||||
validatedRequest.responseString(queue: apiResponseQueue, completionHandler: { (stringResponse) in
|
||||
validatedRequest.responseString(queue: apiResponseQueue, completionHandler: { stringResponse in
|
||||
cleanupRequest()
|
||||
|
||||
switch stringResponse.result {
|
||||
@@ -171,7 +171,7 @@ private var managerStore = SynchronizedDictionary<String, Alamofire.SessionManag
|
||||
|
||||
})
|
||||
case is URL.Type:
|
||||
validatedRequest.responseData(queue: apiResponseQueue, completionHandler: { (dataResponse) in
|
||||
validatedRequest.responseData(queue: apiResponseQueue, completionHandler: { dataResponse in
|
||||
cleanupRequest()
|
||||
|
||||
do {
|
||||
@@ -209,13 +209,13 @@ private var managerStore = SynchronizedDictionary<String, Alamofire.SessionManag
|
||||
|
||||
} catch let requestParserError as DownloadException {
|
||||
completion(.failure(ErrorResponse.error(400, dataResponse.data, dataResponse.response, requestParserError)))
|
||||
} catch let error {
|
||||
} catch {
|
||||
completion(.failure(ErrorResponse.error(400, dataResponse.data, dataResponse.response, error)))
|
||||
}
|
||||
return
|
||||
})
|
||||
case is Void.Type:
|
||||
validatedRequest.responseData(queue: apiResponseQueue, completionHandler: { (voidResponse) in
|
||||
validatedRequest.responseData(queue: apiResponseQueue, completionHandler: { voidResponse in
|
||||
cleanupRequest()
|
||||
|
||||
switch voidResponse.result {
|
||||
@@ -227,7 +227,7 @@ private var managerStore = SynchronizedDictionary<String, Alamofire.SessionManag
|
||||
|
||||
})
|
||||
default:
|
||||
validatedRequest.responseData(queue: apiResponseQueue, completionHandler: { (dataResponse) in
|
||||
validatedRequest.responseData(queue: apiResponseQueue, completionHandler: { dataResponse in
|
||||
cleanupRequest()
|
||||
|
||||
switch dataResponse.result {
|
||||
@@ -243,7 +243,7 @@ private var managerStore = SynchronizedDictionary<String, Alamofire.SessionManag
|
||||
|
||||
{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} func buildHeaders() -> [String: String] {
|
||||
var httpHeaders = SessionManager.defaultHTTPHeaders
|
||||
for (key, value) in self.headers {
|
||||
for (key, value) in headers {
|
||||
httpHeaders[key] = value
|
||||
}
|
||||
return httpHeaders
|
||||
@@ -317,7 +317,7 @@ private var managerStore = SynchronizedDictionary<String, Alamofire.SessionManag
|
||||
|
||||
switch T.self {
|
||||
case is String.Type:
|
||||
validatedRequest.responseString(queue: apiResponseQueue, completionHandler: { (stringResponse) in
|
||||
validatedRequest.responseString(queue: apiResponseQueue, completionHandler: { stringResponse in
|
||||
cleanupRequest()
|
||||
|
||||
switch stringResponse.result {
|
||||
@@ -329,7 +329,7 @@ private var managerStore = SynchronizedDictionary<String, Alamofire.SessionManag
|
||||
|
||||
})
|
||||
case is Void.Type:
|
||||
validatedRequest.responseData(queue: apiResponseQueue, completionHandler: { (voidResponse) in
|
||||
validatedRequest.responseData(queue: apiResponseQueue, completionHandler: { voidResponse in
|
||||
cleanupRequest()
|
||||
|
||||
switch voidResponse.result {
|
||||
@@ -341,7 +341,7 @@ private var managerStore = SynchronizedDictionary<String, Alamofire.SessionManag
|
||||
|
||||
})
|
||||
case is Data.Type:
|
||||
validatedRequest.responseData(queue: apiResponseQueue, completionHandler: { (dataResponse) in
|
||||
validatedRequest.responseData(queue: apiResponseQueue, completionHandler: { dataResponse in
|
||||
cleanupRequest()
|
||||
|
||||
switch dataResponse.result {
|
||||
@@ -402,6 +402,6 @@ extension JSONDataEncoding: ParameterEncoding {
|
||||
public func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest {
|
||||
let urlRequest = try urlRequest.asURLRequest()
|
||||
|
||||
return self.encode(urlRequest, with: parameters)
|
||||
return encode(urlRequest, with: parameters)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -209,11 +209,11 @@ private var urlSessionStore = SynchronizedDictionary<String, URLSession>()
|
||||
|
||||
let fileManager = FileManager.default
|
||||
let documentsDirectory = fileManager.urls(for: .documentDirectory, in: .userDomainMask)[0]
|
||||
let requestURL = try self.getURL(from: urlRequest)
|
||||
let requestURL = try getURL(from: urlRequest)
|
||||
|
||||
var requestPath = try self.getPath(from: requestURL)
|
||||
var requestPath = try getPath(from: requestURL)
|
||||
|
||||
if let headerFileName = self.getFileName(fromContentDisposition: httpResponse.allHeaderFields["Content-Disposition"] as? String) {
|
||||
if let headerFileName = getFileName(fromContentDisposition: httpResponse.allHeaderFields["Content-Disposition"] as? String) {
|
||||
requestPath = requestPath.appending("/\(headerFileName)")
|
||||
}
|
||||
|
||||
@@ -227,7 +227,7 @@ private var urlSessionStore = SynchronizedDictionary<String, URLSession>()
|
||||
|
||||
} catch let requestParserError as DownloadException {
|
||||
completion(.failure(ErrorResponse.error(400, data, response, requestParserError)))
|
||||
} catch let error {
|
||||
} catch {
|
||||
completion(.failure(ErrorResponse.error(400, data, response, error)))
|
||||
}
|
||||
|
||||
@@ -244,7 +244,7 @@ private var urlSessionStore = SynchronizedDictionary<String, URLSession>()
|
||||
|
||||
{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} func buildHeaders() -> [String: String] {
|
||||
var httpHeaders: [String: String] = [:]
|
||||
for (key, value) in self.headers {
|
||||
for (key, value) in headers {
|
||||
httpHeaders[key] = value
|
||||
}
|
||||
for (key, value) in {{projectName}}API.customHeaders {
|
||||
@@ -390,13 +390,13 @@ private class SessionDelegate: NSObject, URLSessionDelegate, URLSessionDataDeleg
|
||||
|
||||
{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} enum HTTPMethod: String {
|
||||
case options = "OPTIONS"
|
||||
case get = "GET"
|
||||
case head = "HEAD"
|
||||
case post = "POST"
|
||||
case put = "PUT"
|
||||
case patch = "PATCH"
|
||||
case delete = "DELETE"
|
||||
case trace = "TRACE"
|
||||
case get = "GET"
|
||||
case head = "HEAD"
|
||||
case post = "POST"
|
||||
case put = "PUT"
|
||||
case patch = "PATCH"
|
||||
case delete = "DELETE"
|
||||
case trace = "TRACE"
|
||||
case connect = "CONNECT"
|
||||
}
|
||||
|
||||
@@ -499,7 +499,7 @@ private class FormDataEncoding: ParameterEncoding {
|
||||
|
||||
let fileData = try Data(contentsOf: fileURL)
|
||||
|
||||
let mimetype = self.contentTypeForFormPart(fileURL) ?? mimeType(for: fileURL)
|
||||
let mimetype = contentTypeForFormPart(fileURL) ?? mimeType(for: fileURL)
|
||||
|
||||
let fileName = fileURL.lastPathComponent
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import { {{classname}} } from '../model/models';
|
||||
{{/imports}}
|
||||
|
||||
|
||||
import { Configuration } from '../configuration';
|
||||
import { {{configurationClassName}} } from '../configuration';
|
||||
|
||||
{{#operations}}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
"prepublishOnly": "npm run build"
|
||||
},
|
||||
"dependencies": {
|
||||
"axios": "^0.19.2"
|
||||
"axios": "^0.21.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^12.11.5",
|
||||
|
||||
@@ -2557,6 +2557,23 @@ public class DefaultCodegenTest {
|
||||
assertEquals(cm.isString, false);
|
||||
assertEquals(cm.isDate, true);
|
||||
|
||||
modelName = "NullModel";
|
||||
sc = openAPI.getComponents().getSchemas().get(modelName);
|
||||
cm = codegen.fromModel(modelName, sc);
|
||||
assertEquals(cm.isNull, true);
|
||||
|
||||
modelName = "ObjectWithTypeNullProperties";
|
||||
sc = openAPI.getComponents().getSchemas().get(modelName);
|
||||
cm = codegen.fromModel(modelName, sc);
|
||||
assertEquals(cm.getVars().get(0).isNull, true);
|
||||
assertEquals(cm.getVars().get(1).getItems().isNull, true);
|
||||
assertEquals(cm.getAdditionalProperties().isNull, true);
|
||||
|
||||
modelName = "ArrayOfNulls";
|
||||
sc = openAPI.getComponents().getSchemas().get(modelName);
|
||||
cm = codegen.fromModel(modelName, sc);
|
||||
assertEquals(cm.getItems().isNull, true);
|
||||
|
||||
modelName = "ObjectWithDateWithValidation";
|
||||
sc = openAPI.getComponents().getSchemas().get(modelName);
|
||||
cm = codegen.fromModel(modelName, sc);
|
||||
@@ -2618,6 +2635,20 @@ public class DefaultCodegenTest {
|
||||
assertEquals(co.bodyParams.get(0).isDateTime, true);
|
||||
assertEquals(co.responses.get(0).isString, false);
|
||||
assertEquals(co.responses.get(0).isDateTime, true);
|
||||
|
||||
path = "/null/{param}";
|
||||
operation = openAPI.getPaths().get(path).getPost();
|
||||
co = codegen.fromOperation(path, "POST", operation, null);
|
||||
assertEquals(co.pathParams.get(0).isNull, true);
|
||||
assertEquals(co.bodyParams.get(0).isNull, true);
|
||||
assertEquals(co.responses.get(0).isNull, true);
|
||||
|
||||
path = "/ref_null/{param}";
|
||||
operation = openAPI.getPaths().get(path).getPost();
|
||||
co = codegen.fromOperation(path, "POST", operation, null);
|
||||
assertEquals(co.pathParams.get(0).isNull, true);
|
||||
assertEquals(co.bodyParams.get(0).isNull, true);
|
||||
assertEquals(co.responses.get(0).isNull, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -248,4 +248,4 @@ public class TemplateManagerTest {
|
||||
target.toFile().delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,7 +68,9 @@ public class DartClientCodegenTest {
|
||||
List<String> reservedWordsList = new ArrayList<String>();
|
||||
try {
|
||||
BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream("src/main/resources/dart/dart-keywords.txt"), Charset.forName("UTF-8")));
|
||||
while(reader.ready()) { reservedWordsList.add(reader.readLine()); }
|
||||
while(reader.ready()) {
|
||||
reservedWordsList.add(reader.readLine());
|
||||
}
|
||||
reader.close();
|
||||
} catch (Exception e) {
|
||||
String errorString = String.format(Locale.ROOT, "Error reading dart keywords: %s", e);
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
package org.openapitools.codegen.python;
|
||||
|
||||
import com.google.common.collect.Sets;
|
||||
import com.sun.org.apache.xpath.internal.operations.Bool;
|
||||
import io.swagger.v3.oas.models.OpenAPI;
|
||||
import io.swagger.v3.oas.models.Operation;
|
||||
import io.swagger.v3.oas.models.media.*;
|
||||
|
||||
@@ -133,24 +133,24 @@ ext {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
compile "org.glassfish.jersey.core:jersey-client:$jersey_version"
|
||||
compile "org.glassfish.jersey.media:jersey-media-multipart:$jersey_version"
|
||||
compile "org.glassfish.jersey.media:jersey-media-json-jackson:$jersey_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-core:$jackson_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-databind:$jackson_version"
|
||||
implementation "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
implementation "org.glassfish.jersey.core:jersey-client:$jersey_version"
|
||||
implementation "org.glassfish.jersey.media:jersey-media-multipart:$jersey_version"
|
||||
implementation "org.glassfish.jersey.media:jersey-media-json-jackson:$jersey_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_version"
|
||||
{{#java8}}
|
||||
compile "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version"
|
||||
{{/java8}}
|
||||
{{^java8}}
|
||||
compile "com.fasterxml.jackson.datatype:jackson-datatype-joda:$jackson_version"
|
||||
compile "joda-time:joda-time:$jodatime_version"
|
||||
compile "com.brsanthu:migbase64:2.2"
|
||||
implementation "com.fasterxml.jackson.datatype:jackson-datatype-joda:$jackson_version"
|
||||
implementation "joda-time:joda-time:$jodatime_version"
|
||||
implementation "com.brsanthu:migbase64:2.2"
|
||||
{{/java8}}
|
||||
{{#supportJava6}}
|
||||
compile "commons-io:commons-io:$commons_io_version"
|
||||
compile "org.apache.commons:commons-lang3:$commons_lang3_version"
|
||||
implementation "commons-io:commons-io:$commons_io_version"
|
||||
implementation "org.apache.commons:commons-lang3:$commons_lang3_version"
|
||||
{{/supportJava6}}
|
||||
testCompile "junit:junit:$junit_version"
|
||||
testImplementation "junit:junit:$junit_version"
|
||||
}
|
||||
|
||||
@@ -120,8 +120,73 @@ paths:
|
||||
type: string
|
||||
format: date-time
|
||||
pattern: '^2020.*'
|
||||
/null/{param}:
|
||||
post:
|
||||
tags:
|
||||
- isX
|
||||
operationId: null
|
||||
parameters:
|
||||
- name: param
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: 'null'
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: 'null'
|
||||
required: true
|
||||
responses:
|
||||
200:
|
||||
description: success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: 'null'
|
||||
/ref_null/{param}:
|
||||
post:
|
||||
tags:
|
||||
- isX
|
||||
operationId: null
|
||||
parameters:
|
||||
- name: param
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/components/schemas/NullModel'
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/NullModel'
|
||||
required: true
|
||||
responses:
|
||||
200:
|
||||
description: success
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/NullModel'
|
||||
components:
|
||||
schemas:
|
||||
NullModel:
|
||||
type: 'null'
|
||||
ObjectWithTypeNullProperties:
|
||||
type: object
|
||||
properties:
|
||||
nullProp:
|
||||
type: 'null'
|
||||
listOfNulls:
|
||||
type: array
|
||||
items:
|
||||
type: 'null'
|
||||
additionalProperties:
|
||||
type: 'null'
|
||||
ArrayOfNulls:
|
||||
type: array
|
||||
items:
|
||||
type: 'null'
|
||||
DateWithValidation:
|
||||
type: string
|
||||
format: date
|
||||
|
||||
@@ -16,6 +16,8 @@ tags:
|
||||
description: Access to Petstore orders
|
||||
- name: user
|
||||
description: Operations about user
|
||||
- name: fake
|
||||
description: Fake api used for feature testing
|
||||
paths:
|
||||
/foo:
|
||||
get:
|
||||
@@ -246,45 +248,6 @@ paths:
|
||||
- petstore_auth:
|
||||
- 'write:pets'
|
||||
- 'read:pets'
|
||||
'/pet/{petId}/uploadImage':
|
||||
post:
|
||||
tags:
|
||||
- pet
|
||||
summary: uploads an image
|
||||
description: ''
|
||||
operationId: uploadFile
|
||||
parameters:
|
||||
- name: petId
|
||||
in: path
|
||||
description: ID of pet to update
|
||||
required: true
|
||||
schema:
|
||||
type: integer
|
||||
format: int64
|
||||
responses:
|
||||
'200':
|
||||
description: successful operation
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ApiResponse'
|
||||
security:
|
||||
- petstore_auth:
|
||||
- 'write:pets'
|
||||
- 'read:pets'
|
||||
requestBody:
|
||||
content:
|
||||
multipart/form-data:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
additionalMetadata:
|
||||
description: Additional data to pass to server
|
||||
type: string
|
||||
file:
|
||||
description: file to upload
|
||||
type: string
|
||||
format: binary
|
||||
/store/inventory:
|
||||
get:
|
||||
tags:
|
||||
@@ -1008,6 +971,26 @@ paths:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ArrayOfEnums'
|
||||
/fake/refs/enum-test:
|
||||
post:
|
||||
tags:
|
||||
- fake
|
||||
summary: Object contains enum properties and array properties containing enums
|
||||
operationId: EnumTest
|
||||
requestBody:
|
||||
description: Input object
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Enum_Test'
|
||||
required: false
|
||||
responses:
|
||||
200:
|
||||
description: Got object containing enums
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Enum_Test'
|
||||
/fake/additional-properties-with-array-of-enums:
|
||||
get:
|
||||
tags:
|
||||
@@ -1176,21 +1159,41 @@ paths:
|
||||
responses:
|
||||
"200":
|
||||
description: Success
|
||||
'/fake/{petId}/uploadImageWithRequiredFile':
|
||||
post:
|
||||
/{fileName}:
|
||||
get:
|
||||
servers:
|
||||
- url: http://www.jtricks.com
|
||||
tags:
|
||||
- pet
|
||||
summary: uploads an image (required)
|
||||
description: ''
|
||||
operationId: uploadFileWithRequiredFile
|
||||
- fake
|
||||
summary: downloads a file using Content-Disposition
|
||||
operationId: downloadAttachment
|
||||
parameters:
|
||||
- name: petId
|
||||
- name: fileName
|
||||
in: path
|
||||
description: ID of pet to update
|
||||
description: file name
|
||||
required: true
|
||||
schema:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
responses:
|
||||
200:
|
||||
description: successful operation
|
||||
content:
|
||||
'text/plain':
|
||||
schema:
|
||||
type: string
|
||||
format: binary
|
||||
headers:
|
||||
Content-Disposition:
|
||||
schema:
|
||||
type: string
|
||||
description: "describes the received file. Looks like: 'attachment; filename=fileName.txt'"
|
||||
/fake/uploadFile:
|
||||
post:
|
||||
tags:
|
||||
- fake
|
||||
summary: uploads a file using multipart/form-data
|
||||
description: ''
|
||||
operationId: uploadFile
|
||||
responses:
|
||||
'200':
|
||||
description: successful operation
|
||||
@@ -1198,10 +1201,6 @@ paths:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ApiResponse'
|
||||
security:
|
||||
- petstore_auth:
|
||||
- 'write:pets'
|
||||
- 'read:pets'
|
||||
requestBody:
|
||||
content:
|
||||
multipart/form-data:
|
||||
@@ -1211,12 +1210,61 @@ paths:
|
||||
additionalMetadata:
|
||||
description: Additional data to pass to server
|
||||
type: string
|
||||
requiredFile:
|
||||
file:
|
||||
description: file to upload
|
||||
type: string
|
||||
format: binary
|
||||
required:
|
||||
- requiredFile
|
||||
- file
|
||||
/fake/uploadFiles:
|
||||
post:
|
||||
tags:
|
||||
- fake
|
||||
summary: uploads files using multipart/form-data
|
||||
description: ''
|
||||
operationId: uploadFiles
|
||||
responses:
|
||||
'200':
|
||||
description: successful operation
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ApiResponse'
|
||||
requestBody:
|
||||
content:
|
||||
multipart/form-data:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
files:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
format: binary
|
||||
/fake/uploadDownloadFile:
|
||||
post:
|
||||
tags:
|
||||
- fake
|
||||
summary: uploads a file and downloads a file using application/octet-stream
|
||||
description: ''
|
||||
operationId: uploadDownloadFile
|
||||
responses:
|
||||
'200':
|
||||
description: successful operation
|
||||
content:
|
||||
application/octet-stream:
|
||||
schema:
|
||||
type: string
|
||||
format: binary
|
||||
description: file to download
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/octet-stream:
|
||||
schema:
|
||||
type: string
|
||||
format: binary
|
||||
description: file to upload
|
||||
/fake/health:
|
||||
get:
|
||||
tags:
|
||||
@@ -1671,6 +1719,12 @@ components:
|
||||
$ref: '#/components/schemas/IntegerEnumWithDefaultValue'
|
||||
IntegerEnumOneValue:
|
||||
$ref: '#/components/schemas/IntegerEnumOneValue'
|
||||
InlineArrayOfStrEnum:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/StringEnum'
|
||||
ArrayOfStrEnum:
|
||||
$ref: '#/components/schemas/ArrayOfEnums'
|
||||
AdditionalPropertiesClass:
|
||||
type: object
|
||||
properties:
|
||||
|
||||
2
pom.xml
2
pom.xml
@@ -1189,7 +1189,7 @@
|
||||
<module>samples/server/petstore/php-slim4</module>
|
||||
<module>samples/server/petstore/php-laravel</module>
|
||||
<module>samples/server/petstore/php-lumen</module>
|
||||
<module>samples/server/petstore/rust-server</module>
|
||||
<!--<module>samples/server/petstore/rust-server</module>-->
|
||||
<!-- clients -->
|
||||
<!--<module>samples/client/petstore/perl</module>
|
||||
<module>samples/client/petstore/bash</module>-->
|
||||
|
||||
@@ -1 +1 @@
|
||||
5.0.0-SNAPSHOT
|
||||
5.0.1-SNAPSHOT
|
||||
@@ -264,6 +264,10 @@ pet_t *pet_parseFromJSON(cJSON *petJSON){
|
||||
|
||||
return pet_local_var;
|
||||
end:
|
||||
if (category_local_nonprim) {
|
||||
category_free(category_local_nonprim);
|
||||
category_local_nonprim = NULL;
|
||||
}
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ func TestOAuth2(t *testing.T) {
|
||||
|
||||
r, err := client.PetApi.AddPet(context.Background()).Body(newPet).Execute()
|
||||
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
t.Fatalf("Error while adding pet: %v", err)
|
||||
}
|
||||
if r.StatusCode != 200 {
|
||||
@@ -52,7 +52,7 @@ func TestOAuth2(t *testing.T) {
|
||||
|
||||
r, err = client.PetApi.DeletePet(auth, 12992).Execute()
|
||||
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
t.Fatalf("Error while deleting pet by id: %v", err)
|
||||
}
|
||||
if r.StatusCode != 200 {
|
||||
@@ -78,7 +78,7 @@ func TestBasicAuth(t *testing.T) {
|
||||
|
||||
r, err := client.PetApi.AddPet(auth).Body(newPet).Execute()
|
||||
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
t.Fatalf("Error while adding pet: %v", err)
|
||||
}
|
||||
if r.StatusCode != 200 {
|
||||
@@ -87,7 +87,7 @@ func TestBasicAuth(t *testing.T) {
|
||||
|
||||
r, err = client.PetApi.DeletePet(auth, 12992).Execute()
|
||||
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
t.Fatalf("Error while deleting pet by id: %v", err)
|
||||
}
|
||||
if r.StatusCode != 200 {
|
||||
@@ -108,7 +108,7 @@ func TestAccessToken(t *testing.T) {
|
||||
|
||||
r, err := client.PetApi.AddPet(nil).Body(newPet).Execute()
|
||||
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
t.Fatalf("Error while adding pet: %v", err)
|
||||
}
|
||||
if r.StatusCode != 200 {
|
||||
@@ -117,7 +117,7 @@ func TestAccessToken(t *testing.T) {
|
||||
|
||||
r, err = client.PetApi.DeletePet(auth, 12992).Execute()
|
||||
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
t.Fatalf("Error while deleting pet by id: %v", err)
|
||||
}
|
||||
if r.StatusCode != 200 {
|
||||
@@ -138,7 +138,7 @@ func TestAPIKeyNoPrefix(t *testing.T) {
|
||||
|
||||
r, err := client.PetApi.AddPet(context.Background()).Body(newPet).Execute()
|
||||
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
t.Fatalf("Error while adding pet: %v", err)
|
||||
}
|
||||
if r.StatusCode != 200 {
|
||||
@@ -146,7 +146,7 @@ func TestAPIKeyNoPrefix(t *testing.T) {
|
||||
}
|
||||
|
||||
_, r, err = client.PetApi.GetPetById(auth, 12992).Execute()
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
t.Fatalf("Error while deleting pet by id: %v", err)
|
||||
}
|
||||
|
||||
@@ -156,7 +156,7 @@ func TestAPIKeyNoPrefix(t *testing.T) {
|
||||
}
|
||||
|
||||
r, err = client.PetApi.DeletePet(auth, 12992).Execute()
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
t.Fatalf("Error while deleting pet by id: %v", err)
|
||||
}
|
||||
if r.StatusCode != 200 {
|
||||
@@ -173,7 +173,7 @@ func TestAPIKeyWithPrefix(t *testing.T) {
|
||||
|
||||
r, err := client.PetApi.AddPet(nil).Body(newPet).Execute()
|
||||
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
t.Fatalf("Error while adding pet: %v", err)
|
||||
}
|
||||
if r.StatusCode != 200 {
|
||||
@@ -181,7 +181,7 @@ func TestAPIKeyWithPrefix(t *testing.T) {
|
||||
}
|
||||
|
||||
_, r, err = client.PetApi.GetPetById(auth, 12992).Execute()
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
t.Fatalf("Error while deleting pet by id: %v", err)
|
||||
}
|
||||
|
||||
@@ -191,7 +191,7 @@ func TestAPIKeyWithPrefix(t *testing.T) {
|
||||
}
|
||||
|
||||
r, err = client.PetApi.DeletePet(auth, 12992).Execute()
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
t.Fatalf("Error while deleting pet by id: %v", err)
|
||||
}
|
||||
if r.StatusCode != 200 {
|
||||
@@ -206,7 +206,7 @@ func TestDefaultHeader(t *testing.T) {
|
||||
|
||||
r, err := client.PetApi.AddPet(context.Background()).Body(newPet).Execute()
|
||||
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
t.Fatalf("Error while adding pet: %v", err)
|
||||
}
|
||||
if r.StatusCode != 200 {
|
||||
@@ -215,7 +215,7 @@ func TestDefaultHeader(t *testing.T) {
|
||||
|
||||
r, err = client.PetApi.DeletePet(context.Background(), 12992).Execute()
|
||||
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
t.Fatalf("Error while deleting pet by id: %v", err)
|
||||
}
|
||||
if r.StatusCode != 200 {
|
||||
@@ -230,7 +230,7 @@ func TestDefaultHeader(t *testing.T) {
|
||||
func TestHostOverride(t *testing.T) {
|
||||
_, r, err := client.PetApi.FindPetsByStatus(context.Background()).Status(nil).Execute()
|
||||
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
t.Fatalf("Error while finding pets by status: %v", err)
|
||||
}
|
||||
|
||||
@@ -242,7 +242,7 @@ func TestHostOverride(t *testing.T) {
|
||||
func TestSchemeOverride(t *testing.T) {
|
||||
_, r, err := client.PetApi.FindPetsByStatus(context.Background()).Status(nil).Execute()
|
||||
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
t.Fatalf("Error while finding pets by status: %v", err)
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ func TestPutBodyWithFileSchema(t *testing.T) {
|
||||
|
||||
r, err := client.FakeApi.TestBodyWithFileSchema(context.Background()).Body(schema).Execute()
|
||||
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
t.Fatalf("Error while adding pet: %v", err)
|
||||
}
|
||||
if r.StatusCode != 200 {
|
||||
|
||||
@@ -37,7 +37,7 @@ type AnotherFakeApi interface {
|
||||
* Call123TestSpecialTagsExecute executes the request
|
||||
* @return Client
|
||||
*/
|
||||
Call123TestSpecialTagsExecute(r ApiCall123TestSpecialTagsRequest) (Client, *_nethttp.Response, GenericOpenAPIError)
|
||||
Call123TestSpecialTagsExecute(r ApiCall123TestSpecialTagsRequest) (Client, *_nethttp.Response, error)
|
||||
}
|
||||
|
||||
// AnotherFakeApiService AnotherFakeApi service
|
||||
@@ -54,7 +54,7 @@ func (r ApiCall123TestSpecialTagsRequest) Body(body Client) ApiCall123TestSpecia
|
||||
return r
|
||||
}
|
||||
|
||||
func (r ApiCall123TestSpecialTagsRequest) Execute() (Client, *_nethttp.Response, GenericOpenAPIError) {
|
||||
func (r ApiCall123TestSpecialTagsRequest) Execute() (Client, *_nethttp.Response, error) {
|
||||
return r.ApiService.Call123TestSpecialTagsExecute(r)
|
||||
}
|
||||
|
||||
@@ -75,21 +75,19 @@ func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx _context.Context) Api
|
||||
* Execute executes the request
|
||||
* @return Client
|
||||
*/
|
||||
func (a *AnotherFakeApiService) Call123TestSpecialTagsExecute(r ApiCall123TestSpecialTagsRequest) (Client, *_nethttp.Response, GenericOpenAPIError) {
|
||||
func (a *AnotherFakeApiService) Call123TestSpecialTagsExecute(r ApiCall123TestSpecialTagsRequest) (Client, *_nethttp.Response, error) {
|
||||
var (
|
||||
localVarHTTPMethod = _nethttp.MethodPatch
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
executionError GenericOpenAPIError
|
||||
localVarReturnValue Client
|
||||
)
|
||||
|
||||
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AnotherFakeApiService.Call123TestSpecialTags")
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarReturnValue, nil, executionError
|
||||
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
|
||||
}
|
||||
|
||||
localVarPath := localBasePath + "/another-fake/dummy"
|
||||
@@ -98,8 +96,7 @@ func (a *AnotherFakeApiService) Call123TestSpecialTagsExecute(r ApiCall123TestSp
|
||||
localVarQueryParams := _neturl.Values{}
|
||||
localVarFormParams := _neturl.Values{}
|
||||
if r.body == nil {
|
||||
executionError.error = "body is required and must be specified"
|
||||
return localVarReturnValue, nil, executionError
|
||||
return localVarReturnValue, nil, reportError("body is required and must be specified")
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
@@ -123,22 +120,19 @@ func (a *AnotherFakeApiService) Call123TestSpecialTagsExecute(r ApiCall123TestSp
|
||||
localVarPostBody = r.body
|
||||
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarReturnValue, nil, executionError
|
||||
return localVarReturnValue, nil, err
|
||||
}
|
||||
|
||||
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||
if err != nil || localVarHTTPResponse == nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarReturnValue, localVarHTTPResponse, executionError
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
|
||||
localVarHTTPResponse.Body.Close()
|
||||
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarReturnValue, localVarHTTPResponse, executionError
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
if localVarHTTPResponse.StatusCode >= 300 {
|
||||
@@ -158,5 +152,5 @@ func (a *AnotherFakeApiService) Call123TestSpecialTagsExecute(r ApiCall123TestSp
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
return localVarReturnValue, localVarHTTPResponse, executionError
|
||||
return localVarReturnValue, localVarHTTPResponse, nil
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -37,7 +37,7 @@ type FakeClassnameTags123Api interface {
|
||||
* TestClassnameExecute executes the request
|
||||
* @return Client
|
||||
*/
|
||||
TestClassnameExecute(r ApiTestClassnameRequest) (Client, *_nethttp.Response, GenericOpenAPIError)
|
||||
TestClassnameExecute(r ApiTestClassnameRequest) (Client, *_nethttp.Response, error)
|
||||
}
|
||||
|
||||
// FakeClassnameTags123ApiService FakeClassnameTags123Api service
|
||||
@@ -54,7 +54,7 @@ func (r ApiTestClassnameRequest) Body(body Client) ApiTestClassnameRequest {
|
||||
return r
|
||||
}
|
||||
|
||||
func (r ApiTestClassnameRequest) Execute() (Client, *_nethttp.Response, GenericOpenAPIError) {
|
||||
func (r ApiTestClassnameRequest) Execute() (Client, *_nethttp.Response, error) {
|
||||
return r.ApiService.TestClassnameExecute(r)
|
||||
}
|
||||
|
||||
@@ -75,21 +75,19 @@ func (a *FakeClassnameTags123ApiService) TestClassname(ctx _context.Context) Api
|
||||
* Execute executes the request
|
||||
* @return Client
|
||||
*/
|
||||
func (a *FakeClassnameTags123ApiService) TestClassnameExecute(r ApiTestClassnameRequest) (Client, *_nethttp.Response, GenericOpenAPIError) {
|
||||
func (a *FakeClassnameTags123ApiService) TestClassnameExecute(r ApiTestClassnameRequest) (Client, *_nethttp.Response, error) {
|
||||
var (
|
||||
localVarHTTPMethod = _nethttp.MethodPatch
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
executionError GenericOpenAPIError
|
||||
localVarReturnValue Client
|
||||
)
|
||||
|
||||
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeClassnameTags123ApiService.TestClassname")
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarReturnValue, nil, executionError
|
||||
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
|
||||
}
|
||||
|
||||
localVarPath := localBasePath + "/fake_classname_test"
|
||||
@@ -98,8 +96,7 @@ func (a *FakeClassnameTags123ApiService) TestClassnameExecute(r ApiTestClassname
|
||||
localVarQueryParams := _neturl.Values{}
|
||||
localVarFormParams := _neturl.Values{}
|
||||
if r.body == nil {
|
||||
executionError.error = "body is required and must be specified"
|
||||
return localVarReturnValue, nil, executionError
|
||||
return localVarReturnValue, nil, reportError("body is required and must be specified")
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
@@ -137,22 +134,19 @@ func (a *FakeClassnameTags123ApiService) TestClassnameExecute(r ApiTestClassname
|
||||
}
|
||||
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarReturnValue, nil, executionError
|
||||
return localVarReturnValue, nil, err
|
||||
}
|
||||
|
||||
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||
if err != nil || localVarHTTPResponse == nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarReturnValue, localVarHTTPResponse, executionError
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
|
||||
localVarHTTPResponse.Body.Close()
|
||||
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarReturnValue, localVarHTTPResponse, executionError
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
if localVarHTTPResponse.StatusCode >= 300 {
|
||||
@@ -172,5 +166,5 @@ func (a *FakeClassnameTags123ApiService) TestClassnameExecute(r ApiTestClassname
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
return localVarReturnValue, localVarHTTPResponse, executionError
|
||||
return localVarReturnValue, localVarHTTPResponse, nil
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ type PetApi interface {
|
||||
/*
|
||||
* AddPetExecute executes the request
|
||||
*/
|
||||
AddPetExecute(r ApiAddPetRequest) (*_nethttp.Response, GenericOpenAPIError)
|
||||
AddPetExecute(r ApiAddPetRequest) (*_nethttp.Response, error)
|
||||
|
||||
/*
|
||||
* DeletePet Deletes a pet
|
||||
@@ -50,7 +50,7 @@ type PetApi interface {
|
||||
/*
|
||||
* DeletePetExecute executes the request
|
||||
*/
|
||||
DeletePetExecute(r ApiDeletePetRequest) (*_nethttp.Response, GenericOpenAPIError)
|
||||
DeletePetExecute(r ApiDeletePetRequest) (*_nethttp.Response, error)
|
||||
|
||||
/*
|
||||
* FindPetsByStatus Finds Pets by status
|
||||
@@ -64,7 +64,7 @@ type PetApi interface {
|
||||
* FindPetsByStatusExecute executes the request
|
||||
* @return []Pet
|
||||
*/
|
||||
FindPetsByStatusExecute(r ApiFindPetsByStatusRequest) ([]Pet, *_nethttp.Response, GenericOpenAPIError)
|
||||
FindPetsByStatusExecute(r ApiFindPetsByStatusRequest) ([]Pet, *_nethttp.Response, error)
|
||||
|
||||
/*
|
||||
* FindPetsByTags Finds Pets by tags
|
||||
@@ -78,7 +78,7 @@ type PetApi interface {
|
||||
* FindPetsByTagsExecute executes the request
|
||||
* @return []Pet
|
||||
*/
|
||||
FindPetsByTagsExecute(r ApiFindPetsByTagsRequest) ([]Pet, *_nethttp.Response, GenericOpenAPIError)
|
||||
FindPetsByTagsExecute(r ApiFindPetsByTagsRequest) ([]Pet, *_nethttp.Response, error)
|
||||
|
||||
/*
|
||||
* GetPetById Find pet by ID
|
||||
@@ -93,7 +93,7 @@ type PetApi interface {
|
||||
* GetPetByIdExecute executes the request
|
||||
* @return Pet
|
||||
*/
|
||||
GetPetByIdExecute(r ApiGetPetByIdRequest) (Pet, *_nethttp.Response, GenericOpenAPIError)
|
||||
GetPetByIdExecute(r ApiGetPetByIdRequest) (Pet, *_nethttp.Response, error)
|
||||
|
||||
/*
|
||||
* UpdatePet Update an existing pet
|
||||
@@ -105,7 +105,7 @@ type PetApi interface {
|
||||
/*
|
||||
* UpdatePetExecute executes the request
|
||||
*/
|
||||
UpdatePetExecute(r ApiUpdatePetRequest) (*_nethttp.Response, GenericOpenAPIError)
|
||||
UpdatePetExecute(r ApiUpdatePetRequest) (*_nethttp.Response, error)
|
||||
|
||||
/*
|
||||
* UpdatePetWithForm Updates a pet in the store with form data
|
||||
@@ -118,7 +118,7 @@ type PetApi interface {
|
||||
/*
|
||||
* UpdatePetWithFormExecute executes the request
|
||||
*/
|
||||
UpdatePetWithFormExecute(r ApiUpdatePetWithFormRequest) (*_nethttp.Response, GenericOpenAPIError)
|
||||
UpdatePetWithFormExecute(r ApiUpdatePetWithFormRequest) (*_nethttp.Response, error)
|
||||
|
||||
/*
|
||||
* UploadFile uploads an image
|
||||
@@ -132,7 +132,7 @@ type PetApi interface {
|
||||
* UploadFileExecute executes the request
|
||||
* @return ApiResponse
|
||||
*/
|
||||
UploadFileExecute(r ApiUploadFileRequest) (ApiResponse, *_nethttp.Response, GenericOpenAPIError)
|
||||
UploadFileExecute(r ApiUploadFileRequest) (ApiResponse, *_nethttp.Response, error)
|
||||
|
||||
/*
|
||||
* UploadFileWithRequiredFile uploads an image (required)
|
||||
@@ -146,7 +146,7 @@ type PetApi interface {
|
||||
* UploadFileWithRequiredFileExecute executes the request
|
||||
* @return ApiResponse
|
||||
*/
|
||||
UploadFileWithRequiredFileExecute(r ApiUploadFileWithRequiredFileRequest) (ApiResponse, *_nethttp.Response, GenericOpenAPIError)
|
||||
UploadFileWithRequiredFileExecute(r ApiUploadFileWithRequiredFileRequest) (ApiResponse, *_nethttp.Response, error)
|
||||
}
|
||||
|
||||
// PetApiService PetApi service
|
||||
@@ -163,7 +163,7 @@ func (r ApiAddPetRequest) Body(body Pet) ApiAddPetRequest {
|
||||
return r
|
||||
}
|
||||
|
||||
func (r ApiAddPetRequest) Execute() (*_nethttp.Response, GenericOpenAPIError) {
|
||||
func (r ApiAddPetRequest) Execute() (*_nethttp.Response, error) {
|
||||
return r.ApiService.AddPetExecute(r)
|
||||
}
|
||||
|
||||
@@ -182,20 +182,18 @@ func (a *PetApiService) AddPet(ctx _context.Context) ApiAddPetRequest {
|
||||
/*
|
||||
* Execute executes the request
|
||||
*/
|
||||
func (a *PetApiService) AddPetExecute(r ApiAddPetRequest) (*_nethttp.Response, GenericOpenAPIError) {
|
||||
func (a *PetApiService) AddPetExecute(r ApiAddPetRequest) (*_nethttp.Response, error) {
|
||||
var (
|
||||
localVarHTTPMethod = _nethttp.MethodPost
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
executionError GenericOpenAPIError
|
||||
)
|
||||
|
||||
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.AddPet")
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return nil, executionError
|
||||
return nil, GenericOpenAPIError{error: err.Error()}
|
||||
}
|
||||
|
||||
localVarPath := localBasePath + "/pet"
|
||||
@@ -204,8 +202,7 @@ func (a *PetApiService) AddPetExecute(r ApiAddPetRequest) (*_nethttp.Response, G
|
||||
localVarQueryParams := _neturl.Values{}
|
||||
localVarFormParams := _neturl.Values{}
|
||||
if r.body == nil {
|
||||
executionError.error = "body is required and must be specified"
|
||||
return nil, executionError
|
||||
return nil, reportError("body is required and must be specified")
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
@@ -229,22 +226,19 @@ func (a *PetApiService) AddPetExecute(r ApiAddPetRequest) (*_nethttp.Response, G
|
||||
localVarPostBody = r.body
|
||||
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return nil, executionError
|
||||
return nil, err
|
||||
}
|
||||
|
||||
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||
if err != nil || localVarHTTPResponse == nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarHTTPResponse, executionError
|
||||
return localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
|
||||
localVarHTTPResponse.Body.Close()
|
||||
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarHTTPResponse, executionError
|
||||
return localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
if localVarHTTPResponse.StatusCode >= 300 {
|
||||
@@ -255,7 +249,7 @@ func (a *PetApiService) AddPetExecute(r ApiAddPetRequest) (*_nethttp.Response, G
|
||||
return localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
return localVarHTTPResponse, executionError
|
||||
return localVarHTTPResponse, nil
|
||||
}
|
||||
|
||||
type ApiDeletePetRequest struct {
|
||||
@@ -270,7 +264,7 @@ func (r ApiDeletePetRequest) ApiKey(apiKey string) ApiDeletePetRequest {
|
||||
return r
|
||||
}
|
||||
|
||||
func (r ApiDeletePetRequest) Execute() (*_nethttp.Response, GenericOpenAPIError) {
|
||||
func (r ApiDeletePetRequest) Execute() (*_nethttp.Response, error) {
|
||||
return r.ApiService.DeletePetExecute(r)
|
||||
}
|
||||
|
||||
@@ -291,20 +285,18 @@ func (a *PetApiService) DeletePet(ctx _context.Context, petId int64) ApiDeletePe
|
||||
/*
|
||||
* Execute executes the request
|
||||
*/
|
||||
func (a *PetApiService) DeletePetExecute(r ApiDeletePetRequest) (*_nethttp.Response, GenericOpenAPIError) {
|
||||
func (a *PetApiService) DeletePetExecute(r ApiDeletePetRequest) (*_nethttp.Response, error) {
|
||||
var (
|
||||
localVarHTTPMethod = _nethttp.MethodDelete
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
executionError GenericOpenAPIError
|
||||
)
|
||||
|
||||
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.DeletePet")
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return nil, executionError
|
||||
return nil, GenericOpenAPIError{error: err.Error()}
|
||||
}
|
||||
|
||||
localVarPath := localBasePath + "/pet/{petId}"
|
||||
@@ -336,22 +328,19 @@ func (a *PetApiService) DeletePetExecute(r ApiDeletePetRequest) (*_nethttp.Respo
|
||||
}
|
||||
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return nil, executionError
|
||||
return nil, err
|
||||
}
|
||||
|
||||
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||
if err != nil || localVarHTTPResponse == nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarHTTPResponse, executionError
|
||||
return localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
|
||||
localVarHTTPResponse.Body.Close()
|
||||
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarHTTPResponse, executionError
|
||||
return localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
if localVarHTTPResponse.StatusCode >= 300 {
|
||||
@@ -362,7 +351,7 @@ func (a *PetApiService) DeletePetExecute(r ApiDeletePetRequest) (*_nethttp.Respo
|
||||
return localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
return localVarHTTPResponse, executionError
|
||||
return localVarHTTPResponse, nil
|
||||
}
|
||||
|
||||
type ApiFindPetsByStatusRequest struct {
|
||||
@@ -376,7 +365,7 @@ func (r ApiFindPetsByStatusRequest) Status(status []string) ApiFindPetsByStatusR
|
||||
return r
|
||||
}
|
||||
|
||||
func (r ApiFindPetsByStatusRequest) Execute() ([]Pet, *_nethttp.Response, GenericOpenAPIError) {
|
||||
func (r ApiFindPetsByStatusRequest) Execute() ([]Pet, *_nethttp.Response, error) {
|
||||
return r.ApiService.FindPetsByStatusExecute(r)
|
||||
}
|
||||
|
||||
@@ -397,21 +386,19 @@ func (a *PetApiService) FindPetsByStatus(ctx _context.Context) ApiFindPetsByStat
|
||||
* Execute executes the request
|
||||
* @return []Pet
|
||||
*/
|
||||
func (a *PetApiService) FindPetsByStatusExecute(r ApiFindPetsByStatusRequest) ([]Pet, *_nethttp.Response, GenericOpenAPIError) {
|
||||
func (a *PetApiService) FindPetsByStatusExecute(r ApiFindPetsByStatusRequest) ([]Pet, *_nethttp.Response, error) {
|
||||
var (
|
||||
localVarHTTPMethod = _nethttp.MethodGet
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
executionError GenericOpenAPIError
|
||||
localVarReturnValue []Pet
|
||||
)
|
||||
|
||||
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.FindPetsByStatus")
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarReturnValue, nil, executionError
|
||||
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
|
||||
}
|
||||
|
||||
localVarPath := localBasePath + "/pet/findByStatus"
|
||||
@@ -420,8 +407,7 @@ func (a *PetApiService) FindPetsByStatusExecute(r ApiFindPetsByStatusRequest) ([
|
||||
localVarQueryParams := _neturl.Values{}
|
||||
localVarFormParams := _neturl.Values{}
|
||||
if r.status == nil {
|
||||
executionError.error = "status is required and must be specified"
|
||||
return localVarReturnValue, nil, executionError
|
||||
return localVarReturnValue, nil, reportError("status is required and must be specified")
|
||||
}
|
||||
|
||||
localVarQueryParams.Add("status", parameterToString(*r.status, "csv"))
|
||||
@@ -444,22 +430,19 @@ func (a *PetApiService) FindPetsByStatusExecute(r ApiFindPetsByStatusRequest) ([
|
||||
}
|
||||
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarReturnValue, nil, executionError
|
||||
return localVarReturnValue, nil, err
|
||||
}
|
||||
|
||||
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||
if err != nil || localVarHTTPResponse == nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarReturnValue, localVarHTTPResponse, executionError
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
|
||||
localVarHTTPResponse.Body.Close()
|
||||
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarReturnValue, localVarHTTPResponse, executionError
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
if localVarHTTPResponse.StatusCode >= 300 {
|
||||
@@ -479,7 +462,7 @@ func (a *PetApiService) FindPetsByStatusExecute(r ApiFindPetsByStatusRequest) ([
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
return localVarReturnValue, localVarHTTPResponse, executionError
|
||||
return localVarReturnValue, localVarHTTPResponse, nil
|
||||
}
|
||||
|
||||
type ApiFindPetsByTagsRequest struct {
|
||||
@@ -493,7 +476,7 @@ func (r ApiFindPetsByTagsRequest) Tags(tags []string) ApiFindPetsByTagsRequest {
|
||||
return r
|
||||
}
|
||||
|
||||
func (r ApiFindPetsByTagsRequest) Execute() ([]Pet, *_nethttp.Response, GenericOpenAPIError) {
|
||||
func (r ApiFindPetsByTagsRequest) Execute() ([]Pet, *_nethttp.Response, error) {
|
||||
return r.ApiService.FindPetsByTagsExecute(r)
|
||||
}
|
||||
|
||||
@@ -514,21 +497,19 @@ func (a *PetApiService) FindPetsByTags(ctx _context.Context) ApiFindPetsByTagsRe
|
||||
* Execute executes the request
|
||||
* @return []Pet
|
||||
*/
|
||||
func (a *PetApiService) FindPetsByTagsExecute(r ApiFindPetsByTagsRequest) ([]Pet, *_nethttp.Response, GenericOpenAPIError) {
|
||||
func (a *PetApiService) FindPetsByTagsExecute(r ApiFindPetsByTagsRequest) ([]Pet, *_nethttp.Response, error) {
|
||||
var (
|
||||
localVarHTTPMethod = _nethttp.MethodGet
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
executionError GenericOpenAPIError
|
||||
localVarReturnValue []Pet
|
||||
)
|
||||
|
||||
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.FindPetsByTags")
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarReturnValue, nil, executionError
|
||||
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
|
||||
}
|
||||
|
||||
localVarPath := localBasePath + "/pet/findByTags"
|
||||
@@ -537,8 +518,7 @@ func (a *PetApiService) FindPetsByTagsExecute(r ApiFindPetsByTagsRequest) ([]Pet
|
||||
localVarQueryParams := _neturl.Values{}
|
||||
localVarFormParams := _neturl.Values{}
|
||||
if r.tags == nil {
|
||||
executionError.error = "tags is required and must be specified"
|
||||
return localVarReturnValue, nil, executionError
|
||||
return localVarReturnValue, nil, reportError("tags is required and must be specified")
|
||||
}
|
||||
|
||||
localVarQueryParams.Add("tags", parameterToString(*r.tags, "csv"))
|
||||
@@ -561,22 +541,19 @@ func (a *PetApiService) FindPetsByTagsExecute(r ApiFindPetsByTagsRequest) ([]Pet
|
||||
}
|
||||
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarReturnValue, nil, executionError
|
||||
return localVarReturnValue, nil, err
|
||||
}
|
||||
|
||||
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||
if err != nil || localVarHTTPResponse == nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarReturnValue, localVarHTTPResponse, executionError
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
|
||||
localVarHTTPResponse.Body.Close()
|
||||
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarReturnValue, localVarHTTPResponse, executionError
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
if localVarHTTPResponse.StatusCode >= 300 {
|
||||
@@ -596,7 +573,7 @@ func (a *PetApiService) FindPetsByTagsExecute(r ApiFindPetsByTagsRequest) ([]Pet
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
return localVarReturnValue, localVarHTTPResponse, executionError
|
||||
return localVarReturnValue, localVarHTTPResponse, nil
|
||||
}
|
||||
|
||||
type ApiGetPetByIdRequest struct {
|
||||
@@ -606,7 +583,7 @@ type ApiGetPetByIdRequest struct {
|
||||
}
|
||||
|
||||
|
||||
func (r ApiGetPetByIdRequest) Execute() (Pet, *_nethttp.Response, GenericOpenAPIError) {
|
||||
func (r ApiGetPetByIdRequest) Execute() (Pet, *_nethttp.Response, error) {
|
||||
return r.ApiService.GetPetByIdExecute(r)
|
||||
}
|
||||
|
||||
@@ -629,21 +606,19 @@ func (a *PetApiService) GetPetById(ctx _context.Context, petId int64) ApiGetPetB
|
||||
* Execute executes the request
|
||||
* @return Pet
|
||||
*/
|
||||
func (a *PetApiService) GetPetByIdExecute(r ApiGetPetByIdRequest) (Pet, *_nethttp.Response, GenericOpenAPIError) {
|
||||
func (a *PetApiService) GetPetByIdExecute(r ApiGetPetByIdRequest) (Pet, *_nethttp.Response, error) {
|
||||
var (
|
||||
localVarHTTPMethod = _nethttp.MethodGet
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
executionError GenericOpenAPIError
|
||||
localVarReturnValue Pet
|
||||
)
|
||||
|
||||
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.GetPetById")
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarReturnValue, nil, executionError
|
||||
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
|
||||
}
|
||||
|
||||
localVarPath := localBasePath + "/pet/{petId}"
|
||||
@@ -686,22 +661,19 @@ func (a *PetApiService) GetPetByIdExecute(r ApiGetPetByIdRequest) (Pet, *_nethtt
|
||||
}
|
||||
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarReturnValue, nil, executionError
|
||||
return localVarReturnValue, nil, err
|
||||
}
|
||||
|
||||
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||
if err != nil || localVarHTTPResponse == nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarReturnValue, localVarHTTPResponse, executionError
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
|
||||
localVarHTTPResponse.Body.Close()
|
||||
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarReturnValue, localVarHTTPResponse, executionError
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
if localVarHTTPResponse.StatusCode >= 300 {
|
||||
@@ -721,7 +693,7 @@ func (a *PetApiService) GetPetByIdExecute(r ApiGetPetByIdRequest) (Pet, *_nethtt
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
return localVarReturnValue, localVarHTTPResponse, executionError
|
||||
return localVarReturnValue, localVarHTTPResponse, nil
|
||||
}
|
||||
|
||||
type ApiUpdatePetRequest struct {
|
||||
@@ -735,7 +707,7 @@ func (r ApiUpdatePetRequest) Body(body Pet) ApiUpdatePetRequest {
|
||||
return r
|
||||
}
|
||||
|
||||
func (r ApiUpdatePetRequest) Execute() (*_nethttp.Response, GenericOpenAPIError) {
|
||||
func (r ApiUpdatePetRequest) Execute() (*_nethttp.Response, error) {
|
||||
return r.ApiService.UpdatePetExecute(r)
|
||||
}
|
||||
|
||||
@@ -754,20 +726,18 @@ func (a *PetApiService) UpdatePet(ctx _context.Context) ApiUpdatePetRequest {
|
||||
/*
|
||||
* Execute executes the request
|
||||
*/
|
||||
func (a *PetApiService) UpdatePetExecute(r ApiUpdatePetRequest) (*_nethttp.Response, GenericOpenAPIError) {
|
||||
func (a *PetApiService) UpdatePetExecute(r ApiUpdatePetRequest) (*_nethttp.Response, error) {
|
||||
var (
|
||||
localVarHTTPMethod = _nethttp.MethodPut
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
executionError GenericOpenAPIError
|
||||
)
|
||||
|
||||
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.UpdatePet")
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return nil, executionError
|
||||
return nil, GenericOpenAPIError{error: err.Error()}
|
||||
}
|
||||
|
||||
localVarPath := localBasePath + "/pet"
|
||||
@@ -776,8 +746,7 @@ func (a *PetApiService) UpdatePetExecute(r ApiUpdatePetRequest) (*_nethttp.Respo
|
||||
localVarQueryParams := _neturl.Values{}
|
||||
localVarFormParams := _neturl.Values{}
|
||||
if r.body == nil {
|
||||
executionError.error = "body is required and must be specified"
|
||||
return nil, executionError
|
||||
return nil, reportError("body is required and must be specified")
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
@@ -801,22 +770,19 @@ func (a *PetApiService) UpdatePetExecute(r ApiUpdatePetRequest) (*_nethttp.Respo
|
||||
localVarPostBody = r.body
|
||||
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return nil, executionError
|
||||
return nil, err
|
||||
}
|
||||
|
||||
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||
if err != nil || localVarHTTPResponse == nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarHTTPResponse, executionError
|
||||
return localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
|
||||
localVarHTTPResponse.Body.Close()
|
||||
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarHTTPResponse, executionError
|
||||
return localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
if localVarHTTPResponse.StatusCode >= 300 {
|
||||
@@ -827,7 +793,7 @@ func (a *PetApiService) UpdatePetExecute(r ApiUpdatePetRequest) (*_nethttp.Respo
|
||||
return localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
return localVarHTTPResponse, executionError
|
||||
return localVarHTTPResponse, nil
|
||||
}
|
||||
|
||||
type ApiUpdatePetWithFormRequest struct {
|
||||
@@ -847,7 +813,7 @@ func (r ApiUpdatePetWithFormRequest) Status(status string) ApiUpdatePetWithFormR
|
||||
return r
|
||||
}
|
||||
|
||||
func (r ApiUpdatePetWithFormRequest) Execute() (*_nethttp.Response, GenericOpenAPIError) {
|
||||
func (r ApiUpdatePetWithFormRequest) Execute() (*_nethttp.Response, error) {
|
||||
return r.ApiService.UpdatePetWithFormExecute(r)
|
||||
}
|
||||
|
||||
@@ -868,20 +834,18 @@ func (a *PetApiService) UpdatePetWithForm(ctx _context.Context, petId int64) Api
|
||||
/*
|
||||
* Execute executes the request
|
||||
*/
|
||||
func (a *PetApiService) UpdatePetWithFormExecute(r ApiUpdatePetWithFormRequest) (*_nethttp.Response, GenericOpenAPIError) {
|
||||
func (a *PetApiService) UpdatePetWithFormExecute(r ApiUpdatePetWithFormRequest) (*_nethttp.Response, error) {
|
||||
var (
|
||||
localVarHTTPMethod = _nethttp.MethodPost
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
executionError GenericOpenAPIError
|
||||
)
|
||||
|
||||
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.UpdatePetWithForm")
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return nil, executionError
|
||||
return nil, GenericOpenAPIError{error: err.Error()}
|
||||
}
|
||||
|
||||
localVarPath := localBasePath + "/pet/{petId}"
|
||||
@@ -916,22 +880,19 @@ func (a *PetApiService) UpdatePetWithFormExecute(r ApiUpdatePetWithFormRequest)
|
||||
}
|
||||
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return nil, executionError
|
||||
return nil, err
|
||||
}
|
||||
|
||||
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||
if err != nil || localVarHTTPResponse == nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarHTTPResponse, executionError
|
||||
return localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
|
||||
localVarHTTPResponse.Body.Close()
|
||||
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarHTTPResponse, executionError
|
||||
return localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
if localVarHTTPResponse.StatusCode >= 300 {
|
||||
@@ -942,7 +903,7 @@ func (a *PetApiService) UpdatePetWithFormExecute(r ApiUpdatePetWithFormRequest)
|
||||
return localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
return localVarHTTPResponse, executionError
|
||||
return localVarHTTPResponse, nil
|
||||
}
|
||||
|
||||
type ApiUploadFileRequest struct {
|
||||
@@ -962,7 +923,7 @@ func (r ApiUploadFileRequest) File(file *os.File) ApiUploadFileRequest {
|
||||
return r
|
||||
}
|
||||
|
||||
func (r ApiUploadFileRequest) Execute() (ApiResponse, *_nethttp.Response, GenericOpenAPIError) {
|
||||
func (r ApiUploadFileRequest) Execute() (ApiResponse, *_nethttp.Response, error) {
|
||||
return r.ApiService.UploadFileExecute(r)
|
||||
}
|
||||
|
||||
@@ -984,21 +945,19 @@ func (a *PetApiService) UploadFile(ctx _context.Context, petId int64) ApiUploadF
|
||||
* Execute executes the request
|
||||
* @return ApiResponse
|
||||
*/
|
||||
func (a *PetApiService) UploadFileExecute(r ApiUploadFileRequest) (ApiResponse, *_nethttp.Response, GenericOpenAPIError) {
|
||||
func (a *PetApiService) UploadFileExecute(r ApiUploadFileRequest) (ApiResponse, *_nethttp.Response, error) {
|
||||
var (
|
||||
localVarHTTPMethod = _nethttp.MethodPost
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
executionError GenericOpenAPIError
|
||||
localVarReturnValue ApiResponse
|
||||
)
|
||||
|
||||
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.UploadFile")
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarReturnValue, nil, executionError
|
||||
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
|
||||
}
|
||||
|
||||
localVarPath := localBasePath + "/pet/{petId}/uploadImage"
|
||||
@@ -1041,22 +1000,19 @@ func (a *PetApiService) UploadFileExecute(r ApiUploadFileRequest) (ApiResponse,
|
||||
}
|
||||
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarReturnValue, nil, executionError
|
||||
return localVarReturnValue, nil, err
|
||||
}
|
||||
|
||||
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||
if err != nil || localVarHTTPResponse == nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarReturnValue, localVarHTTPResponse, executionError
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
|
||||
localVarHTTPResponse.Body.Close()
|
||||
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarReturnValue, localVarHTTPResponse, executionError
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
if localVarHTTPResponse.StatusCode >= 300 {
|
||||
@@ -1076,7 +1032,7 @@ func (a *PetApiService) UploadFileExecute(r ApiUploadFileRequest) (ApiResponse,
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
return localVarReturnValue, localVarHTTPResponse, executionError
|
||||
return localVarReturnValue, localVarHTTPResponse, nil
|
||||
}
|
||||
|
||||
type ApiUploadFileWithRequiredFileRequest struct {
|
||||
@@ -1096,7 +1052,7 @@ func (r ApiUploadFileWithRequiredFileRequest) AdditionalMetadata(additionalMetad
|
||||
return r
|
||||
}
|
||||
|
||||
func (r ApiUploadFileWithRequiredFileRequest) Execute() (ApiResponse, *_nethttp.Response, GenericOpenAPIError) {
|
||||
func (r ApiUploadFileWithRequiredFileRequest) Execute() (ApiResponse, *_nethttp.Response, error) {
|
||||
return r.ApiService.UploadFileWithRequiredFileExecute(r)
|
||||
}
|
||||
|
||||
@@ -1118,21 +1074,19 @@ func (a *PetApiService) UploadFileWithRequiredFile(ctx _context.Context, petId i
|
||||
* Execute executes the request
|
||||
* @return ApiResponse
|
||||
*/
|
||||
func (a *PetApiService) UploadFileWithRequiredFileExecute(r ApiUploadFileWithRequiredFileRequest) (ApiResponse, *_nethttp.Response, GenericOpenAPIError) {
|
||||
func (a *PetApiService) UploadFileWithRequiredFileExecute(r ApiUploadFileWithRequiredFileRequest) (ApiResponse, *_nethttp.Response, error) {
|
||||
var (
|
||||
localVarHTTPMethod = _nethttp.MethodPost
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
executionError GenericOpenAPIError
|
||||
localVarReturnValue ApiResponse
|
||||
)
|
||||
|
||||
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.UploadFileWithRequiredFile")
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarReturnValue, nil, executionError
|
||||
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
|
||||
}
|
||||
|
||||
localVarPath := localBasePath + "/fake/{petId}/uploadImageWithRequiredFile"
|
||||
@@ -1142,8 +1096,7 @@ func (a *PetApiService) UploadFileWithRequiredFileExecute(r ApiUploadFileWithReq
|
||||
localVarQueryParams := _neturl.Values{}
|
||||
localVarFormParams := _neturl.Values{}
|
||||
if r.requiredFile == nil {
|
||||
executionError.error = "requiredFile is required and must be specified"
|
||||
return localVarReturnValue, nil, executionError
|
||||
return localVarReturnValue, nil, reportError("requiredFile is required and must be specified")
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
@@ -1176,22 +1129,19 @@ func (a *PetApiService) UploadFileWithRequiredFileExecute(r ApiUploadFileWithReq
|
||||
}
|
||||
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarReturnValue, nil, executionError
|
||||
return localVarReturnValue, nil, err
|
||||
}
|
||||
|
||||
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||
if err != nil || localVarHTTPResponse == nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarReturnValue, localVarHTTPResponse, executionError
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
|
||||
localVarHTTPResponse.Body.Close()
|
||||
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarReturnValue, localVarHTTPResponse, executionError
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
if localVarHTTPResponse.StatusCode >= 300 {
|
||||
@@ -1211,5 +1161,5 @@ func (a *PetApiService) UploadFileWithRequiredFileExecute(r ApiUploadFileWithReq
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
return localVarReturnValue, localVarHTTPResponse, executionError
|
||||
return localVarReturnValue, localVarHTTPResponse, nil
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ type StoreApi interface {
|
||||
/*
|
||||
* DeleteOrderExecute executes the request
|
||||
*/
|
||||
DeleteOrderExecute(r ApiDeleteOrderRequest) (*_nethttp.Response, GenericOpenAPIError)
|
||||
DeleteOrderExecute(r ApiDeleteOrderRequest) (*_nethttp.Response, error)
|
||||
|
||||
/*
|
||||
* GetInventory Returns pet inventories by status
|
||||
@@ -52,7 +52,7 @@ type StoreApi interface {
|
||||
* GetInventoryExecute executes the request
|
||||
* @return map[string]int32
|
||||
*/
|
||||
GetInventoryExecute(r ApiGetInventoryRequest) (map[string]int32, *_nethttp.Response, GenericOpenAPIError)
|
||||
GetInventoryExecute(r ApiGetInventoryRequest) (map[string]int32, *_nethttp.Response, error)
|
||||
|
||||
/*
|
||||
* GetOrderById Find purchase order by ID
|
||||
@@ -67,7 +67,7 @@ type StoreApi interface {
|
||||
* GetOrderByIdExecute executes the request
|
||||
* @return Order
|
||||
*/
|
||||
GetOrderByIdExecute(r ApiGetOrderByIdRequest) (Order, *_nethttp.Response, GenericOpenAPIError)
|
||||
GetOrderByIdExecute(r ApiGetOrderByIdRequest) (Order, *_nethttp.Response, error)
|
||||
|
||||
/*
|
||||
* PlaceOrder Place an order for a pet
|
||||
@@ -80,7 +80,7 @@ type StoreApi interface {
|
||||
* PlaceOrderExecute executes the request
|
||||
* @return Order
|
||||
*/
|
||||
PlaceOrderExecute(r ApiPlaceOrderRequest) (Order, *_nethttp.Response, GenericOpenAPIError)
|
||||
PlaceOrderExecute(r ApiPlaceOrderRequest) (Order, *_nethttp.Response, error)
|
||||
}
|
||||
|
||||
// StoreApiService StoreApi service
|
||||
@@ -93,7 +93,7 @@ type ApiDeleteOrderRequest struct {
|
||||
}
|
||||
|
||||
|
||||
func (r ApiDeleteOrderRequest) Execute() (*_nethttp.Response, GenericOpenAPIError) {
|
||||
func (r ApiDeleteOrderRequest) Execute() (*_nethttp.Response, error) {
|
||||
return r.ApiService.DeleteOrderExecute(r)
|
||||
}
|
||||
|
||||
@@ -115,20 +115,18 @@ func (a *StoreApiService) DeleteOrder(ctx _context.Context, orderId string) ApiD
|
||||
/*
|
||||
* Execute executes the request
|
||||
*/
|
||||
func (a *StoreApiService) DeleteOrderExecute(r ApiDeleteOrderRequest) (*_nethttp.Response, GenericOpenAPIError) {
|
||||
func (a *StoreApiService) DeleteOrderExecute(r ApiDeleteOrderRequest) (*_nethttp.Response, error) {
|
||||
var (
|
||||
localVarHTTPMethod = _nethttp.MethodDelete
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
executionError GenericOpenAPIError
|
||||
)
|
||||
|
||||
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StoreApiService.DeleteOrder")
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return nil, executionError
|
||||
return nil, GenericOpenAPIError{error: err.Error()}
|
||||
}
|
||||
|
||||
localVarPath := localBasePath + "/store/order/{order_id}"
|
||||
@@ -157,22 +155,19 @@ func (a *StoreApiService) DeleteOrderExecute(r ApiDeleteOrderRequest) (*_nethttp
|
||||
}
|
||||
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return nil, executionError
|
||||
return nil, err
|
||||
}
|
||||
|
||||
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||
if err != nil || localVarHTTPResponse == nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarHTTPResponse, executionError
|
||||
return localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
|
||||
localVarHTTPResponse.Body.Close()
|
||||
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarHTTPResponse, executionError
|
||||
return localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
if localVarHTTPResponse.StatusCode >= 300 {
|
||||
@@ -183,7 +178,7 @@ func (a *StoreApiService) DeleteOrderExecute(r ApiDeleteOrderRequest) (*_nethttp
|
||||
return localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
return localVarHTTPResponse, executionError
|
||||
return localVarHTTPResponse, nil
|
||||
}
|
||||
|
||||
type ApiGetInventoryRequest struct {
|
||||
@@ -192,7 +187,7 @@ type ApiGetInventoryRequest struct {
|
||||
}
|
||||
|
||||
|
||||
func (r ApiGetInventoryRequest) Execute() (map[string]int32, *_nethttp.Response, GenericOpenAPIError) {
|
||||
func (r ApiGetInventoryRequest) Execute() (map[string]int32, *_nethttp.Response, error) {
|
||||
return r.ApiService.GetInventoryExecute(r)
|
||||
}
|
||||
|
||||
@@ -213,21 +208,19 @@ func (a *StoreApiService) GetInventory(ctx _context.Context) ApiGetInventoryRequ
|
||||
* Execute executes the request
|
||||
* @return map[string]int32
|
||||
*/
|
||||
func (a *StoreApiService) GetInventoryExecute(r ApiGetInventoryRequest) (map[string]int32, *_nethttp.Response, GenericOpenAPIError) {
|
||||
func (a *StoreApiService) GetInventoryExecute(r ApiGetInventoryRequest) (map[string]int32, *_nethttp.Response, error) {
|
||||
var (
|
||||
localVarHTTPMethod = _nethttp.MethodGet
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
executionError GenericOpenAPIError
|
||||
localVarReturnValue map[string]int32
|
||||
)
|
||||
|
||||
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StoreApiService.GetInventory")
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarReturnValue, nil, executionError
|
||||
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
|
||||
}
|
||||
|
||||
localVarPath := localBasePath + "/store/inventory"
|
||||
@@ -269,22 +262,19 @@ func (a *StoreApiService) GetInventoryExecute(r ApiGetInventoryRequest) (map[str
|
||||
}
|
||||
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarReturnValue, nil, executionError
|
||||
return localVarReturnValue, nil, err
|
||||
}
|
||||
|
||||
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||
if err != nil || localVarHTTPResponse == nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarReturnValue, localVarHTTPResponse, executionError
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
|
||||
localVarHTTPResponse.Body.Close()
|
||||
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarReturnValue, localVarHTTPResponse, executionError
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
if localVarHTTPResponse.StatusCode >= 300 {
|
||||
@@ -304,7 +294,7 @@ func (a *StoreApiService) GetInventoryExecute(r ApiGetInventoryRequest) (map[str
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
return localVarReturnValue, localVarHTTPResponse, executionError
|
||||
return localVarReturnValue, localVarHTTPResponse, nil
|
||||
}
|
||||
|
||||
type ApiGetOrderByIdRequest struct {
|
||||
@@ -314,7 +304,7 @@ type ApiGetOrderByIdRequest struct {
|
||||
}
|
||||
|
||||
|
||||
func (r ApiGetOrderByIdRequest) Execute() (Order, *_nethttp.Response, GenericOpenAPIError) {
|
||||
func (r ApiGetOrderByIdRequest) Execute() (Order, *_nethttp.Response, error) {
|
||||
return r.ApiService.GetOrderByIdExecute(r)
|
||||
}
|
||||
|
||||
@@ -337,21 +327,19 @@ func (a *StoreApiService) GetOrderById(ctx _context.Context, orderId int64) ApiG
|
||||
* Execute executes the request
|
||||
* @return Order
|
||||
*/
|
||||
func (a *StoreApiService) GetOrderByIdExecute(r ApiGetOrderByIdRequest) (Order, *_nethttp.Response, GenericOpenAPIError) {
|
||||
func (a *StoreApiService) GetOrderByIdExecute(r ApiGetOrderByIdRequest) (Order, *_nethttp.Response, error) {
|
||||
var (
|
||||
localVarHTTPMethod = _nethttp.MethodGet
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
executionError GenericOpenAPIError
|
||||
localVarReturnValue Order
|
||||
)
|
||||
|
||||
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StoreApiService.GetOrderById")
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarReturnValue, nil, executionError
|
||||
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
|
||||
}
|
||||
|
||||
localVarPath := localBasePath + "/store/order/{order_id}"
|
||||
@@ -361,12 +349,10 @@ func (a *StoreApiService) GetOrderByIdExecute(r ApiGetOrderByIdRequest) (Order,
|
||||
localVarQueryParams := _neturl.Values{}
|
||||
localVarFormParams := _neturl.Values{}
|
||||
if r.orderId < 1 {
|
||||
executionError.error = "orderId must be greater than 1"
|
||||
return localVarReturnValue, nil, executionError
|
||||
return localVarReturnValue, nil, reportError("orderId must be greater than 1")
|
||||
}
|
||||
if r.orderId > 5 {
|
||||
executionError.error = "orderId must be less than 5"
|
||||
return localVarReturnValue, nil, executionError
|
||||
return localVarReturnValue, nil, reportError("orderId must be less than 5")
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
@@ -388,22 +374,19 @@ func (a *StoreApiService) GetOrderByIdExecute(r ApiGetOrderByIdRequest) (Order,
|
||||
}
|
||||
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarReturnValue, nil, executionError
|
||||
return localVarReturnValue, nil, err
|
||||
}
|
||||
|
||||
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||
if err != nil || localVarHTTPResponse == nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarReturnValue, localVarHTTPResponse, executionError
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
|
||||
localVarHTTPResponse.Body.Close()
|
||||
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarReturnValue, localVarHTTPResponse, executionError
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
if localVarHTTPResponse.StatusCode >= 300 {
|
||||
@@ -423,7 +406,7 @@ func (a *StoreApiService) GetOrderByIdExecute(r ApiGetOrderByIdRequest) (Order,
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
return localVarReturnValue, localVarHTTPResponse, executionError
|
||||
return localVarReturnValue, localVarHTTPResponse, nil
|
||||
}
|
||||
|
||||
type ApiPlaceOrderRequest struct {
|
||||
@@ -437,7 +420,7 @@ func (r ApiPlaceOrderRequest) Body(body Order) ApiPlaceOrderRequest {
|
||||
return r
|
||||
}
|
||||
|
||||
func (r ApiPlaceOrderRequest) Execute() (Order, *_nethttp.Response, GenericOpenAPIError) {
|
||||
func (r ApiPlaceOrderRequest) Execute() (Order, *_nethttp.Response, error) {
|
||||
return r.ApiService.PlaceOrderExecute(r)
|
||||
}
|
||||
|
||||
@@ -457,21 +440,19 @@ func (a *StoreApiService) PlaceOrder(ctx _context.Context) ApiPlaceOrderRequest
|
||||
* Execute executes the request
|
||||
* @return Order
|
||||
*/
|
||||
func (a *StoreApiService) PlaceOrderExecute(r ApiPlaceOrderRequest) (Order, *_nethttp.Response, GenericOpenAPIError) {
|
||||
func (a *StoreApiService) PlaceOrderExecute(r ApiPlaceOrderRequest) (Order, *_nethttp.Response, error) {
|
||||
var (
|
||||
localVarHTTPMethod = _nethttp.MethodPost
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
executionError GenericOpenAPIError
|
||||
localVarReturnValue Order
|
||||
)
|
||||
|
||||
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StoreApiService.PlaceOrder")
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarReturnValue, nil, executionError
|
||||
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
|
||||
}
|
||||
|
||||
localVarPath := localBasePath + "/store/order"
|
||||
@@ -480,8 +461,7 @@ func (a *StoreApiService) PlaceOrderExecute(r ApiPlaceOrderRequest) (Order, *_ne
|
||||
localVarQueryParams := _neturl.Values{}
|
||||
localVarFormParams := _neturl.Values{}
|
||||
if r.body == nil {
|
||||
executionError.error = "body is required and must be specified"
|
||||
return localVarReturnValue, nil, executionError
|
||||
return localVarReturnValue, nil, reportError("body is required and must be specified")
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
@@ -505,22 +485,19 @@ func (a *StoreApiService) PlaceOrderExecute(r ApiPlaceOrderRequest) (Order, *_ne
|
||||
localVarPostBody = r.body
|
||||
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarReturnValue, nil, executionError
|
||||
return localVarReturnValue, nil, err
|
||||
}
|
||||
|
||||
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||
if err != nil || localVarHTTPResponse == nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarReturnValue, localVarHTTPResponse, executionError
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
|
||||
localVarHTTPResponse.Body.Close()
|
||||
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarReturnValue, localVarHTTPResponse, executionError
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
if localVarHTTPResponse.StatusCode >= 300 {
|
||||
@@ -540,5 +517,5 @@ func (a *StoreApiService) PlaceOrderExecute(r ApiPlaceOrderRequest) (Order, *_ne
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
return localVarReturnValue, localVarHTTPResponse, executionError
|
||||
return localVarReturnValue, localVarHTTPResponse, nil
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ type UserApi interface {
|
||||
/*
|
||||
* CreateUserExecute executes the request
|
||||
*/
|
||||
CreateUserExecute(r ApiCreateUserRequest) (*_nethttp.Response, GenericOpenAPIError)
|
||||
CreateUserExecute(r ApiCreateUserRequest) (*_nethttp.Response, error)
|
||||
|
||||
/*
|
||||
* CreateUsersWithArrayInput Creates list of users with given input array
|
||||
@@ -49,7 +49,7 @@ type UserApi interface {
|
||||
/*
|
||||
* CreateUsersWithArrayInputExecute executes the request
|
||||
*/
|
||||
CreateUsersWithArrayInputExecute(r ApiCreateUsersWithArrayInputRequest) (*_nethttp.Response, GenericOpenAPIError)
|
||||
CreateUsersWithArrayInputExecute(r ApiCreateUsersWithArrayInputRequest) (*_nethttp.Response, error)
|
||||
|
||||
/*
|
||||
* CreateUsersWithListInput Creates list of users with given input array
|
||||
@@ -61,7 +61,7 @@ type UserApi interface {
|
||||
/*
|
||||
* CreateUsersWithListInputExecute executes the request
|
||||
*/
|
||||
CreateUsersWithListInputExecute(r ApiCreateUsersWithListInputRequest) (*_nethttp.Response, GenericOpenAPIError)
|
||||
CreateUsersWithListInputExecute(r ApiCreateUsersWithListInputRequest) (*_nethttp.Response, error)
|
||||
|
||||
/*
|
||||
* DeleteUser Delete user
|
||||
@@ -75,7 +75,7 @@ type UserApi interface {
|
||||
/*
|
||||
* DeleteUserExecute executes the request
|
||||
*/
|
||||
DeleteUserExecute(r ApiDeleteUserRequest) (*_nethttp.Response, GenericOpenAPIError)
|
||||
DeleteUserExecute(r ApiDeleteUserRequest) (*_nethttp.Response, error)
|
||||
|
||||
/*
|
||||
* GetUserByName Get user by user name
|
||||
@@ -89,7 +89,7 @@ type UserApi interface {
|
||||
* GetUserByNameExecute executes the request
|
||||
* @return User
|
||||
*/
|
||||
GetUserByNameExecute(r ApiGetUserByNameRequest) (User, *_nethttp.Response, GenericOpenAPIError)
|
||||
GetUserByNameExecute(r ApiGetUserByNameRequest) (User, *_nethttp.Response, error)
|
||||
|
||||
/*
|
||||
* LoginUser Logs user into the system
|
||||
@@ -102,7 +102,7 @@ type UserApi interface {
|
||||
* LoginUserExecute executes the request
|
||||
* @return string
|
||||
*/
|
||||
LoginUserExecute(r ApiLoginUserRequest) (string, *_nethttp.Response, GenericOpenAPIError)
|
||||
LoginUserExecute(r ApiLoginUserRequest) (string, *_nethttp.Response, error)
|
||||
|
||||
/*
|
||||
* LogoutUser Logs out current logged in user session
|
||||
@@ -114,7 +114,7 @@ type UserApi interface {
|
||||
/*
|
||||
* LogoutUserExecute executes the request
|
||||
*/
|
||||
LogoutUserExecute(r ApiLogoutUserRequest) (*_nethttp.Response, GenericOpenAPIError)
|
||||
LogoutUserExecute(r ApiLogoutUserRequest) (*_nethttp.Response, error)
|
||||
|
||||
/*
|
||||
* UpdateUser Updated user
|
||||
@@ -128,7 +128,7 @@ type UserApi interface {
|
||||
/*
|
||||
* UpdateUserExecute executes the request
|
||||
*/
|
||||
UpdateUserExecute(r ApiUpdateUserRequest) (*_nethttp.Response, GenericOpenAPIError)
|
||||
UpdateUserExecute(r ApiUpdateUserRequest) (*_nethttp.Response, error)
|
||||
}
|
||||
|
||||
// UserApiService UserApi service
|
||||
@@ -145,7 +145,7 @@ func (r ApiCreateUserRequest) Body(body User) ApiCreateUserRequest {
|
||||
return r
|
||||
}
|
||||
|
||||
func (r ApiCreateUserRequest) Execute() (*_nethttp.Response, GenericOpenAPIError) {
|
||||
func (r ApiCreateUserRequest) Execute() (*_nethttp.Response, error) {
|
||||
return r.ApiService.CreateUserExecute(r)
|
||||
}
|
||||
|
||||
@@ -165,20 +165,18 @@ func (a *UserApiService) CreateUser(ctx _context.Context) ApiCreateUserRequest {
|
||||
/*
|
||||
* Execute executes the request
|
||||
*/
|
||||
func (a *UserApiService) CreateUserExecute(r ApiCreateUserRequest) (*_nethttp.Response, GenericOpenAPIError) {
|
||||
func (a *UserApiService) CreateUserExecute(r ApiCreateUserRequest) (*_nethttp.Response, error) {
|
||||
var (
|
||||
localVarHTTPMethod = _nethttp.MethodPost
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
executionError GenericOpenAPIError
|
||||
)
|
||||
|
||||
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.CreateUser")
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return nil, executionError
|
||||
return nil, GenericOpenAPIError{error: err.Error()}
|
||||
}
|
||||
|
||||
localVarPath := localBasePath + "/user"
|
||||
@@ -187,8 +185,7 @@ func (a *UserApiService) CreateUserExecute(r ApiCreateUserRequest) (*_nethttp.Re
|
||||
localVarQueryParams := _neturl.Values{}
|
||||
localVarFormParams := _neturl.Values{}
|
||||
if r.body == nil {
|
||||
executionError.error = "body is required and must be specified"
|
||||
return nil, executionError
|
||||
return nil, reportError("body is required and must be specified")
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
@@ -212,22 +209,19 @@ func (a *UserApiService) CreateUserExecute(r ApiCreateUserRequest) (*_nethttp.Re
|
||||
localVarPostBody = r.body
|
||||
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return nil, executionError
|
||||
return nil, err
|
||||
}
|
||||
|
||||
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||
if err != nil || localVarHTTPResponse == nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarHTTPResponse, executionError
|
||||
return localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
|
||||
localVarHTTPResponse.Body.Close()
|
||||
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarHTTPResponse, executionError
|
||||
return localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
if localVarHTTPResponse.StatusCode >= 300 {
|
||||
@@ -238,7 +232,7 @@ func (a *UserApiService) CreateUserExecute(r ApiCreateUserRequest) (*_nethttp.Re
|
||||
return localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
return localVarHTTPResponse, executionError
|
||||
return localVarHTTPResponse, nil
|
||||
}
|
||||
|
||||
type ApiCreateUsersWithArrayInputRequest struct {
|
||||
@@ -252,7 +246,7 @@ func (r ApiCreateUsersWithArrayInputRequest) Body(body []User) ApiCreateUsersWit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r ApiCreateUsersWithArrayInputRequest) Execute() (*_nethttp.Response, GenericOpenAPIError) {
|
||||
func (r ApiCreateUsersWithArrayInputRequest) Execute() (*_nethttp.Response, error) {
|
||||
return r.ApiService.CreateUsersWithArrayInputExecute(r)
|
||||
}
|
||||
|
||||
@@ -271,20 +265,18 @@ func (a *UserApiService) CreateUsersWithArrayInput(ctx _context.Context) ApiCrea
|
||||
/*
|
||||
* Execute executes the request
|
||||
*/
|
||||
func (a *UserApiService) CreateUsersWithArrayInputExecute(r ApiCreateUsersWithArrayInputRequest) (*_nethttp.Response, GenericOpenAPIError) {
|
||||
func (a *UserApiService) CreateUsersWithArrayInputExecute(r ApiCreateUsersWithArrayInputRequest) (*_nethttp.Response, error) {
|
||||
var (
|
||||
localVarHTTPMethod = _nethttp.MethodPost
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
executionError GenericOpenAPIError
|
||||
)
|
||||
|
||||
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.CreateUsersWithArrayInput")
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return nil, executionError
|
||||
return nil, GenericOpenAPIError{error: err.Error()}
|
||||
}
|
||||
|
||||
localVarPath := localBasePath + "/user/createWithArray"
|
||||
@@ -293,8 +285,7 @@ func (a *UserApiService) CreateUsersWithArrayInputExecute(r ApiCreateUsersWithAr
|
||||
localVarQueryParams := _neturl.Values{}
|
||||
localVarFormParams := _neturl.Values{}
|
||||
if r.body == nil {
|
||||
executionError.error = "body is required and must be specified"
|
||||
return nil, executionError
|
||||
return nil, reportError("body is required and must be specified")
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
@@ -318,22 +309,19 @@ func (a *UserApiService) CreateUsersWithArrayInputExecute(r ApiCreateUsersWithAr
|
||||
localVarPostBody = r.body
|
||||
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return nil, executionError
|
||||
return nil, err
|
||||
}
|
||||
|
||||
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||
if err != nil || localVarHTTPResponse == nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarHTTPResponse, executionError
|
||||
return localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
|
||||
localVarHTTPResponse.Body.Close()
|
||||
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarHTTPResponse, executionError
|
||||
return localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
if localVarHTTPResponse.StatusCode >= 300 {
|
||||
@@ -344,7 +332,7 @@ func (a *UserApiService) CreateUsersWithArrayInputExecute(r ApiCreateUsersWithAr
|
||||
return localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
return localVarHTTPResponse, executionError
|
||||
return localVarHTTPResponse, nil
|
||||
}
|
||||
|
||||
type ApiCreateUsersWithListInputRequest struct {
|
||||
@@ -358,7 +346,7 @@ func (r ApiCreateUsersWithListInputRequest) Body(body []User) ApiCreateUsersWith
|
||||
return r
|
||||
}
|
||||
|
||||
func (r ApiCreateUsersWithListInputRequest) Execute() (*_nethttp.Response, GenericOpenAPIError) {
|
||||
func (r ApiCreateUsersWithListInputRequest) Execute() (*_nethttp.Response, error) {
|
||||
return r.ApiService.CreateUsersWithListInputExecute(r)
|
||||
}
|
||||
|
||||
@@ -377,20 +365,18 @@ func (a *UserApiService) CreateUsersWithListInput(ctx _context.Context) ApiCreat
|
||||
/*
|
||||
* Execute executes the request
|
||||
*/
|
||||
func (a *UserApiService) CreateUsersWithListInputExecute(r ApiCreateUsersWithListInputRequest) (*_nethttp.Response, GenericOpenAPIError) {
|
||||
func (a *UserApiService) CreateUsersWithListInputExecute(r ApiCreateUsersWithListInputRequest) (*_nethttp.Response, error) {
|
||||
var (
|
||||
localVarHTTPMethod = _nethttp.MethodPost
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
executionError GenericOpenAPIError
|
||||
)
|
||||
|
||||
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.CreateUsersWithListInput")
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return nil, executionError
|
||||
return nil, GenericOpenAPIError{error: err.Error()}
|
||||
}
|
||||
|
||||
localVarPath := localBasePath + "/user/createWithList"
|
||||
@@ -399,8 +385,7 @@ func (a *UserApiService) CreateUsersWithListInputExecute(r ApiCreateUsersWithLis
|
||||
localVarQueryParams := _neturl.Values{}
|
||||
localVarFormParams := _neturl.Values{}
|
||||
if r.body == nil {
|
||||
executionError.error = "body is required and must be specified"
|
||||
return nil, executionError
|
||||
return nil, reportError("body is required and must be specified")
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
@@ -424,22 +409,19 @@ func (a *UserApiService) CreateUsersWithListInputExecute(r ApiCreateUsersWithLis
|
||||
localVarPostBody = r.body
|
||||
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return nil, executionError
|
||||
return nil, err
|
||||
}
|
||||
|
||||
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||
if err != nil || localVarHTTPResponse == nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarHTTPResponse, executionError
|
||||
return localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
|
||||
localVarHTTPResponse.Body.Close()
|
||||
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarHTTPResponse, executionError
|
||||
return localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
if localVarHTTPResponse.StatusCode >= 300 {
|
||||
@@ -450,7 +432,7 @@ func (a *UserApiService) CreateUsersWithListInputExecute(r ApiCreateUsersWithLis
|
||||
return localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
return localVarHTTPResponse, executionError
|
||||
return localVarHTTPResponse, nil
|
||||
}
|
||||
|
||||
type ApiDeleteUserRequest struct {
|
||||
@@ -460,7 +442,7 @@ type ApiDeleteUserRequest struct {
|
||||
}
|
||||
|
||||
|
||||
func (r ApiDeleteUserRequest) Execute() (*_nethttp.Response, GenericOpenAPIError) {
|
||||
func (r ApiDeleteUserRequest) Execute() (*_nethttp.Response, error) {
|
||||
return r.ApiService.DeleteUserExecute(r)
|
||||
}
|
||||
|
||||
@@ -482,20 +464,18 @@ func (a *UserApiService) DeleteUser(ctx _context.Context, username string) ApiDe
|
||||
/*
|
||||
* Execute executes the request
|
||||
*/
|
||||
func (a *UserApiService) DeleteUserExecute(r ApiDeleteUserRequest) (*_nethttp.Response, GenericOpenAPIError) {
|
||||
func (a *UserApiService) DeleteUserExecute(r ApiDeleteUserRequest) (*_nethttp.Response, error) {
|
||||
var (
|
||||
localVarHTTPMethod = _nethttp.MethodDelete
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
executionError GenericOpenAPIError
|
||||
)
|
||||
|
||||
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.DeleteUser")
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return nil, executionError
|
||||
return nil, GenericOpenAPIError{error: err.Error()}
|
||||
}
|
||||
|
||||
localVarPath := localBasePath + "/user/{username}"
|
||||
@@ -524,22 +504,19 @@ func (a *UserApiService) DeleteUserExecute(r ApiDeleteUserRequest) (*_nethttp.Re
|
||||
}
|
||||
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return nil, executionError
|
||||
return nil, err
|
||||
}
|
||||
|
||||
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||
if err != nil || localVarHTTPResponse == nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarHTTPResponse, executionError
|
||||
return localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
|
||||
localVarHTTPResponse.Body.Close()
|
||||
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarHTTPResponse, executionError
|
||||
return localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
if localVarHTTPResponse.StatusCode >= 300 {
|
||||
@@ -550,7 +527,7 @@ func (a *UserApiService) DeleteUserExecute(r ApiDeleteUserRequest) (*_nethttp.Re
|
||||
return localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
return localVarHTTPResponse, executionError
|
||||
return localVarHTTPResponse, nil
|
||||
}
|
||||
|
||||
type ApiGetUserByNameRequest struct {
|
||||
@@ -560,7 +537,7 @@ type ApiGetUserByNameRequest struct {
|
||||
}
|
||||
|
||||
|
||||
func (r ApiGetUserByNameRequest) Execute() (User, *_nethttp.Response, GenericOpenAPIError) {
|
||||
func (r ApiGetUserByNameRequest) Execute() (User, *_nethttp.Response, error) {
|
||||
return r.ApiService.GetUserByNameExecute(r)
|
||||
}
|
||||
|
||||
@@ -582,21 +559,19 @@ func (a *UserApiService) GetUserByName(ctx _context.Context, username string) Ap
|
||||
* Execute executes the request
|
||||
* @return User
|
||||
*/
|
||||
func (a *UserApiService) GetUserByNameExecute(r ApiGetUserByNameRequest) (User, *_nethttp.Response, GenericOpenAPIError) {
|
||||
func (a *UserApiService) GetUserByNameExecute(r ApiGetUserByNameRequest) (User, *_nethttp.Response, error) {
|
||||
var (
|
||||
localVarHTTPMethod = _nethttp.MethodGet
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
executionError GenericOpenAPIError
|
||||
localVarReturnValue User
|
||||
)
|
||||
|
||||
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.GetUserByName")
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarReturnValue, nil, executionError
|
||||
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
|
||||
}
|
||||
|
||||
localVarPath := localBasePath + "/user/{username}"
|
||||
@@ -625,22 +600,19 @@ func (a *UserApiService) GetUserByNameExecute(r ApiGetUserByNameRequest) (User,
|
||||
}
|
||||
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarReturnValue, nil, executionError
|
||||
return localVarReturnValue, nil, err
|
||||
}
|
||||
|
||||
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||
if err != nil || localVarHTTPResponse == nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarReturnValue, localVarHTTPResponse, executionError
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
|
||||
localVarHTTPResponse.Body.Close()
|
||||
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarReturnValue, localVarHTTPResponse, executionError
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
if localVarHTTPResponse.StatusCode >= 300 {
|
||||
@@ -660,7 +632,7 @@ func (a *UserApiService) GetUserByNameExecute(r ApiGetUserByNameRequest) (User,
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
return localVarReturnValue, localVarHTTPResponse, executionError
|
||||
return localVarReturnValue, localVarHTTPResponse, nil
|
||||
}
|
||||
|
||||
type ApiLoginUserRequest struct {
|
||||
@@ -679,7 +651,7 @@ func (r ApiLoginUserRequest) Password(password string) ApiLoginUserRequest {
|
||||
return r
|
||||
}
|
||||
|
||||
func (r ApiLoginUserRequest) Execute() (string, *_nethttp.Response, GenericOpenAPIError) {
|
||||
func (r ApiLoginUserRequest) Execute() (string, *_nethttp.Response, error) {
|
||||
return r.ApiService.LoginUserExecute(r)
|
||||
}
|
||||
|
||||
@@ -699,21 +671,19 @@ func (a *UserApiService) LoginUser(ctx _context.Context) ApiLoginUserRequest {
|
||||
* Execute executes the request
|
||||
* @return string
|
||||
*/
|
||||
func (a *UserApiService) LoginUserExecute(r ApiLoginUserRequest) (string, *_nethttp.Response, GenericOpenAPIError) {
|
||||
func (a *UserApiService) LoginUserExecute(r ApiLoginUserRequest) (string, *_nethttp.Response, error) {
|
||||
var (
|
||||
localVarHTTPMethod = _nethttp.MethodGet
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
executionError GenericOpenAPIError
|
||||
localVarReturnValue string
|
||||
)
|
||||
|
||||
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.LoginUser")
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarReturnValue, nil, executionError
|
||||
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
|
||||
}
|
||||
|
||||
localVarPath := localBasePath + "/user/login"
|
||||
@@ -722,12 +692,10 @@ func (a *UserApiService) LoginUserExecute(r ApiLoginUserRequest) (string, *_neth
|
||||
localVarQueryParams := _neturl.Values{}
|
||||
localVarFormParams := _neturl.Values{}
|
||||
if r.username == nil {
|
||||
executionError.error = "username is required and must be specified"
|
||||
return localVarReturnValue, nil, executionError
|
||||
return localVarReturnValue, nil, reportError("username is required and must be specified")
|
||||
}
|
||||
if r.password == nil {
|
||||
executionError.error = "password is required and must be specified"
|
||||
return localVarReturnValue, nil, executionError
|
||||
return localVarReturnValue, nil, reportError("password is required and must be specified")
|
||||
}
|
||||
|
||||
localVarQueryParams.Add("username", parameterToString(*r.username, ""))
|
||||
@@ -751,22 +719,19 @@ func (a *UserApiService) LoginUserExecute(r ApiLoginUserRequest) (string, *_neth
|
||||
}
|
||||
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarReturnValue, nil, executionError
|
||||
return localVarReturnValue, nil, err
|
||||
}
|
||||
|
||||
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||
if err != nil || localVarHTTPResponse == nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarReturnValue, localVarHTTPResponse, executionError
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
|
||||
localVarHTTPResponse.Body.Close()
|
||||
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarReturnValue, localVarHTTPResponse, executionError
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
if localVarHTTPResponse.StatusCode >= 300 {
|
||||
@@ -786,7 +751,7 @@ func (a *UserApiService) LoginUserExecute(r ApiLoginUserRequest) (string, *_neth
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
return localVarReturnValue, localVarHTTPResponse, executionError
|
||||
return localVarReturnValue, localVarHTTPResponse, nil
|
||||
}
|
||||
|
||||
type ApiLogoutUserRequest struct {
|
||||
@@ -795,7 +760,7 @@ type ApiLogoutUserRequest struct {
|
||||
}
|
||||
|
||||
|
||||
func (r ApiLogoutUserRequest) Execute() (*_nethttp.Response, GenericOpenAPIError) {
|
||||
func (r ApiLogoutUserRequest) Execute() (*_nethttp.Response, error) {
|
||||
return r.ApiService.LogoutUserExecute(r)
|
||||
}
|
||||
|
||||
@@ -814,20 +779,18 @@ func (a *UserApiService) LogoutUser(ctx _context.Context) ApiLogoutUserRequest {
|
||||
/*
|
||||
* Execute executes the request
|
||||
*/
|
||||
func (a *UserApiService) LogoutUserExecute(r ApiLogoutUserRequest) (*_nethttp.Response, GenericOpenAPIError) {
|
||||
func (a *UserApiService) LogoutUserExecute(r ApiLogoutUserRequest) (*_nethttp.Response, error) {
|
||||
var (
|
||||
localVarHTTPMethod = _nethttp.MethodGet
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
executionError GenericOpenAPIError
|
||||
)
|
||||
|
||||
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.LogoutUser")
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return nil, executionError
|
||||
return nil, GenericOpenAPIError{error: err.Error()}
|
||||
}
|
||||
|
||||
localVarPath := localBasePath + "/user/logout"
|
||||
@@ -855,22 +818,19 @@ func (a *UserApiService) LogoutUserExecute(r ApiLogoutUserRequest) (*_nethttp.Re
|
||||
}
|
||||
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return nil, executionError
|
||||
return nil, err
|
||||
}
|
||||
|
||||
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||
if err != nil || localVarHTTPResponse == nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarHTTPResponse, executionError
|
||||
return localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
|
||||
localVarHTTPResponse.Body.Close()
|
||||
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarHTTPResponse, executionError
|
||||
return localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
if localVarHTTPResponse.StatusCode >= 300 {
|
||||
@@ -881,7 +841,7 @@ func (a *UserApiService) LogoutUserExecute(r ApiLogoutUserRequest) (*_nethttp.Re
|
||||
return localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
return localVarHTTPResponse, executionError
|
||||
return localVarHTTPResponse, nil
|
||||
}
|
||||
|
||||
type ApiUpdateUserRequest struct {
|
||||
@@ -896,7 +856,7 @@ func (r ApiUpdateUserRequest) Body(body User) ApiUpdateUserRequest {
|
||||
return r
|
||||
}
|
||||
|
||||
func (r ApiUpdateUserRequest) Execute() (*_nethttp.Response, GenericOpenAPIError) {
|
||||
func (r ApiUpdateUserRequest) Execute() (*_nethttp.Response, error) {
|
||||
return r.ApiService.UpdateUserExecute(r)
|
||||
}
|
||||
|
||||
@@ -918,20 +878,18 @@ func (a *UserApiService) UpdateUser(ctx _context.Context, username string) ApiUp
|
||||
/*
|
||||
* Execute executes the request
|
||||
*/
|
||||
func (a *UserApiService) UpdateUserExecute(r ApiUpdateUserRequest) (*_nethttp.Response, GenericOpenAPIError) {
|
||||
func (a *UserApiService) UpdateUserExecute(r ApiUpdateUserRequest) (*_nethttp.Response, error) {
|
||||
var (
|
||||
localVarHTTPMethod = _nethttp.MethodPut
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
executionError GenericOpenAPIError
|
||||
)
|
||||
|
||||
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.UpdateUser")
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return nil, executionError
|
||||
return nil, GenericOpenAPIError{error: err.Error()}
|
||||
}
|
||||
|
||||
localVarPath := localBasePath + "/user/{username}"
|
||||
@@ -941,8 +899,7 @@ func (a *UserApiService) UpdateUserExecute(r ApiUpdateUserRequest) (*_nethttp.Re
|
||||
localVarQueryParams := _neturl.Values{}
|
||||
localVarFormParams := _neturl.Values{}
|
||||
if r.body == nil {
|
||||
executionError.error = "body is required and must be specified"
|
||||
return nil, executionError
|
||||
return nil, reportError("body is required and must be specified")
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
@@ -966,22 +923,19 @@ func (a *UserApiService) UpdateUserExecute(r ApiUpdateUserRequest) (*_nethttp.Re
|
||||
localVarPostBody = r.body
|
||||
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return nil, executionError
|
||||
return nil, err
|
||||
}
|
||||
|
||||
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||
if err != nil || localVarHTTPResponse == nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarHTTPResponse, executionError
|
||||
return localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
|
||||
localVarHTTPResponse.Body.Close()
|
||||
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
|
||||
if err != nil {
|
||||
executionError.error = err.Error()
|
||||
return localVarHTTPResponse, executionError
|
||||
return localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
if localVarHTTPResponse.StatusCode >= 300 {
|
||||
@@ -992,5 +946,5 @@ func (a *UserApiService) UpdateUserExecute(r ApiUpdateUserRequest) (*_nethttp.Re
|
||||
return localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
return localVarHTTPResponse, executionError
|
||||
return localVarHTTPResponse, nil
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ func main() {
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
api_client := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := api_client.AnotherFakeApi.Call123TestSpecialTags(context.Background()).Body(body).Execute()
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `AnotherFakeApi.Call123TestSpecialTags``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ func main() {
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
api_client := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := api_client.FakeApi.CreateXmlItem(context.Background()).XmlItem(xmlItem).Execute()
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.CreateXmlItem``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
@@ -111,7 +111,7 @@ func main() {
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
api_client := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := api_client.FakeApi.FakeOuterBooleanSerialize(context.Background()).Body(body).Execute()
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.FakeOuterBooleanSerialize``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
@@ -177,7 +177,7 @@ func main() {
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
api_client := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := api_client.FakeApi.FakeOuterCompositeSerialize(context.Background()).Body(body).Execute()
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.FakeOuterCompositeSerialize``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
@@ -243,7 +243,7 @@ func main() {
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
api_client := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := api_client.FakeApi.FakeOuterNumberSerialize(context.Background()).Body(body).Execute()
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.FakeOuterNumberSerialize``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
@@ -309,7 +309,7 @@ func main() {
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
api_client := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := api_client.FakeApi.FakeOuterStringSerialize(context.Background()).Body(body).Execute()
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.FakeOuterStringSerialize``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
@@ -375,7 +375,7 @@ func main() {
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
api_client := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := api_client.FakeApi.TestBodyWithFileSchema(context.Background()).Body(body).Execute()
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestBodyWithFileSchema``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
@@ -438,7 +438,7 @@ func main() {
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
api_client := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := api_client.FakeApi.TestBodyWithQueryParams(context.Background()).Query(query).Body(body).Execute()
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestBodyWithQueryParams``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
@@ -503,7 +503,7 @@ func main() {
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
api_client := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := api_client.FakeApi.TestClientModel(context.Background()).Body(body).Execute()
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestClientModel``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
@@ -583,7 +583,7 @@ func main() {
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
api_client := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := api_client.FakeApi.TestEndpointParameters(context.Background()).Number(number).Double(double).PatternWithoutDelimiter(patternWithoutDelimiter).Byte_(byte_).Integer(integer).Int32_(int32_).Int64_(int64_).Float(float).String_(string_).Binary(binary).Date(date).DateTime(dateTime).Password(password).Callback(callback).Execute()
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestEndpointParameters``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
@@ -667,7 +667,7 @@ func main() {
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
api_client := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := api_client.FakeApi.TestEnumParameters(context.Background()).EnumHeaderStringArray(enumHeaderStringArray).EnumHeaderString(enumHeaderString).EnumQueryStringArray(enumQueryStringArray).EnumQueryString(enumQueryString).EnumQueryInteger(enumQueryInteger).EnumQueryDouble(enumQueryDouble).EnumFormStringArray(enumFormStringArray).EnumFormString(enumFormString).Execute()
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestEnumParameters``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
@@ -743,7 +743,7 @@ func main() {
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
api_client := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := api_client.FakeApi.TestGroupParameters(context.Background()).RequiredStringGroup(requiredStringGroup).RequiredBooleanGroup(requiredBooleanGroup).RequiredInt64Group(requiredInt64Group).StringGroup(stringGroup).BooleanGroup(booleanGroup).Int64Group(int64Group).Execute()
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestGroupParameters``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
@@ -810,7 +810,7 @@ func main() {
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
api_client := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := api_client.FakeApi.TestInlineAdditionalProperties(context.Background()).Param(param).Execute()
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestInlineAdditionalProperties``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
@@ -873,7 +873,7 @@ func main() {
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
api_client := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := api_client.FakeApi.TestJsonFormData(context.Background()).Param(param).Param2(param2).Execute()
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestJsonFormData``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
@@ -942,7 +942,7 @@ func main() {
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
api_client := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := api_client.FakeApi.TestQueryParameterCollectionFormat(context.Background()).Pipe(pipe).Ioutil(ioutil).Http(http).Url(url).Context(context).Execute()
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestQueryParameterCollectionFormat``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ func main() {
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
api_client := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := api_client.FakeClassnameTags123Api.TestClassname(context.Background()).Body(body).Execute()
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `FakeClassnameTags123Api.TestClassname``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ func main() {
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
api_client := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := api_client.PetApi.AddPet(context.Background()).Body(body).Execute()
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `PetApi.AddPet``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
@@ -103,7 +103,7 @@ func main() {
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
api_client := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := api_client.PetApi.DeletePet(context.Background(), petId).ApiKey(apiKey).Execute()
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `PetApi.DeletePet``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
@@ -172,7 +172,7 @@ func main() {
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
api_client := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := api_client.PetApi.FindPetsByStatus(context.Background()).Status(status).Execute()
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `PetApi.FindPetsByStatus``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
@@ -238,7 +238,7 @@ func main() {
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
api_client := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := api_client.PetApi.FindPetsByTags(context.Background()).Tags(tags).Execute()
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `PetApi.FindPetsByTags``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
@@ -304,7 +304,7 @@ func main() {
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
api_client := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := api_client.PetApi.GetPetById(context.Background(), petId).Execute()
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `PetApi.GetPetById``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
@@ -372,7 +372,7 @@ func main() {
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
api_client := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := api_client.PetApi.UpdatePet(context.Background()).Body(body).Execute()
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `PetApi.UpdatePet``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
@@ -436,7 +436,7 @@ func main() {
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
api_client := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := api_client.PetApi.UpdatePetWithForm(context.Background(), petId).Name(name).Status(status).Execute()
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `PetApi.UpdatePetWithForm``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
@@ -506,7 +506,7 @@ func main() {
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
api_client := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := api_client.PetApi.UploadFile(context.Background(), petId).AdditionalMetadata(additionalMetadata).File(file).Execute()
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `PetApi.UploadFile``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
@@ -578,7 +578,7 @@ func main() {
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
api_client := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := api_client.PetApi.UploadFileWithRequiredFile(context.Background(), petId).RequiredFile(requiredFile).AdditionalMetadata(additionalMetadata).Execute()
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `PetApi.UploadFileWithRequiredFile``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ func main() {
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
api_client := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := api_client.StoreApi.DeleteOrder(context.Background(), orderId).Execute()
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `StoreApi.DeleteOrder``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
@@ -104,7 +104,7 @@ func main() {
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
api_client := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := api_client.StoreApi.GetInventory(context.Background()).Execute()
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `StoreApi.GetInventory``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
@@ -166,7 +166,7 @@ func main() {
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
api_client := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := api_client.StoreApi.GetOrderById(context.Background(), orderId).Execute()
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `StoreApi.GetOrderById``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
@@ -234,7 +234,7 @@ func main() {
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
api_client := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := api_client.StoreApi.PlaceOrder(context.Background()).Body(body).Execute()
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `StoreApi.PlaceOrder``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ func main() {
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
api_client := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := api_client.UserApi.CreateUser(context.Background()).Body(body).Execute()
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `UserApi.CreateUser``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
@@ -103,7 +103,7 @@ func main() {
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
api_client := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := api_client.UserApi.CreateUsersWithArrayInput(context.Background()).Body(body).Execute()
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `UserApi.CreateUsersWithArrayInput``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
@@ -165,7 +165,7 @@ func main() {
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
api_client := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := api_client.UserApi.CreateUsersWithListInput(context.Background()).Body(body).Execute()
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `UserApi.CreateUsersWithListInput``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
@@ -229,7 +229,7 @@ func main() {
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
api_client := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := api_client.UserApi.DeleteUser(context.Background(), username).Execute()
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `UserApi.DeleteUser``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
@@ -295,7 +295,7 @@ func main() {
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
api_client := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := api_client.UserApi.GetUserByName(context.Background(), username).Execute()
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `UserApi.GetUserByName``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
@@ -364,7 +364,7 @@ func main() {
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
api_client := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := api_client.UserApi.LoginUser(context.Background()).Username(username).Password(password).Execute()
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `UserApi.LoginUser``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
@@ -428,7 +428,7 @@ func main() {
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
api_client := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := api_client.UserApi.LogoutUser(context.Background()).Execute()
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `UserApi.LogoutUser``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
@@ -489,7 +489,7 @@ func main() {
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
api_client := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := api_client.UserApi.UpdateUser(context.Background(), username).Body(body).Execute()
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `UserApi.UpdateUser``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
|
||||
@@ -20,70 +20,70 @@ func (m *MockPetApi) AddPet(ctx context.Context) sw.ApiAddPetRequest {
|
||||
return sw.ApiAddPetRequest{ApiService: m}
|
||||
}
|
||||
|
||||
func (m *MockPetApi) AddPetExecute(r sw.ApiAddPetRequest) (*http.Response, sw.GenericOpenAPIError) {
|
||||
return &http.Response{StatusCode:200}, sw.GenericOpenAPIError{}
|
||||
func (m *MockPetApi) AddPetExecute(r sw.ApiAddPetRequest) (*http.Response, error) {
|
||||
return &http.Response{StatusCode:200}, nil
|
||||
}
|
||||
|
||||
func (m *MockPetApi) DeletePet(ctx context.Context, petId int64) sw.ApiDeletePetRequest {
|
||||
return sw.ApiDeletePetRequest{ApiService: m}
|
||||
}
|
||||
|
||||
func (m *MockPetApi) DeletePetExecute(r sw.ApiDeletePetRequest) (*http.Response, sw.GenericOpenAPIError) {
|
||||
return &http.Response{StatusCode:200}, sw.GenericOpenAPIError{}
|
||||
func (m *MockPetApi) DeletePetExecute(r sw.ApiDeletePetRequest) (*http.Response, error) {
|
||||
return &http.Response{StatusCode:200}, nil
|
||||
}
|
||||
|
||||
func (m *MockPetApi) FindPetsByStatus(ctx context.Context) sw.ApiFindPetsByStatusRequest {
|
||||
return sw.ApiFindPetsByStatusRequest{ApiService: m}
|
||||
}
|
||||
|
||||
func (m *MockPetApi) FindPetsByStatusExecute(r sw.ApiFindPetsByStatusRequest) ([]sw.Pet, *http.Response, sw.GenericOpenAPIError) {
|
||||
return []sw.Pet{}, &http.Response{StatusCode:200}, sw.GenericOpenAPIError{}
|
||||
func (m *MockPetApi) FindPetsByStatusExecute(r sw.ApiFindPetsByStatusRequest) ([]sw.Pet, *http.Response, error) {
|
||||
return []sw.Pet{}, &http.Response{StatusCode:200}, nil
|
||||
}
|
||||
|
||||
func (m *MockPetApi) FindPetsByTags(ctx context.Context) sw.ApiFindPetsByTagsRequest {
|
||||
return sw.ApiFindPetsByTagsRequest{ApiService: m}
|
||||
}
|
||||
|
||||
func (m *MockPetApi) FindPetsByTagsExecute(r sw.ApiFindPetsByTagsRequest) ([]sw.Pet, *http.Response, sw.GenericOpenAPIError) {
|
||||
return []sw.Pet{}, &http.Response{StatusCode:200}, sw.GenericOpenAPIError{}
|
||||
func (m *MockPetApi) FindPetsByTagsExecute(r sw.ApiFindPetsByTagsRequest) ([]sw.Pet, *http.Response, error) {
|
||||
return []sw.Pet{}, &http.Response{StatusCode:200}, nil
|
||||
}
|
||||
|
||||
func (m *MockPetApi) GetPetById(ctx context.Context, petId int64) sw.ApiGetPetByIdRequest {
|
||||
return sw.ApiGetPetByIdRequest{ApiService: m}
|
||||
}
|
||||
|
||||
func (m *MockPetApi) GetPetByIdExecute(r sw.ApiGetPetByIdRequest) (sw.Pet, *http.Response, sw.GenericOpenAPIError) {
|
||||
return sw.Pet{}, &http.Response{StatusCode:200}, sw.GenericOpenAPIError{}
|
||||
func (m *MockPetApi) GetPetByIdExecute(r sw.ApiGetPetByIdRequest) (sw.Pet, *http.Response, error) {
|
||||
return sw.Pet{}, &http.Response{StatusCode:200}, nil
|
||||
}
|
||||
|
||||
func (m *MockPetApi) UpdatePet(ctx context.Context) sw.ApiUpdatePetRequest {
|
||||
return sw.ApiUpdatePetRequest{ApiService: m}
|
||||
}
|
||||
|
||||
func (m *MockPetApi) UpdatePetExecute(r sw.ApiUpdatePetRequest) (*http.Response, sw.GenericOpenAPIError) {
|
||||
return &http.Response{StatusCode:200}, sw.GenericOpenAPIError{}
|
||||
func (m *MockPetApi) UpdatePetExecute(r sw.ApiUpdatePetRequest) (*http.Response, error) {
|
||||
return &http.Response{StatusCode:200}, nil
|
||||
}
|
||||
|
||||
func (m *MockPetApi) UpdatePetWithForm(ctx context.Context, petId int64) sw.ApiUpdatePetWithFormRequest {
|
||||
return sw.ApiUpdatePetWithFormRequest{ApiService: m}
|
||||
}
|
||||
|
||||
func (m *MockPetApi) UpdatePetWithFormExecute(r sw.ApiUpdatePetWithFormRequest) (*http.Response, sw.GenericOpenAPIError) {
|
||||
return &http.Response{StatusCode:200}, sw.GenericOpenAPIError{}
|
||||
func (m *MockPetApi) UpdatePetWithFormExecute(r sw.ApiUpdatePetWithFormRequest) (*http.Response, error) {
|
||||
return &http.Response{StatusCode:200}, nil
|
||||
}
|
||||
|
||||
func (m *MockPetApi) UploadFile(ctx context.Context, petId int64) sw.ApiUploadFileRequest {
|
||||
return sw.ApiUploadFileRequest{ApiService: m}
|
||||
}
|
||||
|
||||
func (m *MockPetApi) UploadFileExecute(r sw.ApiUploadFileRequest) (sw.ApiResponse, *http.Response, sw.GenericOpenAPIError) {
|
||||
return sw.ApiResponse{}, &http.Response{StatusCode:200}, sw.GenericOpenAPIError{}
|
||||
func (m *MockPetApi) UploadFileExecute(r sw.ApiUploadFileRequest) (sw.ApiResponse, *http.Response, error) {
|
||||
return sw.ApiResponse{}, &http.Response{StatusCode:200}, nil
|
||||
}
|
||||
|
||||
func (m *MockPetApi) UploadFileWithRequiredFile(ctx context.Context, petId int64) sw.ApiUploadFileWithRequiredFileRequest {
|
||||
return sw.ApiUploadFileWithRequiredFileRequest{ApiService: m}
|
||||
}
|
||||
|
||||
func (m *MockPetApi) UploadFileWithRequiredFileExecute(r sw.ApiUploadFileWithRequiredFileRequest) (sw.ApiResponse, *http.Response, sw.GenericOpenAPIError) {
|
||||
return sw.ApiResponse{}, &http.Response{StatusCode:200}, sw.GenericOpenAPIError{}
|
||||
func (m *MockPetApi) UploadFileWithRequiredFileExecute(r sw.ApiUploadFileWithRequiredFileRequest) (sw.ApiResponse, *http.Response, error) {
|
||||
return sw.ApiResponse{}, &http.Response{StatusCode:200}, nil
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ func TestAddPet(t *testing.T) {
|
||||
|
||||
r, err := client.PetApi.AddPet(context.Background()).Body(newPet).Execute()
|
||||
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
t.Fatalf("Error while adding pet: %v", err)
|
||||
}
|
||||
if r.StatusCode != 200 {
|
||||
@@ -54,7 +54,7 @@ func TestAddPetMock(t *testing.T) {
|
||||
func TestFindPetsByStatusWithMissingParam(t *testing.T) {
|
||||
_, r, err := client.PetApi.FindPetsByStatus(context.Background()).Status(nil).Execute()
|
||||
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
t.Fatalf("Error while testing TestFindPetsByStatusWithMissingParam: %v", err)
|
||||
}
|
||||
if r.StatusCode != 200 {
|
||||
@@ -69,12 +69,13 @@ func TestGetPetById(t *testing.T) {
|
||||
func TestGetPetByIdWithInvalidID(t *testing.T) {
|
||||
resp, r, err := client.PetApi.GetPetById(context.Background(), 999999999).Execute()
|
||||
if r != nil && r.StatusCode == 404 {
|
||||
assertedError := err
|
||||
assertedError, ok := err.(sw.GenericOpenAPIError)
|
||||
a := assert.New(t)
|
||||
a.True(ok)
|
||||
a.Contains(string(assertedError.Body()), "type")
|
||||
|
||||
a.Contains(assertedError.Error(), "Not Found")
|
||||
} else if err.Error() != "" {
|
||||
} else if err != nil {
|
||||
t.Fatalf("Error while getting pet by invalid id: %v", err)
|
||||
t.Log(r)
|
||||
} else {
|
||||
@@ -84,7 +85,7 @@ func TestGetPetByIdWithInvalidID(t *testing.T) {
|
||||
|
||||
func TestUpdatePetWithForm(t *testing.T) {
|
||||
r, err := client.PetApi.UpdatePetWithForm(context.Background(), 12830).Name("golang").Status("available").Execute()
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
t.Fatalf("Error while updating pet by id: %v", err)
|
||||
t.Log(r)
|
||||
}
|
||||
@@ -99,7 +100,7 @@ func TestUpdatePetWithForm(t *testing.T) {
|
||||
func TestFindPetsByTag(t *testing.T) {
|
||||
var found = false
|
||||
resp, r, err := client.PetApi.FindPetsByTags(context.Background()).Tags([]string{"tag2"}).Execute()
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
t.Fatalf("Error while getting pet by tag: %v", err)
|
||||
t.Log(r)
|
||||
} else {
|
||||
@@ -128,7 +129,7 @@ func TestFindPetsByTag(t *testing.T) {
|
||||
|
||||
func TestFindPetsByStatus(t *testing.T) {
|
||||
resp, r, err := client.PetApi.FindPetsByStatus(context.Background()).Status([]string{"available"}).Execute()
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
t.Fatalf("Error while getting pet by id: %v", err)
|
||||
t.Log(r)
|
||||
} else {
|
||||
@@ -155,7 +156,7 @@ func TestUploadFile(t *testing.T) {
|
||||
|
||||
_, r, err := client.PetApi.UploadFile(context.Background(), 12830).AdditionalMetadata("golang").File(file).Execute()
|
||||
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
t.Fatalf("Error while uploading file: %v", err)
|
||||
}
|
||||
|
||||
@@ -173,7 +174,7 @@ func TestUploadFileRequired(t *testing.T) {
|
||||
|
||||
_, r, err := client.PetApi.UploadFileWithRequiredFile(context.Background(), 12830).RequiredFile(file).AdditionalMetadata("golang").Execute()
|
||||
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
t.Fatalf("Error while uploading file: %v", err)
|
||||
}
|
||||
|
||||
@@ -185,7 +186,7 @@ func TestUploadFileRequired(t *testing.T) {
|
||||
func TestDeletePet(t *testing.T) {
|
||||
r, err := client.PetApi.DeletePet(context.Background(), 12830).Execute()
|
||||
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
t.Fatalf("Error while deleting pet by id: %v", err)
|
||||
}
|
||||
if r.StatusCode != 200 {
|
||||
@@ -275,7 +276,7 @@ func waitOnFunctions(t *testing.T, errc chan error, n int) {
|
||||
func deletePet(t *testing.T, id int64) {
|
||||
r, err := client.PetApi.DeletePet(context.Background(), id).Execute()
|
||||
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
t.Fatalf("Error while deleting pet by id: %v", err)
|
||||
}
|
||||
if r.StatusCode != 200 {
|
||||
@@ -286,7 +287,7 @@ func deletePet(t *testing.T, id int64) {
|
||||
func isPetCorrect(t *testing.T, id int64, name string, status string) {
|
||||
assert := assert.New(t)
|
||||
resp, r, err := client.PetApi.GetPetById(context.Background(), id).Execute()
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
t.Fatalf("Error while getting pet by id: %v", err)
|
||||
} else {
|
||||
assert.Equal(*resp.Id, int64(id), "Pet id should be equal")
|
||||
|
||||
@@ -20,7 +20,7 @@ func TestPlaceOrder(t *testing.T) {
|
||||
|
||||
_, r, err := client.StoreApi.PlaceOrder(context.Background()).Body(newOrder).Execute()
|
||||
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
// Skip parsing time error due to error in Petstore Test Server
|
||||
// https://github.com/OpenAPITools/openapi-generator/issues/1292
|
||||
if regexp.
|
||||
|
||||
@@ -22,7 +22,7 @@ func TestCreateUser(t *testing.T) {
|
||||
|
||||
apiResponse, err := client.UserApi.CreateUser(context.Background()).Body(newUser).Execute()
|
||||
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
t.Fatalf("Error while adding user: %v", err)
|
||||
}
|
||||
if apiResponse.StatusCode != 200 {
|
||||
@@ -56,7 +56,7 @@ func TestCreateUsersWithArrayInput(t *testing.T) {
|
||||
}
|
||||
|
||||
apiResponse, err := client.UserApi.CreateUsersWithArrayInput(context.Background()).Body(newUsers).Execute()
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
t.Fatalf("Error while adding users: %v", err)
|
||||
}
|
||||
if apiResponse.StatusCode != 200 {
|
||||
@@ -82,7 +82,7 @@ func TestGetUserByName(t *testing.T) {
|
||||
assert := assert.New(t)
|
||||
|
||||
resp, apiResponse, err := client.UserApi.GetUserByName(context.Background(), "gopher").Execute()
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
t.Fatalf("Error while getting user by id: %v", err)
|
||||
} else {
|
||||
assert.Equal(*resp.Id, int64(1000), "User id should be equal")
|
||||
@@ -99,7 +99,7 @@ func TestGetUserByNameWithInvalidID(t *testing.T) {
|
||||
resp, apiResponse, err := client.UserApi.GetUserByName(context.Background(), "999999999").Execute()
|
||||
if apiResponse != nil && apiResponse.StatusCode == 404 {
|
||||
return // This is a pass condition. API will return with a 404 error.
|
||||
} else if err.Error() != "" {
|
||||
} else if err != nil {
|
||||
t.Fatalf("Error while getting user by invalid id: %v", err)
|
||||
t.Log(apiResponse)
|
||||
} else {
|
||||
@@ -124,7 +124,7 @@ func TestUpdateUser(t *testing.T) {
|
||||
UserStatus: sw.PtrInt32(1)}
|
||||
|
||||
apiResponse, err := client.UserApi.UpdateUser(context.Background(), "gopher").Body(newUser).Execute()
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
t.Fatalf("Error while deleting user by id: %v", err)
|
||||
}
|
||||
if apiResponse.StatusCode != 200 {
|
||||
@@ -133,7 +133,7 @@ func TestUpdateUser(t *testing.T) {
|
||||
|
||||
//verify changings are correct
|
||||
resp, apiResponse, err := client.UserApi.GetUserByName(context.Background(), "gopher").Execute()
|
||||
if err.Error() != "" {
|
||||
if err != nil {
|
||||
t.Fatalf("Error while getting user by id: %v", err)
|
||||
} else {
|
||||
assert.Equal(*resp.Id, int64(1000), "User id should be equal")
|
||||
|
||||
@@ -106,18 +106,18 @@ ext {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
compile "com.google.code.findbugs:jsr305:3.0.2"
|
||||
compile "io.github.openfeign:feign-core:$feign_version"
|
||||
compile "io.github.openfeign:feign-jackson:$feign_version"
|
||||
compile "io.github.openfeign:feign-slf4j:$feign_version"
|
||||
compile "io.github.openfeign.form:feign-form:$feign_form_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-core:$jackson_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version"
|
||||
compile "com.github.joschi.jackson:jackson-datatype-threetenbp:$jackson_threetenbp_version"
|
||||
compile "org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:$oltu_version"
|
||||
compile "com.brsanthu:migbase64:2.2"
|
||||
compile 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
testCompile "junit:junit:$junit_version"
|
||||
implementation "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
implementation "com.google.code.findbugs:jsr305:3.0.2"
|
||||
implementation "io.github.openfeign:feign-core:$feign_version"
|
||||
implementation "io.github.openfeign:feign-jackson:$feign_version"
|
||||
implementation "io.github.openfeign:feign-slf4j:$feign_version"
|
||||
implementation "io.github.openfeign.form:feign-form:$feign_form_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version"
|
||||
implementation "com.github.joschi.jackson:jackson-datatype-threetenbp:$jackson_threetenbp_version"
|
||||
implementation "org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:$oltu_version"
|
||||
implementation "com.brsanthu:migbase64:2.2"
|
||||
implementation 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
testImplementation "junit:junit:$junit_version"
|
||||
}
|
||||
|
||||
@@ -107,19 +107,19 @@ ext {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
compile "com.google.code.findbugs:jsr305:3.0.2"
|
||||
compile "io.github.openfeign:feign-core:$feign_version"
|
||||
compile "io.github.openfeign:feign-jackson:$feign_version"
|
||||
compile "io.github.openfeign:feign-slf4j:$feign_version"
|
||||
compile "io.github.openfeign.form:feign-form:$feign_form_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-core:$jackson_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version"
|
||||
compile "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version"
|
||||
compile "com.github.joschi.jackson:jackson-datatype-threetenbp:$jackson_threetenbp_version"
|
||||
compile "org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:$oltu_version"
|
||||
compile "com.brsanthu:migbase64:2.2"
|
||||
compile 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
testCompile "junit:junit:$junit_version"
|
||||
implementation "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
implementation "com.google.code.findbugs:jsr305:3.0.2"
|
||||
implementation "io.github.openfeign:feign-core:$feign_version"
|
||||
implementation "io.github.openfeign:feign-jackson:$feign_version"
|
||||
implementation "io.github.openfeign:feign-slf4j:$feign_version"
|
||||
implementation "io.github.openfeign.form:feign-form:$feign_form_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version"
|
||||
implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version"
|
||||
implementation "com.github.joschi.jackson:jackson-datatype-threetenbp:$jackson_threetenbp_version"
|
||||
implementation "org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:$oltu_version"
|
||||
implementation "com.brsanthu:migbase64:2.2"
|
||||
implementation 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
testImplementation "junit:junit:$junit_version"
|
||||
}
|
||||
|
||||
@@ -107,16 +107,16 @@ ext {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
compile "com.google.code.findbugs:jsr305:3.0.2"
|
||||
compile "com.google.api-client:google-api-client:${google_api_client_version}"
|
||||
compile "org.glassfish.jersey.core:jersey-common:${jersey_common_version}"
|
||||
compile "com.fasterxml.jackson.core:jackson-core:$jackson_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version"
|
||||
compile "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version"
|
||||
compile "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version"
|
||||
compile "com.github.joschi.jackson:jackson-datatype-threetenbp:$jackson_threeten_version"
|
||||
compile 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
testCompile "junit:junit:$junit_version"
|
||||
implementation "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
implementation "com.google.code.findbugs:jsr305:3.0.2"
|
||||
implementation "com.google.api-client:google-api-client:${google_api_client_version}"
|
||||
implementation "org.glassfish.jersey.core:jersey-common:${jersey_common_version}"
|
||||
implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version"
|
||||
implementation "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version"
|
||||
implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version"
|
||||
implementation "com.github.joschi.jackson:jackson-datatype-threetenbp:$jackson_threeten_version"
|
||||
implementation 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
testImplementation "junit:junit:$junit_version"
|
||||
}
|
||||
|
||||
@@ -122,18 +122,18 @@ ext {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
compile "com.google.code.findbugs:jsr305:3.0.2"
|
||||
compile "com.sun.jersey:jersey-client:$jersey_version"
|
||||
compile "com.sun.jersey.contribs:jersey-multipart:$jersey_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-core:$jackson_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version"
|
||||
compile "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version"
|
||||
compile "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version"
|
||||
compile "com.github.joschi.jackson:jackson-datatype-threetenbp:$jackson_threetenbp_version"
|
||||
compile "com.brsanthu:migbase64:2.2"
|
||||
compile 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
testCompile "junit:junit:$junit_version"
|
||||
implementation "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
implementation "com.google.code.findbugs:jsr305:3.0.2"
|
||||
implementation "com.sun.jersey:jersey-client:$jersey_version"
|
||||
implementation "com.sun.jersey.contribs:jersey-multipart:$jersey_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version"
|
||||
implementation "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version"
|
||||
implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version"
|
||||
implementation "com.github.joschi.jackson:jackson-datatype-threetenbp:$jackson_threetenbp_version"
|
||||
implementation "com.brsanthu:migbase64:2.2"
|
||||
implementation 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
testImplementation "junit:junit:$junit_version"
|
||||
}
|
||||
|
||||
|
||||
@@ -104,21 +104,21 @@ ext {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
compile "com.google.code.findbugs:jsr305:3.0.2"
|
||||
compile "org.glassfish.jersey.core:jersey-client:$jersey_version"
|
||||
compile "org.glassfish.jersey.inject:jersey-hk2:$jersey_version"
|
||||
compile "org.glassfish.jersey.media:jersey-media-multipart:$jersey_version"
|
||||
compile "org.glassfish.jersey.media:jersey-media-json-jackson:$jersey_version"
|
||||
compile "org.glassfish.jersey.connectors:jersey-apache-connector:$jersey_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-core:$jackson_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version"
|
||||
compile "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version"
|
||||
compile "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version"
|
||||
compile "com.github.scribejava:scribejava-apis:$scribejava_apis_version"
|
||||
compile 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
testCompile "junit:junit:$junit_version"
|
||||
implementation "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
implementation "com.google.code.findbugs:jsr305:3.0.2"
|
||||
implementation "org.glassfish.jersey.core:jersey-client:$jersey_version"
|
||||
implementation "org.glassfish.jersey.inject:jersey-hk2:$jersey_version"
|
||||
implementation "org.glassfish.jersey.media:jersey-media-multipart:$jersey_version"
|
||||
implementation "org.glassfish.jersey.media:jersey-media-json-jackson:$jersey_version"
|
||||
implementation "org.glassfish.jersey.connectors:jersey-apache-connector:$jersey_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version"
|
||||
implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version"
|
||||
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version"
|
||||
implementation "com.github.scribejava:scribejava-apis:$scribejava_apis_version"
|
||||
implementation 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
testImplementation "junit:junit:$junit_version"
|
||||
}
|
||||
|
||||
javadoc {
|
||||
|
||||
@@ -57,14 +57,14 @@ ext {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
compile "com.google.code.findbugs:jsr305:3.0.2"
|
||||
compile "com.fasterxml.jackson.core:jackson-core:$jackson_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-databind:$jackson_version"
|
||||
compile "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version"
|
||||
compile "org.openapitools:jackson-databind-nullable:0.2.1"
|
||||
compile 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
compile "javax.ws.rs:javax.ws.rs-api:$ws_rs_version"
|
||||
testCompile "junit:junit:$junit_version"
|
||||
implementation "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
implementation "com.google.code.findbugs:jsr305:3.0.2"
|
||||
implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version"
|
||||
implementation "org.openapitools:jackson-databind-nullable:0.2.1"
|
||||
implementation 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
implementation "javax.ws.rs:javax.ws.rs-api:$ws_rs_version"
|
||||
testImplementation "junit:junit:$junit_version"
|
||||
}
|
||||
|
||||
@@ -57,14 +57,14 @@ ext {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
compile "com.google.code.findbugs:jsr305:3.0.2"
|
||||
compile "com.fasterxml.jackson.core:jackson-core:$jackson_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-databind:$jackson_version"
|
||||
compile "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version"
|
||||
compile "org.openapitools:jackson-databind-nullable:0.2.1"
|
||||
compile 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
compile "javax.ws.rs:javax.ws.rs-api:$ws_rs_version"
|
||||
testCompile "junit:junit:$junit_version"
|
||||
implementation "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
implementation "com.google.code.findbugs:jsr305:3.0.2"
|
||||
implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version"
|
||||
implementation "org.openapitools:jackson-databind-nullable:0.2.1"
|
||||
implementation 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
implementation "javax.ws.rs:javax.ws.rs-api:$ws_rs_version"
|
||||
testImplementation "junit:junit:$junit_version"
|
||||
}
|
||||
|
||||
@@ -98,18 +98,18 @@ if(hasProperty('target') && target == 'android') {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile 'io.swagger:swagger-annotations:1.5.24'
|
||||
compile "com.google.code.findbugs:jsr305:3.0.2"
|
||||
compile 'com.squareup.okhttp3:okhttp:3.14.7'
|
||||
compile 'com.squareup.okhttp3:logging-interceptor:3.14.7'
|
||||
compile 'com.google.code.gson:gson:2.8.6'
|
||||
compile 'io.gsonfire:gson-fire:1.8.4'
|
||||
compile group: 'org.apache.oltu.oauth2', name: 'org.apache.oltu.oauth2.client', version: '1.0.1'
|
||||
compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.10'
|
||||
compile 'org.threeten:threetenbp:1.4.3'
|
||||
compile 'io.swagger.parser.v3:swagger-parser-v3:2.0.23'
|
||||
compile 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
testCompile 'junit:junit:4.13.1'
|
||||
implementation 'io.swagger:swagger-annotations:1.5.24'
|
||||
implementation "com.google.code.findbugs:jsr305:3.0.2"
|
||||
implementation 'com.squareup.okhttp3:okhttp:3.14.7'
|
||||
implementation 'com.squareup.okhttp3:logging-interceptor:3.14.7'
|
||||
implementation 'com.google.code.gson:gson:2.8.6'
|
||||
implementation 'io.gsonfire:gson-fire:1.8.4'
|
||||
implementation group: 'org.apache.oltu.oauth2', name: 'org.apache.oltu.oauth2.client', version: '1.0.1'
|
||||
implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.10'
|
||||
implementation 'org.threeten:threetenbp:1.4.3'
|
||||
implementation 'io.swagger.parser.v3:swagger-parser-v3:2.0.23'
|
||||
implementation 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
testImplementation 'junit:junit:4.13.1'
|
||||
}
|
||||
|
||||
javadoc {
|
||||
|
||||
@@ -98,17 +98,17 @@ if(hasProperty('target') && target == 'android') {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile 'io.swagger:swagger-annotations:1.5.24'
|
||||
compile "com.google.code.findbugs:jsr305:3.0.2"
|
||||
compile 'com.squareup.okhttp3:okhttp:3.14.7'
|
||||
compile 'com.squareup.okhttp3:logging-interceptor:3.14.7'
|
||||
compile 'com.google.code.gson:gson:2.8.6'
|
||||
compile 'io.gsonfire:gson-fire:1.8.4'
|
||||
compile group: 'org.apache.oltu.oauth2', name: 'org.apache.oltu.oauth2.client', version: '1.0.1'
|
||||
compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.10'
|
||||
compile 'org.threeten:threetenbp:1.4.3'
|
||||
compile 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
testCompile 'junit:junit:4.13.1'
|
||||
implementation 'io.swagger:swagger-annotations:1.5.24'
|
||||
implementation "com.google.code.findbugs:jsr305:3.0.2"
|
||||
implementation 'com.squareup.okhttp3:okhttp:3.14.7'
|
||||
implementation 'com.squareup.okhttp3:logging-interceptor:3.14.7'
|
||||
implementation 'com.google.code.gson:gson:2.8.6'
|
||||
implementation 'io.gsonfire:gson-fire:1.8.4'
|
||||
implementation group: 'org.apache.oltu.oauth2', name: 'org.apache.oltu.oauth2.client', version: '1.0.1'
|
||||
implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.10'
|
||||
implementation 'org.threeten:threetenbp:1.4.3'
|
||||
implementation 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
testImplementation 'junit:junit:4.13.1'
|
||||
}
|
||||
|
||||
javadoc {
|
||||
|
||||
@@ -98,17 +98,17 @@ if(hasProperty('target') && target == 'android') {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile 'io.swagger:swagger-annotations:1.5.24'
|
||||
compile "com.google.code.findbugs:jsr305:3.0.2"
|
||||
compile 'com.squareup.okhttp3:okhttp:3.14.7'
|
||||
compile 'com.squareup.okhttp3:logging-interceptor:3.14.7'
|
||||
compile 'com.google.code.gson:gson:2.8.6'
|
||||
compile 'io.gsonfire:gson-fire:1.8.4'
|
||||
compile group: 'org.apache.oltu.oauth2', name: 'org.apache.oltu.oauth2.client', version: '1.0.1'
|
||||
compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.10'
|
||||
compile 'org.threeten:threetenbp:1.4.3'
|
||||
compile 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
testCompile 'junit:junit:4.13.1'
|
||||
implementation 'io.swagger:swagger-annotations:1.5.24'
|
||||
implementation "com.google.code.findbugs:jsr305:3.0.2"
|
||||
implementation 'com.squareup.okhttp3:okhttp:3.14.7'
|
||||
implementation 'com.squareup.okhttp3:logging-interceptor:3.14.7'
|
||||
implementation 'com.google.code.gson:gson:2.8.6'
|
||||
implementation 'io.gsonfire:gson-fire:1.8.4'
|
||||
implementation group: 'org.apache.oltu.oauth2', name: 'org.apache.oltu.oauth2.client', version: '1.0.1'
|
||||
implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.10'
|
||||
implementation 'org.threeten:threetenbp:1.4.3'
|
||||
implementation 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
testImplementation 'junit:junit:4.13.1'
|
||||
}
|
||||
|
||||
javadoc {
|
||||
|
||||
@@ -105,18 +105,18 @@ ext {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
compile "com.google.code.findbugs:jsr305:3.0.2"
|
||||
compile "io.rest-assured:rest-assured:$rest_assured_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-core:$jackson_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version"
|
||||
compile "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version"
|
||||
compile "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version"
|
||||
compile "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version"
|
||||
compile "com.squareup.okio:okio:$okio_version"
|
||||
compile "javax.validation:validation-api:2.0.1.Final"
|
||||
compile "org.hibernate:hibernate-validator:6.0.19.Final"
|
||||
compile 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
testCompile "junit:junit:$junit_version"
|
||||
implementation "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
implementation "com.google.code.findbugs:jsr305:3.0.2"
|
||||
implementation "io.rest-assured:rest-assured:$rest_assured_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version"
|
||||
implementation "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version"
|
||||
implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version"
|
||||
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version"
|
||||
implementation "com.squareup.okio:okio:$okio_version"
|
||||
implementation "javax.validation:validation-api:2.0.1.Final"
|
||||
implementation "org.hibernate:hibernate-validator:6.0.19.Final"
|
||||
implementation 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
testImplementation "junit:junit:$junit_version"
|
||||
}
|
||||
|
||||
@@ -105,15 +105,15 @@ ext {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
compile "com.google.code.findbugs:jsr305:3.0.2"
|
||||
compile "io.rest-assured:rest-assured:$rest_assured_version"
|
||||
compile "io.gsonfire:gson-fire:$gson_fire_version"
|
||||
compile 'com.google.code.gson:gson:$gson_version'
|
||||
compile "org.threeten:threetenbp:$threetenbp_version"
|
||||
compile "com.squareup.okio:okio:$okio_version"
|
||||
compile "javax.validation:validation-api:2.0.1.Final"
|
||||
compile "org.hibernate:hibernate-validator:6.0.19.Final"
|
||||
compile 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
testCompile "junit:junit:$junit_version"
|
||||
implementation "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
implementation "com.google.code.findbugs:jsr305:3.0.2"
|
||||
implementation "io.rest-assured:rest-assured:$rest_assured_version"
|
||||
implementation "io.gsonfire:gson-fire:$gson_fire_version"
|
||||
implementation 'com.google.code.gson:gson:$gson_version'
|
||||
implementation "org.threeten:threetenbp:$threetenbp_version"
|
||||
implementation "com.squareup.okio:okio:$okio_version"
|
||||
implementation "javax.validation:validation-api:2.0.1.Final"
|
||||
implementation "org.hibernate:hibernate-validator:6.0.19.Final"
|
||||
implementation 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
testImplementation "junit:junit:$junit_version"
|
||||
}
|
||||
|
||||
@@ -105,19 +105,19 @@ ext {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
compile "com.google.code.findbugs:jsr305:3.0.2"
|
||||
compile "org.jboss.resteasy:resteasy-client:$resteasy_version"
|
||||
compile "org.jboss.resteasy:resteasy-multipart-provider:$resteasy_version"
|
||||
compile "org.jboss.resteasy:resteasy-jackson2-provider:$resteasy_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-core:$jackson_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version"
|
||||
compile "com.github.joschi.jackson:jackson-datatype-threetenbp:$threetenbp_version"
|
||||
compile "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version"
|
||||
compile "com.fasterxml.jackson.datatype:jackson-datatype-joda:$jackson_version"
|
||||
compile "joda-time:joda-time:$jodatime_version"
|
||||
compile "com.brsanthu:migbase64:2.2"
|
||||
compile 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
testCompile "junit:junit:$junit_version"
|
||||
implementation "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
implementation "com.google.code.findbugs:jsr305:3.0.2"
|
||||
implementation "org.jboss.resteasy:resteasy-client:$resteasy_version"
|
||||
implementation "org.jboss.resteasy:resteasy-multipart-provider:$resteasy_version"
|
||||
implementation "org.jboss.resteasy:resteasy-jackson2-provider:$resteasy_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version"
|
||||
implementation "com.github.joschi.jackson:jackson-datatype-threetenbp:$threetenbp_version"
|
||||
implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version"
|
||||
implementation "com.fasterxml.jackson.datatype:jackson-datatype-joda:$jackson_version"
|
||||
implementation "joda-time:joda-time:$jodatime_version"
|
||||
implementation "com.brsanthu:migbase64:2.2"
|
||||
implementation 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
testImplementation "junit:junit:$junit_version"
|
||||
}
|
||||
|
||||
@@ -106,17 +106,17 @@ ext {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
compile "com.google.code.findbugs:jsr305:3.0.2"
|
||||
compile "org.springframework:spring-web:$spring_web_version"
|
||||
compile "org.springframework:spring-context:$spring_web_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-core:$jackson_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version"
|
||||
compile "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version"
|
||||
compile "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version"
|
||||
compile "com.github.joschi.jackson:jackson-datatype-threetenbp:$jackson_threeten_version"
|
||||
compile "com.fasterxml.jackson.dataformat:jackson-dataformat-xml:$jackson_version"
|
||||
compile 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
testCompile "junit:junit:$junit_version"
|
||||
implementation "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
implementation "com.google.code.findbugs:jsr305:3.0.2"
|
||||
implementation "org.springframework:spring-web:$spring_web_version"
|
||||
implementation "org.springframework:spring-context:$spring_web_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version"
|
||||
implementation "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version"
|
||||
implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version"
|
||||
implementation "com.github.joschi.jackson:jackson-datatype-threetenbp:$jackson_threeten_version"
|
||||
implementation "com.fasterxml.jackson.dataformat:jackson-dataformat-xml:$jackson_version"
|
||||
implementation 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
testImplementation "junit:junit:$junit_version"
|
||||
}
|
||||
|
||||
@@ -106,16 +106,16 @@ ext {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
compile "com.google.code.findbugs:jsr305:3.0.2"
|
||||
compile "org.springframework:spring-web:$spring_web_version"
|
||||
compile "org.springframework:spring-context:$spring_web_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-core:$jackson_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version"
|
||||
compile "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version"
|
||||
compile "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version"
|
||||
compile "com.github.joschi.jackson:jackson-datatype-threetenbp:$jackson_threeten_version"
|
||||
compile 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
testCompile "junit:junit:$junit_version"
|
||||
implementation "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
implementation "com.google.code.findbugs:jsr305:3.0.2"
|
||||
implementation "org.springframework:spring-web:$spring_web_version"
|
||||
implementation "org.springframework:spring-context:$spring_web_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version"
|
||||
implementation "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version"
|
||||
implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version"
|
||||
implementation "com.github.joschi.jackson:jackson-datatype-threetenbp:$jackson_threeten_version"
|
||||
implementation 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
testImplementation "junit:junit:$junit_version"
|
||||
}
|
||||
|
||||
@@ -108,24 +108,24 @@ ext {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "com.squareup.retrofit2:retrofit:$retrofit_version"
|
||||
compile "com.squareup.retrofit2:converter-scalars:$retrofit_version"
|
||||
compile "com.squareup.retrofit2:converter-gson:$retrofit_version"
|
||||
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
compile "com.google.code.findbugs:jsr305:3.0.2"
|
||||
compile ("org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:$oltu_version"){
|
||||
implementation "com.squareup.retrofit2:retrofit:$retrofit_version"
|
||||
implementation "com.squareup.retrofit2:converter-scalars:$retrofit_version"
|
||||
implementation "com.squareup.retrofit2:converter-gson:$retrofit_version"
|
||||
implementation "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
implementation "com.google.code.findbugs:jsr305:3.0.2"
|
||||
implementation ("org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:$oltu_version"){
|
||||
exclude group:'org.apache.oltu.oauth2' , module: 'org.apache.oltu.oauth2.common'
|
||||
}
|
||||
compile "io.gsonfire:gson-fire:$json_fire_version"
|
||||
compile "org.threeten:threetenbp:$threetenbp_version"
|
||||
compile "com.typesafe.play:play-ahc-ws_2.12:$play_version"
|
||||
compile "javax.validation:validation-api:1.1.0.Final"
|
||||
compile "com.squareup.retrofit2:converter-jackson:$retrofit_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-core:$jackson_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version"
|
||||
compile "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version"
|
||||
compile "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version"
|
||||
compile 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
testCompile "junit:junit:$junit_version"
|
||||
implementation "io.gsonfire:gson-fire:$json_fire_version"
|
||||
implementation "org.threeten:threetenbp:$threetenbp_version"
|
||||
implementation "com.typesafe.play:play-ahc-ws_2.12:$play_version"
|
||||
implementation "javax.validation:validation-api:1.1.0.Final"
|
||||
implementation "com.squareup.retrofit2:converter-jackson:$retrofit_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version"
|
||||
implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version"
|
||||
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version"
|
||||
implementation 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
testImplementation "junit:junit:$junit_version"
|
||||
}
|
||||
|
||||
@@ -104,16 +104,16 @@ ext {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "com.squareup.retrofit2:retrofit:$retrofit_version"
|
||||
compile "com.squareup.retrofit2:converter-scalars:$retrofit_version"
|
||||
compile "com.squareup.retrofit2:converter-gson:$retrofit_version"
|
||||
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
compile "com.google.code.findbugs:jsr305:3.0.2"
|
||||
compile ("org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:$oltu_version"){
|
||||
implementation "com.squareup.retrofit2:retrofit:$retrofit_version"
|
||||
implementation "com.squareup.retrofit2:converter-scalars:$retrofit_version"
|
||||
implementation "com.squareup.retrofit2:converter-gson:$retrofit_version"
|
||||
implementation "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
implementation "com.google.code.findbugs:jsr305:3.0.2"
|
||||
implementation ("org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:$oltu_version"){
|
||||
exclude group:'org.apache.oltu.oauth2' , module: 'org.apache.oltu.oauth2.common'
|
||||
}
|
||||
compile "io.gsonfire:gson-fire:$json_fire_version"
|
||||
compile "org.threeten:threetenbp:$threetenbp_version"
|
||||
compile 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
testCompile "junit:junit:$junit_version"
|
||||
implementation "io.gsonfire:gson-fire:$json_fire_version"
|
||||
implementation "org.threeten:threetenbp:$threetenbp_version"
|
||||
implementation 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
testImplementation "junit:junit:$junit_version"
|
||||
}
|
||||
|
||||
@@ -105,18 +105,18 @@ ext {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "com.squareup.retrofit2:retrofit:$retrofit_version"
|
||||
compile "com.squareup.retrofit2:converter-scalars:$retrofit_version"
|
||||
compile "com.squareup.retrofit2:converter-gson:$retrofit_version"
|
||||
compile 'com.squareup.retrofit2:adapter-rxjava2:2.3.0'
|
||||
compile "io.reactivex.rxjava2:rxjava:$rx_java_version"
|
||||
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
compile "com.google.code.findbugs:jsr305:3.0.2"
|
||||
compile ("org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:$oltu_version"){
|
||||
implementation "com.squareup.retrofit2:retrofit:$retrofit_version"
|
||||
implementation "com.squareup.retrofit2:converter-scalars:$retrofit_version"
|
||||
implementation "com.squareup.retrofit2:converter-gson:$retrofit_version"
|
||||
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.3.0'
|
||||
implementation "io.reactivex.rxjava2:rxjava:$rx_java_version"
|
||||
implementation "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
implementation "com.google.code.findbugs:jsr305:3.0.2"
|
||||
implementation ("org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:$oltu_version"){
|
||||
exclude group:'org.apache.oltu.oauth2' , module: 'org.apache.oltu.oauth2.common'
|
||||
}
|
||||
compile "io.gsonfire:gson-fire:$json_fire_version"
|
||||
compile "org.threeten:threetenbp:$threetenbp_version"
|
||||
compile 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
testCompile "junit:junit:$junit_version"
|
||||
implementation "io.gsonfire:gson-fire:$json_fire_version"
|
||||
implementation "org.threeten:threetenbp:$threetenbp_version"
|
||||
implementation 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
testImplementation "junit:junit:$junit_version"
|
||||
}
|
||||
|
||||
@@ -105,18 +105,18 @@ ext {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "com.squareup.retrofit2:retrofit:$retrofit_version"
|
||||
compile "com.squareup.retrofit2:converter-scalars:$retrofit_version"
|
||||
compile "com.squareup.retrofit2:converter-gson:$retrofit_version"
|
||||
compile 'com.github.akarnokd:rxjava3-retrofit-adapter:3.0.0'
|
||||
compile "io.reactivex.rxjava3:rxjava:$rx_java_version"
|
||||
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
compile "com.google.code.findbugs:jsr305:3.0.2"
|
||||
compile ("org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:$oltu_version"){
|
||||
implementation "com.squareup.retrofit2:retrofit:$retrofit_version"
|
||||
implementation "com.squareup.retrofit2:converter-scalars:$retrofit_version"
|
||||
implementation "com.squareup.retrofit2:converter-gson:$retrofit_version"
|
||||
implementation 'com.github.akarnokd:rxjava3-retrofit-adapter:3.0.0'
|
||||
implementation "io.reactivex.rxjava3:rxjava:$rx_java_version"
|
||||
implementation "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
implementation "com.google.code.findbugs:jsr305:3.0.2"
|
||||
implementation ("org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:$oltu_version"){
|
||||
exclude group:'org.apache.oltu.oauth2' , module: 'org.apache.oltu.oauth2.common'
|
||||
}
|
||||
compile "io.gsonfire:gson-fire:$json_fire_version"
|
||||
compile "org.threeten:threetenbp:$threetenbp_version"
|
||||
compile 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
testCompile "junit:junit:$junit_version"
|
||||
implementation "io.gsonfire:gson-fire:$json_fire_version"
|
||||
implementation "org.threeten:threetenbp:$threetenbp_version"
|
||||
implementation 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
testImplementation "junit:junit:$junit_version"
|
||||
}
|
||||
|
||||
@@ -36,16 +36,16 @@ ext {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
compile "com.google.code.findbugs:jsr305:3.0.2"
|
||||
compile "io.vertx:vertx-web-client:$vertx_version"
|
||||
compile "io.vertx:vertx-rx-java:$vertx_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-core:$jackson_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version"
|
||||
compile "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version"
|
||||
compile "com.github.joschi.jackson:jackson-datatype-threetenbp:jackson_threeten_version"
|
||||
compile 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
testCompile "junit:junit:$junit_version"
|
||||
testCompile "io.vertx:vertx-unit:$vertx_version"
|
||||
implementation "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
implementation "com.google.code.findbugs:jsr305:3.0.2"
|
||||
implementation "io.vertx:vertx-web-client:$vertx_version"
|
||||
implementation "io.vertx:vertx-rx-java:$vertx_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version"
|
||||
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version"
|
||||
implementation "com.github.joschi.jackson:jackson-datatype-threetenbp:jackson_threeten_version"
|
||||
implementation 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
testImplementation "junit:junit:$junit_version"
|
||||
testImplementation "io.vertx:vertx-unit:$vertx_version"
|
||||
}
|
||||
|
||||
@@ -36,16 +36,16 @@ ext {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
compile "com.google.code.findbugs:jsr305:3.0.2"
|
||||
compile "io.vertx:vertx-web-client:$vertx_version"
|
||||
compile "io.vertx:vertx-rx-java:$vertx_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-core:$jackson_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version"
|
||||
compile "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version"
|
||||
compile "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version"
|
||||
compile 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
testCompile "junit:junit:$junit_version"
|
||||
testCompile "io.vertx:vertx-unit:$vertx_version"
|
||||
implementation "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
implementation "com.google.code.findbugs:jsr305:3.0.2"
|
||||
implementation "io.vertx:vertx-web-client:$vertx_version"
|
||||
implementation "io.vertx:vertx-rx-java:$vertx_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version"
|
||||
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version"
|
||||
implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version"
|
||||
implementation 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
testImplementation "junit:junit:$junit_version"
|
||||
testImplementation "io.vertx:vertx-unit:$vertx_version"
|
||||
}
|
||||
|
||||
@@ -124,18 +124,18 @@ ext {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
compile "com.google.code.findbugs:jsr305:3.0.2"
|
||||
compile "io.projectreactor:reactor-core:$reactor_version"
|
||||
compile "org.springframework:spring-webflux:$spring_web_version"
|
||||
compile "io.projectreactor.ipc:reactor-netty:$reactor_netty_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-core:$jackson_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version"
|
||||
compile "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version"
|
||||
compile "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version"
|
||||
compile "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version"
|
||||
compile "javax.annotation:javax.annotation-api:$javax_annotation_version"
|
||||
testCompile "junit:junit:$junit_version"
|
||||
implementation "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
implementation "com.google.code.findbugs:jsr305:3.0.2"
|
||||
implementation "io.projectreactor:reactor-core:$reactor_version"
|
||||
implementation "org.springframework:spring-webflux:$spring_web_version"
|
||||
implementation "io.projectreactor.ipc:reactor-netty:$reactor_netty_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
|
||||
implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version"
|
||||
implementation "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version"
|
||||
implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version"
|
||||
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version"
|
||||
implementation "javax.annotation:javax.annotation-api:$javax_annotation_version"
|
||||
testImplementation "junit:junit:$junit_version"
|
||||
}
|
||||
|
||||
|
||||
@@ -235,7 +235,7 @@ Use specific imports for apis and models like:
|
||||
- `from petstore_api.api.default_api import DefaultApi`
|
||||
- `from petstore_api.model.pet import Pet`
|
||||
|
||||
Solution 1:
|
||||
Solution 2:
|
||||
Before importing the package, adjust the maximum recursion limit as shown below:
|
||||
```
|
||||
import sys
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
import re # noqa: F401
|
||||
import sys # noqa: F401
|
||||
|
||||
from petstore_api.api_client import ApiClient, Endpoint
|
||||
from petstore_api.api_client import ApiClient, Endpoint as _Endpoint
|
||||
from petstore_api.model_utils import ( # noqa: F401
|
||||
check_allowed_values,
|
||||
check_validations,
|
||||
@@ -102,7 +102,7 @@ class AnotherFakeApi(object):
|
||||
body
|
||||
return self.call_with_http_info(**kwargs)
|
||||
|
||||
self.call_123_test_special_tags = Endpoint(
|
||||
self.call_123_test_special_tags = _Endpoint(
|
||||
settings={
|
||||
'response_type': (Client,),
|
||||
'auth': [],
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
import re # noqa: F401
|
||||
import sys # noqa: F401
|
||||
|
||||
from petstore_api.api_client import ApiClient, Endpoint
|
||||
from petstore_api.api_client import ApiClient, Endpoint as _Endpoint
|
||||
from petstore_api.model_utils import ( # noqa: F401
|
||||
check_allowed_values,
|
||||
check_validations,
|
||||
@@ -105,7 +105,7 @@ class FakeApi(object):
|
||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||
return self.call_with_http_info(**kwargs)
|
||||
|
||||
self.array_model = Endpoint(
|
||||
self.array_model = _Endpoint(
|
||||
settings={
|
||||
'response_type': (AnimalFarm,),
|
||||
'auth': [],
|
||||
@@ -215,7 +215,7 @@ class FakeApi(object):
|
||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||
return self.call_with_http_info(**kwargs)
|
||||
|
||||
self.boolean = Endpoint(
|
||||
self.boolean = _Endpoint(
|
||||
settings={
|
||||
'response_type': (bool,),
|
||||
'auth': [],
|
||||
@@ -329,7 +329,7 @@ class FakeApi(object):
|
||||
xml_item
|
||||
return self.call_with_http_info(**kwargs)
|
||||
|
||||
self.create_xml_item = Endpoint(
|
||||
self.create_xml_item = _Endpoint(
|
||||
settings={
|
||||
'response_type': None,
|
||||
'auth': [],
|
||||
@@ -446,7 +446,7 @@ class FakeApi(object):
|
||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||
return self.call_with_http_info(**kwargs)
|
||||
|
||||
self.number_with_validations = Endpoint(
|
||||
self.number_with_validations = _Endpoint(
|
||||
settings={
|
||||
'response_type': (NumberWithValidations,),
|
||||
'auth': [],
|
||||
@@ -556,7 +556,7 @@ class FakeApi(object):
|
||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||
return self.call_with_http_info(**kwargs)
|
||||
|
||||
self.object_model_with_ref_props = Endpoint(
|
||||
self.object_model_with_ref_props = _Endpoint(
|
||||
settings={
|
||||
'response_type': (ObjectModelWithRefProps,),
|
||||
'auth': [],
|
||||
@@ -666,7 +666,7 @@ class FakeApi(object):
|
||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||
return self.call_with_http_info(**kwargs)
|
||||
|
||||
self.string = Endpoint(
|
||||
self.string = _Endpoint(
|
||||
settings={
|
||||
'response_type': (str,),
|
||||
'auth': [],
|
||||
@@ -776,7 +776,7 @@ class FakeApi(object):
|
||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||
return self.call_with_http_info(**kwargs)
|
||||
|
||||
self.string_enum = Endpoint(
|
||||
self.string_enum = _Endpoint(
|
||||
settings={
|
||||
'response_type': (StringEnum,),
|
||||
'auth': [],
|
||||
@@ -890,7 +890,7 @@ class FakeApi(object):
|
||||
body
|
||||
return self.call_with_http_info(**kwargs)
|
||||
|
||||
self.test_body_with_file_schema = Endpoint(
|
||||
self.test_body_with_file_schema = _Endpoint(
|
||||
settings={
|
||||
'response_type': None,
|
||||
'auth': [],
|
||||
@@ -1009,7 +1009,7 @@ class FakeApi(object):
|
||||
body
|
||||
return self.call_with_http_info(**kwargs)
|
||||
|
||||
self.test_body_with_query_params = Endpoint(
|
||||
self.test_body_with_query_params = _Endpoint(
|
||||
settings={
|
||||
'response_type': None,
|
||||
'auth': [],
|
||||
@@ -1131,7 +1131,7 @@ class FakeApi(object):
|
||||
body
|
||||
return self.call_with_http_info(**kwargs)
|
||||
|
||||
self.test_client_model = Endpoint(
|
||||
self.test_client_model = _Endpoint(
|
||||
settings={
|
||||
'response_type': (Client,),
|
||||
'auth': [],
|
||||
@@ -1265,7 +1265,7 @@ class FakeApi(object):
|
||||
header_number
|
||||
return self.call_with_http_info(**kwargs)
|
||||
|
||||
self.test_endpoint_enums_length_one = Endpoint(
|
||||
self.test_endpoint_enums_length_one = _Endpoint(
|
||||
settings={
|
||||
'response_type': None,
|
||||
'auth': [],
|
||||
@@ -1451,7 +1451,7 @@ class FakeApi(object):
|
||||
byte
|
||||
return self.call_with_http_info(**kwargs)
|
||||
|
||||
self.test_endpoint_parameters = Endpoint(
|
||||
self.test_endpoint_parameters = _Endpoint(
|
||||
settings={
|
||||
'response_type': None,
|
||||
'auth': [
|
||||
@@ -1690,7 +1690,7 @@ class FakeApi(object):
|
||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
||||
return self.call_with_http_info(**kwargs)
|
||||
|
||||
self.test_enum_parameters = Endpoint(
|
||||
self.test_enum_parameters = _Endpoint(
|
||||
settings={
|
||||
'response_type': None,
|
||||
'auth': [],
|
||||
@@ -1905,7 +1905,7 @@ class FakeApi(object):
|
||||
required_int64_group
|
||||
return self.call_with_http_info(**kwargs)
|
||||
|
||||
self.test_group_parameters = Endpoint(
|
||||
self.test_group_parameters = _Endpoint(
|
||||
settings={
|
||||
'response_type': None,
|
||||
'auth': [],
|
||||
@@ -2046,7 +2046,7 @@ class FakeApi(object):
|
||||
param
|
||||
return self.call_with_http_info(**kwargs)
|
||||
|
||||
self.test_inline_additional_properties = Endpoint(
|
||||
self.test_inline_additional_properties = _Endpoint(
|
||||
settings={
|
||||
'response_type': None,
|
||||
'auth': [],
|
||||
@@ -2165,7 +2165,7 @@ class FakeApi(object):
|
||||
param2
|
||||
return self.call_with_http_info(**kwargs)
|
||||
|
||||
self.test_json_form_data = Endpoint(
|
||||
self.test_json_form_data = _Endpoint(
|
||||
settings={
|
||||
'response_type': None,
|
||||
'auth': [],
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
import re # noqa: F401
|
||||
import sys # noqa: F401
|
||||
|
||||
from petstore_api.api_client import ApiClient, Endpoint
|
||||
from petstore_api.api_client import ApiClient, Endpoint as _Endpoint
|
||||
from petstore_api.model_utils import ( # noqa: F401
|
||||
check_allowed_values,
|
||||
check_validations,
|
||||
@@ -102,7 +102,7 @@ class FakeClassnameTags123Api(object):
|
||||
body
|
||||
return self.call_with_http_info(**kwargs)
|
||||
|
||||
self.test_classname = Endpoint(
|
||||
self.test_classname = _Endpoint(
|
||||
settings={
|
||||
'response_type': (Client,),
|
||||
'auth': [
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user