mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-05-12 12:40:53 +00:00
Fix method naming for openapi normalzier, openapi ignore list option (#18348)
* fix openapi normalizer naming issue in config * update openapi generator ignore list setting * update * fix * update sample config * update doc
This commit is contained in:
parent
eb506ee776
commit
ef36ea410e
@ -9,4 +9,5 @@ additionalProperties:
|
||||
useOneOfDiscriminatorLookup: "true"
|
||||
disallowAdditionalPropertiesIfNotPresent: false
|
||||
annotationLibrary: "swagger1"
|
||||
|
||||
openapiNormalizer:
|
||||
SET_TAGS_FOR_ALL_OPERATIONS: common
|
||||
|
@ -12,4 +12,4 @@ additionalProperties:
|
||||
enumPropertyNaming: UPPERCASE
|
||||
serializationLibrary: gson
|
||||
openapiNormalizer:
|
||||
SIMPLIFY_ONEOF_ANYOF=false
|
||||
SIMPLIFY_ONEOF_ANYOF: false
|
||||
|
@ -12,4 +12,4 @@ additionalProperties:
|
||||
enumPropertyNaming: UPPERCASE
|
||||
serializationLibrary: gson
|
||||
openapiNormalizer:
|
||||
SIMPLIFY_ONEOF_ANYOF=false
|
||||
SIMPLIFY_ONEOF_ANYOF: false
|
||||
|
@ -304,6 +304,8 @@ You can use also `config.yml` with following equivalent example:
|
||||
apiPackage: "petstore"
|
||||
```
|
||||
|
||||
Another example of config file can be found in [modules/openapi-generator/src/test/resources/sampleConfig.json](https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/test/resources/sampleConfig.json)
|
||||
|
||||
Supported config options can be different per language. Running `config-help -g {lang}` will show available options.
|
||||
**These options are applied via configuration file (e.g. config.json or config.yml) or by passing them with `-p {optionName}={optionValue}`**. (If `-p {optionName}` does not work, please open a [ticket](https://github.com/openapitools/openapi-generator/issues/new) and we'll look into it)
|
||||
|
||||
|
@ -515,11 +515,11 @@ public class Generate extends OpenApiGeneratorCommand {
|
||||
applyModelNameMappingsKvpList(modelNameMappings, configurator);
|
||||
applyEnumNameMappingsKvpList(enumNameMappings, configurator);
|
||||
applyOperationIdNameMappingsKvpList(operationIdNameMappings, configurator);
|
||||
applyOpenAPINormalizerKvpList(openapiNormalizer, configurator);
|
||||
applyOpenapiNormalizerKvpList(openapiNormalizer, configurator);
|
||||
applyTypeMappingsKvpList(typeMappings, configurator);
|
||||
applyAdditionalPropertiesKvpList(additionalProperties, configurator);
|
||||
applyLanguageSpecificPrimitivesCsvList(languageSpecificPrimitives, configurator);
|
||||
applyOpenAPIGeneratorIgnoreListCsvList(openapiGeneratorIgnoreList, configurator);
|
||||
applyOpenapiGeneratorIgnoreListCsvList(openapiGeneratorIgnoreList, configurator);
|
||||
applyReservedWordsMappingsKvpList(reservedWordsMappings, configurator);
|
||||
applyServerVariablesKvpList(serverVariableOverrides, configurator);
|
||||
|
||||
|
@ -321,7 +321,7 @@ public final class GeneratorSettings implements Serializable {
|
||||
*
|
||||
* @return a map of rules
|
||||
*/
|
||||
public Map<String, String> getOpenAPINormalizer() {
|
||||
public Map<String, String> getOpenapiNormalizer() {
|
||||
return openapiNormalizer;
|
||||
}
|
||||
|
||||
@ -346,7 +346,7 @@ public final class GeneratorSettings implements Serializable {
|
||||
*
|
||||
* @return the openapi generator ignore list
|
||||
*/
|
||||
public Set<String> getOpenAPIGeneratorIgnoreList() {
|
||||
public Set<String> getOpenapiGeneratorIgnoreList() {
|
||||
return openapiGeneratorIgnoreList;
|
||||
}
|
||||
|
||||
@ -614,14 +614,14 @@ public final class GeneratorSettings implements Serializable {
|
||||
if (copy.getOperationIdNameMappings() != null) {
|
||||
builder.operationIdNameMappings.putAll(copy.getOperationIdNameMappings());
|
||||
}
|
||||
if (copy.getOpenAPINormalizer() != null) {
|
||||
builder.openapiNormalizer.putAll(copy.getOpenAPINormalizer());
|
||||
if (copy.getOpenapiNormalizer() != null) {
|
||||
builder.openapiNormalizer.putAll(copy.getOpenapiNormalizer());
|
||||
}
|
||||
if (copy.getLanguageSpecificPrimitives() != null) {
|
||||
builder.languageSpecificPrimitives.addAll(copy.getLanguageSpecificPrimitives());
|
||||
}
|
||||
if (copy.getOpenAPIGeneratorIgnoreList() != null) {
|
||||
builder.openapiGeneratorIgnoreList.addAll(copy.getOpenAPIGeneratorIgnoreList());
|
||||
if (copy.getOpenapiGeneratorIgnoreList() != null) {
|
||||
builder.openapiGeneratorIgnoreList.addAll(copy.getOpenapiGeneratorIgnoreList());
|
||||
}
|
||||
if (copy.getReservedWordsMappings() != null) {
|
||||
builder.reservedWordsMappings.putAll(copy.getReservedWordsMappings());
|
||||
@ -1152,7 +1152,7 @@ public final class GeneratorSettings implements Serializable {
|
||||
* @param openapiNormalizer the {@code openapiNormalizer} to set
|
||||
* @return a reference to this Builder
|
||||
*/
|
||||
public Builder withOpenAPINormalizer(Map<String, String> openapiNormalizer) {
|
||||
public Builder withOpenapiNormalizer(Map<String, String> openapiNormalizer) {
|
||||
this.openapiNormalizer = openapiNormalizer;
|
||||
return this;
|
||||
}
|
||||
@ -1164,7 +1164,7 @@ public final class GeneratorSettings implements Serializable {
|
||||
* @param value The value of the OpenAPI normalizer rule
|
||||
* @return a reference to this Builder
|
||||
*/
|
||||
public Builder withOpenAPINormalizer(String key, String value) {
|
||||
public Builder withOpenapiNormalizer(String key, String value) {
|
||||
if (this.openapiNormalizer == null) {
|
||||
this.openapiNormalizer = new HashMap<>();
|
||||
}
|
||||
@ -1203,7 +1203,7 @@ public final class GeneratorSettings implements Serializable {
|
||||
* @param openapiGeneratorIgnoreList the {@code openapiGeneratorIgnoreList} to set
|
||||
* @return a reference to this Builder
|
||||
*/
|
||||
public Builder withOpenAPIGeneratorIgnoreList(Set<String> openapiGeneratorIgnoreList) {
|
||||
public Builder withOpenapiGeneratorIgnoreList(Set<String> openapiGeneratorIgnoreList) {
|
||||
this.openapiGeneratorIgnoreList = openapiGeneratorIgnoreList;
|
||||
return this;
|
||||
}
|
||||
@ -1214,7 +1214,7 @@ public final class GeneratorSettings implements Serializable {
|
||||
* @param value The value of entry to set
|
||||
* @return a reference to this Builder
|
||||
*/
|
||||
public Builder withOpenAPIGeneratorIgnoreList(String value) {
|
||||
public Builder withOpenapiGeneratorIgnoreList(String value) {
|
||||
if (this.openapiGeneratorIgnoreList == null) {
|
||||
this.openapiGeneratorIgnoreList = new HashSet<>();
|
||||
}
|
||||
@ -1390,9 +1390,9 @@ public final class GeneratorSettings implements Serializable {
|
||||
Objects.equals(getModelNameMappings(), that.getModelNameMappings()) &&
|
||||
Objects.equals(getEnumNameMappings(), that.getEnumNameMappings()) &&
|
||||
Objects.equals(getOperationIdNameMappings(), that.getOperationIdNameMappings()) &&
|
||||
Objects.equals(getOpenAPINormalizer(), that.getOpenAPINormalizer()) &&
|
||||
Objects.equals(getOpenapiNormalizer(), that.getOpenapiNormalizer()) &&
|
||||
Objects.equals(getLanguageSpecificPrimitives(), that.getLanguageSpecificPrimitives()) &&
|
||||
Objects.equals(getOpenAPIGeneratorIgnoreList(), that.getOpenAPIGeneratorIgnoreList()) &&
|
||||
Objects.equals(getOpenapiGeneratorIgnoreList(), that.getOpenapiGeneratorIgnoreList()) &&
|
||||
Objects.equals(getReservedWordsMappings(), that.getReservedWordsMappings()) &&
|
||||
Objects.equals(getGitHost(), that.getGitHost()) &&
|
||||
Objects.equals(getGitUserId(), that.getGitUserId()) &&
|
||||
@ -1428,9 +1428,9 @@ public final class GeneratorSettings implements Serializable {
|
||||
getModelNameMappings(),
|
||||
getEnumNameMappings(),
|
||||
getOperationIdNameMappings(),
|
||||
getOpenAPINormalizer(),
|
||||
getOpenapiNormalizer(),
|
||||
getLanguageSpecificPrimitives(),
|
||||
getOpenAPIGeneratorIgnoreList(),
|
||||
getOpenapiGeneratorIgnoreList(),
|
||||
getReservedWordsMappings(),
|
||||
getGitHost(),
|
||||
getGitUserId(),
|
||||
|
@ -887,7 +887,7 @@ open class GenerateTask @Inject constructor(private val objectFactory: ObjectFac
|
||||
|
||||
if (openapiNormalizer.isPresent) {
|
||||
openapiNormalizer.get().forEach { entry ->
|
||||
configurator.addOpenAPINormalizer(entry.key, entry.value)
|
||||
configurator.addOpenapiNormalizer(entry.key, entry.value)
|
||||
}
|
||||
}
|
||||
|
||||
@ -917,7 +917,7 @@ open class GenerateTask @Inject constructor(private val objectFactory: ObjectFac
|
||||
|
||||
if (openapiGeneratorIgnoreList.isPresent) {
|
||||
openapiGeneratorIgnoreList.get().forEach {
|
||||
configurator.addOpenAPIGeneratorIgnoreList(it)
|
||||
configurator.addOpenapiGeneratorIgnoreList(it)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -829,7 +829,7 @@ public class CodeGenMojo extends AbstractMojo {
|
||||
|
||||
// Retained for backwards-compatibility with configOptions -> openapi-normalizer
|
||||
if (openapiNormalizer == null && configOptions.containsKey("openapi-normalizer")) {
|
||||
applyOpenAPINormalizerKvp(configOptions.get("openapi-normalizer").toString(),
|
||||
applyOpenapiNormalizerKvp(configOptions.get("openapi-normalizer").toString(),
|
||||
configurator);
|
||||
}
|
||||
|
||||
@ -846,7 +846,7 @@ public class CodeGenMojo extends AbstractMojo {
|
||||
|
||||
// Retained for backwards-compatibility with configOptions -> openapi-generator-ignore-list
|
||||
if (openapiGeneratorIgnoreList == null && configOptions.containsKey("openapi-generator-ignore-list")) {
|
||||
applyOpenAPIGeneratorIgnoreListCsv(configOptions
|
||||
applyOpenapiGeneratorIgnoreListCsv(configOptions
|
||||
.get("openapi-generator-ignore-list").toString(), configurator);
|
||||
}
|
||||
|
||||
@ -919,7 +919,7 @@ public class CodeGenMojo extends AbstractMojo {
|
||||
|
||||
// Apply OpenAPI normalizer rules
|
||||
if (openapiNormalizer != null && (configOptions == null || !configOptions.containsKey("openapi-normalizer"))) {
|
||||
applyOpenAPINormalizerKvpList(openapiNormalizer, configurator);
|
||||
applyOpenapiNormalizerKvpList(openapiNormalizer, configurator);
|
||||
}
|
||||
|
||||
// Apply Type Mappings
|
||||
@ -936,7 +936,7 @@ public class CodeGenMojo extends AbstractMojo {
|
||||
// Apply Language Specific Primitives
|
||||
if (openapiGeneratorIgnoreList != null
|
||||
&& (configOptions == null || !configOptions.containsKey("openapi-generator-ignore-list"))) {
|
||||
applyOpenAPIGeneratorIgnoreListCsvList(openapiGeneratorIgnoreList, configurator);
|
||||
applyOpenapiGeneratorIgnoreListCsvList(openapiGeneratorIgnoreList, configurator);
|
||||
}
|
||||
|
||||
// Apply Additional Properties
|
||||
|
@ -358,8 +358,8 @@ public interface CodegenConfig {
|
||||
|
||||
boolean getAddSuffixToDuplicateOperationNicknames();
|
||||
|
||||
boolean getUseOpenAPINormalizer();
|
||||
boolean getUseOpenapiNormalizer();
|
||||
|
||||
Set<String> getOpenAPIGeneratorIgnoreList();
|
||||
Set<String> getOpenapiGeneratorIgnoreList();
|
||||
|
||||
}
|
||||
|
@ -8475,10 +8475,10 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
public boolean getUseInlineModelResolver() { return true; }
|
||||
|
||||
@Override
|
||||
public boolean getUseOpenAPINormalizer() { return true; }
|
||||
public boolean getUseOpenapiNormalizer() { return true; }
|
||||
|
||||
@Override
|
||||
public Set<String> getOpenAPIGeneratorIgnoreList() {
|
||||
public Set<String> getOpenapiGeneratorIgnoreList() {
|
||||
return openapiGeneratorIgnoreList;
|
||||
}
|
||||
|
||||
|
@ -265,7 +265,7 @@ public class DefaultGenerator implements Generator {
|
||||
|
||||
// normalize the spec
|
||||
try {
|
||||
if (config.getUseOpenAPINormalizer()) {
|
||||
if (config.getUseOpenapiNormalizer()) {
|
||||
SemVer version = new SemVer(openAPI.getOpenapi());
|
||||
if (version.atLeast("3.1.0")) {
|
||||
config.openapiNormalizer().put("NORMALIZE_31SPEC", "true");
|
||||
@ -929,8 +929,8 @@ public class DefaultGenerator implements Generator {
|
||||
/*
|
||||
* Generate .openapi-generator-ignore if the option openapiGeneratorIgnoreFile is enabled.
|
||||
*/
|
||||
private void generateOpenAPIGeneratorIgnoreFile() {
|
||||
if (config.getOpenAPIGeneratorIgnoreList() == null || config.getOpenAPIGeneratorIgnoreList().isEmpty()) {
|
||||
private void generateOpenapiGeneratorIgnoreFile() {
|
||||
if (config.getOpenapiGeneratorIgnoreList() == null || config.getOpenapiGeneratorIgnoreList().isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -982,7 +982,7 @@ public class DefaultGenerator implements Generator {
|
||||
Writer fileWriter = Files.newBufferedWriter(ignoreFile.toPath(), StandardCharsets.UTF_8);
|
||||
fileWriter.write(header);
|
||||
// add entries provided by the users
|
||||
for (String entry : config.getOpenAPIGeneratorIgnoreList()) {
|
||||
for (String entry : config.getOpenapiGeneratorIgnoreList()) {
|
||||
fileWriter.write(entry);
|
||||
fileWriter.write("\n");
|
||||
}
|
||||
@ -1219,7 +1219,7 @@ public class DefaultGenerator implements Generator {
|
||||
processUserDefinedTemplates();
|
||||
|
||||
// generate .openapi-generator-ignore if the option openapiGeneratorIgnoreFile is enabled
|
||||
generateOpenAPIGeneratorIgnoreFile();
|
||||
generateOpenapiGeneratorIgnoreFile();
|
||||
|
||||
List<File> files = new ArrayList<>();
|
||||
// models
|
||||
|
@ -145,14 +145,14 @@ public class CodegenConfigurator {
|
||||
if(generatorSettings.getOperationIdNameMappings() != null) {
|
||||
configurator.operationIdNameMappings.putAll(generatorSettings.getOperationIdNameMappings());
|
||||
}
|
||||
if(generatorSettings.getOpenAPINormalizer() != null) {
|
||||
configurator.openapiNormalizer.putAll(generatorSettings.getOpenAPINormalizer());
|
||||
if(generatorSettings.getOpenapiNormalizer() != null) {
|
||||
configurator.openapiNormalizer.putAll(generatorSettings.getOpenapiNormalizer());
|
||||
}
|
||||
if(generatorSettings.getLanguageSpecificPrimitives() != null) {
|
||||
configurator.languageSpecificPrimitives.addAll(generatorSettings.getLanguageSpecificPrimitives());
|
||||
}
|
||||
if(generatorSettings.getOpenAPIGeneratorIgnoreList() != null) {
|
||||
configurator.openapiGeneratorIgnoreList.addAll(generatorSettings.getOpenAPIGeneratorIgnoreList());
|
||||
if(generatorSettings.getOpenapiGeneratorIgnoreList() != null) {
|
||||
configurator.openapiGeneratorIgnoreList.addAll(generatorSettings.getOpenapiGeneratorIgnoreList());
|
||||
}
|
||||
if(generatorSettings.getReservedWordsMappings() != null) {
|
||||
configurator.reservedWordsMappings.putAll(generatorSettings.getReservedWordsMappings());
|
||||
@ -268,9 +268,9 @@ public class CodegenConfigurator {
|
||||
return this;
|
||||
}
|
||||
|
||||
public CodegenConfigurator addOpenAPINormalizer(String key, String value) {
|
||||
public CodegenConfigurator addOpenapiNormalizer(String key, String value) {
|
||||
this.openapiNormalizer.put(key, value);
|
||||
generatorSettingsBuilder.withOpenAPINormalizer(key, value);
|
||||
generatorSettingsBuilder.withOpenapiNormalizer(key, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
@ -286,9 +286,9 @@ public class CodegenConfigurator {
|
||||
return this;
|
||||
}
|
||||
|
||||
public CodegenConfigurator addOpenAPIGeneratorIgnoreList(String value) {
|
||||
public CodegenConfigurator addOpenapiGeneratorIgnoreList(String value) {
|
||||
this.openapiGeneratorIgnoreList.add(value);
|
||||
generatorSettingsBuilder.withOpenAPIGeneratorIgnoreList(value);
|
||||
generatorSettingsBuilder.withOpenapiGeneratorIgnoreList(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
@ -482,9 +482,9 @@ public class CodegenConfigurator {
|
||||
return this;
|
||||
}
|
||||
|
||||
public CodegenConfigurator setOpenAPINormalizer(Map<String, String> openapiNormalizer) {
|
||||
public CodegenConfigurator setOpenapiNormalizer(Map<String, String> openapiNormalizer) {
|
||||
this.openapiNormalizer = openapiNormalizer;
|
||||
generatorSettingsBuilder.withOpenAPINormalizer(openapiNormalizer);
|
||||
generatorSettingsBuilder.withOpenapiNormalizer(openapiNormalizer);
|
||||
return this;
|
||||
}
|
||||
|
||||
@ -515,10 +515,10 @@ public class CodegenConfigurator {
|
||||
return this;
|
||||
}
|
||||
|
||||
public CodegenConfigurator setOpenAPIGeneratorIgnoreList(
|
||||
public CodegenConfigurator setOpenapiGeneratorIgnoreList(
|
||||
Set<String> openapiGeneratorIgnoreList) {
|
||||
this.openapiGeneratorIgnoreList = openapiGeneratorIgnoreList;
|
||||
generatorSettingsBuilder.withOpenAPIGeneratorIgnoreList(openapiGeneratorIgnoreList);
|
||||
generatorSettingsBuilder.withOpenapiGeneratorIgnoreList(openapiGeneratorIgnoreList);
|
||||
return this;
|
||||
}
|
||||
|
||||
@ -779,9 +779,9 @@ public class CodegenConfigurator {
|
||||
config.modelNameMapping().putAll(generatorSettings.getModelNameMappings());
|
||||
config.enumNameMapping().putAll(generatorSettings.getEnumNameMappings());
|
||||
config.operationIdNameMapping().putAll(generatorSettings.getOperationIdNameMappings());
|
||||
config.openapiNormalizer().putAll(generatorSettings.getOpenAPINormalizer());
|
||||
config.openapiNormalizer().putAll(generatorSettings.getOpenapiNormalizer());
|
||||
config.languageSpecificPrimitives().addAll(generatorSettings.getLanguageSpecificPrimitives());
|
||||
config.openapiGeneratorIgnoreList().addAll(generatorSettings.getOpenAPIGeneratorIgnoreList());
|
||||
config.openapiGeneratorIgnoreList().addAll(generatorSettings.getOpenapiGeneratorIgnoreList());
|
||||
config.reservedWordsMappings().putAll(generatorSettings.getReservedWordsMappings());
|
||||
config.additionalProperties().putAll(generatorSettings.getAdditionalProperties());
|
||||
|
||||
|
@ -185,16 +185,16 @@ public final class CodegenConfiguratorUtils {
|
||||
}
|
||||
}
|
||||
|
||||
public static void applyOpenAPINormalizerKvpList(List<String> openapiNormalizer, CodegenConfigurator configurator) {
|
||||
public static void applyOpenapiNormalizerKvpList(List<String> openapiNormalizer, CodegenConfigurator configurator) {
|
||||
for (String propString : openapiNormalizer) {
|
||||
applyOpenAPINormalizerKvp(propString, configurator);
|
||||
applyOpenapiNormalizerKvp(propString, configurator);
|
||||
}
|
||||
}
|
||||
|
||||
public static void applyOpenAPINormalizerKvp(String openapiNormalizer, CodegenConfigurator configurator) {
|
||||
public static void applyOpenapiNormalizerKvp(String openapiNormalizer, CodegenConfigurator configurator) {
|
||||
final Map<String, String> map = createMapFromKeyValuePairs(openapiNormalizer);
|
||||
for (Map.Entry<String, String> entry : map.entrySet()) {
|
||||
configurator.addOpenAPINormalizer(entry.getKey().trim(), entry.getValue().trim());
|
||||
configurator.addOpenapiNormalizer(entry.getKey().trim(), entry.getValue().trim());
|
||||
}
|
||||
}
|
||||
|
||||
@ -250,16 +250,16 @@ public final class CodegenConfiguratorUtils {
|
||||
}
|
||||
}
|
||||
|
||||
public static void applyOpenAPIGeneratorIgnoreListCsvList(List<String> openapiGeneratorIgnoreList, CodegenConfigurator configurator) {
|
||||
public static void applyOpenapiGeneratorIgnoreListCsvList(List<String> openapiGeneratorIgnoreList, CodegenConfigurator configurator) {
|
||||
for (String propString : openapiGeneratorIgnoreList) {
|
||||
applyOpenAPIGeneratorIgnoreListCsv(propString, configurator);
|
||||
applyOpenapiGeneratorIgnoreListCsv(propString, configurator);
|
||||
}
|
||||
}
|
||||
|
||||
public static void applyOpenAPIGeneratorIgnoreListCsv(String openapiGeneratorIgnoreList, CodegenConfigurator configurator) {
|
||||
public static void applyOpenapiGeneratorIgnoreListCsv(String openapiGeneratorIgnoreList, CodegenConfigurator configurator) {
|
||||
final Set<String> set = createSetFromCsvList(openapiGeneratorIgnoreList);
|
||||
for (String item : set) {
|
||||
configurator.addOpenAPIGeneratorIgnoreList(item);
|
||||
configurator.addOpenapiGeneratorIgnoreList(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3015,7 +3015,7 @@ public class JavaClientCodegenTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testOpenAPIGeneratorIgnoreListOption() throws IOException {
|
||||
public void testOpenapiGeneratorIgnoreListOption() throws IOException {
|
||||
File output = Files.createTempDirectory("openapi_generator_ignore_list_test_folder").toFile().getCanonicalFile();
|
||||
output.deleteOnExit();
|
||||
final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/allof_primitive.yaml");
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"lang" : "java",
|
||||
"inputSpec" : "swagger.yaml",
|
||||
"outputDir" : "src/gen/java",
|
||||
"generatorName" : "java",
|
||||
"inputSpec" : "module/openapi-generator/src/test/resources/3_0/petstore.yaml",
|
||||
"outputDir" : "output/src/gen/java",
|
||||
"verbose" : true,
|
||||
"skipOverwrite" : true,
|
||||
"templateDir" : "src/main/resources",
|
||||
@ -17,6 +17,12 @@
|
||||
"globalProperties" : {
|
||||
"systemProp1" : "value1"
|
||||
},
|
||||
"modelNameMappings" : {
|
||||
"Tag": "Label"
|
||||
},
|
||||
"openapiNormalizer" : {
|
||||
"REFACTOR_ALLOF_WITH_PROPERTIES_ONLY": true
|
||||
},
|
||||
"instantiationTypes" : {
|
||||
"hello" : "world"
|
||||
},
|
||||
@ -30,4 +36,4 @@
|
||||
"type1" : "import1"
|
||||
},
|
||||
"languageSpecificPrimitives" : [ "rolex" ]
|
||||
}
|
||||
}
|
||||
|
@ -6,14 +6,12 @@ api/openapi.yaml
|
||||
build.gradle
|
||||
build.sbt
|
||||
docs/Category.md
|
||||
docs/CommonApi.md
|
||||
docs/ModelApiResponse.md
|
||||
docs/Order.md
|
||||
docs/Pet.md
|
||||
docs/PetApi.md
|
||||
docs/StoreApi.md
|
||||
docs/Tag.md
|
||||
docs/User.md
|
||||
docs/UserApi.md
|
||||
git_push.sh
|
||||
gradle.properties
|
||||
gradle/wrapper/gradle-wrapper.jar
|
||||
@ -36,9 +34,7 @@ src/main/java/org/openapitools/client/ProgressResponseBody.java
|
||||
src/main/java/org/openapitools/client/ServerConfiguration.java
|
||||
src/main/java/org/openapitools/client/ServerVariable.java
|
||||
src/main/java/org/openapitools/client/StringUtil.java
|
||||
src/main/java/org/openapitools/client/api/PetApi.java
|
||||
src/main/java/org/openapitools/client/api/StoreApi.java
|
||||
src/main/java/org/openapitools/client/api/UserApi.java
|
||||
src/main/java/org/openapitools/client/api/CommonApi.java
|
||||
src/main/java/org/openapitools/client/auth/ApiKeyAuth.java
|
||||
src/main/java/org/openapitools/client/auth/Authentication.java
|
||||
src/main/java/org/openapitools/client/auth/HttpBasicAuth.java
|
||||
|
@ -85,7 +85,7 @@ import org.openapitools.client.ApiException;
|
||||
import org.openapitools.client.Configuration;
|
||||
import org.openapitools.client.auth.*;
|
||||
import org.openapitools.client.models.*;
|
||||
import org.openapitools.client.api.PetApi;
|
||||
import org.openapitools.client.api.CommonApi;
|
||||
|
||||
public class Example {
|
||||
public static void main(String[] args) {
|
||||
@ -96,13 +96,13 @@ public class Example {
|
||||
OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
|
||||
petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
|
||||
|
||||
PetApi apiInstance = new PetApi(defaultClient);
|
||||
CommonApi apiInstance = new CommonApi(defaultClient);
|
||||
Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store
|
||||
try {
|
||||
Pet result = apiInstance.addPet(pet);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling PetApi#addPet");
|
||||
System.err.println("Exception when calling CommonApi#addPet");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
@ -119,26 +119,26 @@ All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
|
||||
Class | Method | HTTP request | Description
|
||||
------------ | ------------- | ------------- | -------------
|
||||
*PetApi* | [**addPet**](docs/PetApi.md#addPet) | **POST** /pet | Add a new pet to the store
|
||||
*PetApi* | [**deletePet**](docs/PetApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet
|
||||
*PetApi* | [**findPetsByStatus**](docs/PetApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status
|
||||
*PetApi* | [**findPetsByTags**](docs/PetApi.md#findPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags
|
||||
*PetApi* | [**getPetById**](docs/PetApi.md#getPetById) | **GET** /pet/{petId} | Find pet by ID
|
||||
*PetApi* | [**updatePet**](docs/PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
|
||||
*PetApi* | [**updatePetWithForm**](docs/PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
|
||||
*PetApi* | [**uploadFile**](docs/PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
|
||||
*StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
|
||||
*StoreApi* | [**getInventory**](docs/StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status
|
||||
*StoreApi* | [**getOrderById**](docs/StoreApi.md#getOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID
|
||||
*StoreApi* | [**placeOrder**](docs/StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet
|
||||
*UserApi* | [**createUser**](docs/UserApi.md#createUser) | **POST** /user | Create user
|
||||
*UserApi* | [**createUsersWithArrayInput**](docs/UserApi.md#createUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array
|
||||
*UserApi* | [**createUsersWithListInput**](docs/UserApi.md#createUsersWithListInput) | **POST** /user/createWithList | Creates list of users with given input array
|
||||
*UserApi* | [**deleteUser**](docs/UserApi.md#deleteUser) | **DELETE** /user/{username} | Delete user
|
||||
*UserApi* | [**getUserByName**](docs/UserApi.md#getUserByName) | **GET** /user/{username} | Get user by user name
|
||||
*UserApi* | [**loginUser**](docs/UserApi.md#loginUser) | **GET** /user/login | Logs user into the system
|
||||
*UserApi* | [**logoutUser**](docs/UserApi.md#logoutUser) | **GET** /user/logout | Logs out current logged in user session
|
||||
*UserApi* | [**updateUser**](docs/UserApi.md#updateUser) | **PUT** /user/{username} | Updated user
|
||||
*CommonApi* | [**addPet**](docs/CommonApi.md#addPet) | **POST** /pet | Add a new pet to the store
|
||||
*CommonApi* | [**createUser**](docs/CommonApi.md#createUser) | **POST** /user | Create user
|
||||
*CommonApi* | [**createUsersWithArrayInput**](docs/CommonApi.md#createUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array
|
||||
*CommonApi* | [**createUsersWithListInput**](docs/CommonApi.md#createUsersWithListInput) | **POST** /user/createWithList | Creates list of users with given input array
|
||||
*CommonApi* | [**deleteOrder**](docs/CommonApi.md#deleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
|
||||
*CommonApi* | [**deletePet**](docs/CommonApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet
|
||||
*CommonApi* | [**deleteUser**](docs/CommonApi.md#deleteUser) | **DELETE** /user/{username} | Delete user
|
||||
*CommonApi* | [**findPetsByStatus**](docs/CommonApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status
|
||||
*CommonApi* | [**findPetsByTags**](docs/CommonApi.md#findPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags
|
||||
*CommonApi* | [**getInventory**](docs/CommonApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status
|
||||
*CommonApi* | [**getOrderById**](docs/CommonApi.md#getOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID
|
||||
*CommonApi* | [**getPetById**](docs/CommonApi.md#getPetById) | **GET** /pet/{petId} | Find pet by ID
|
||||
*CommonApi* | [**getUserByName**](docs/CommonApi.md#getUserByName) | **GET** /user/{username} | Get user by user name
|
||||
*CommonApi* | [**loginUser**](docs/CommonApi.md#loginUser) | **GET** /user/login | Logs user into the system
|
||||
*CommonApi* | [**logoutUser**](docs/CommonApi.md#logoutUser) | **GET** /user/logout | Logs out current logged in user session
|
||||
*CommonApi* | [**placeOrder**](docs/CommonApi.md#placeOrder) | **POST** /store/order | Place an order for a pet
|
||||
*CommonApi* | [**updatePet**](docs/CommonApi.md#updatePet) | **PUT** /pet | Update an existing pet
|
||||
*CommonApi* | [**updatePetWithForm**](docs/CommonApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
|
||||
*CommonApi* | [**updateUser**](docs/CommonApi.md#updateUser) | **PUT** /user/{username} | Updated user
|
||||
*CommonApi* | [**uploadFile**](docs/CommonApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
|
||||
|
||||
|
||||
## Documentation for Models
|
||||
|
@ -44,7 +44,7 @@ paths:
|
||||
- read:pets
|
||||
summary: Add a new pet to the store
|
||||
tags:
|
||||
- pet
|
||||
- common
|
||||
x-content-type: application/json
|
||||
x-accepts:
|
||||
- application/json
|
||||
@ -79,7 +79,7 @@ paths:
|
||||
- read:pets
|
||||
summary: Update an existing pet
|
||||
tags:
|
||||
- pet
|
||||
- common
|
||||
x-content-type: application/json
|
||||
x-accepts:
|
||||
- application/json
|
||||
@ -126,7 +126,7 @@ paths:
|
||||
- read:pets
|
||||
summary: Finds Pets by status
|
||||
tags:
|
||||
- pet
|
||||
- common
|
||||
x-accepts:
|
||||
- application/json
|
||||
- application/xml
|
||||
@ -168,7 +168,7 @@ paths:
|
||||
- read:pets
|
||||
summary: Finds Pets by tags
|
||||
tags:
|
||||
- pet
|
||||
- common
|
||||
x-accepts:
|
||||
- application/json
|
||||
- application/xml
|
||||
@ -202,7 +202,7 @@ paths:
|
||||
- read:pets
|
||||
summary: Deletes a pet
|
||||
tags:
|
||||
- pet
|
||||
- common
|
||||
x-accepts:
|
||||
- application/json
|
||||
get:
|
||||
@ -236,7 +236,7 @@ paths:
|
||||
- api_key: []
|
||||
summary: Find pet by ID
|
||||
tags:
|
||||
- pet
|
||||
- common
|
||||
x-accepts:
|
||||
- application/json
|
||||
- application/xml
|
||||
@ -267,7 +267,7 @@ paths:
|
||||
- read:pets
|
||||
summary: Updates a pet in the store with form data
|
||||
tags:
|
||||
- pet
|
||||
- common
|
||||
x-content-type: application/x-www-form-urlencoded
|
||||
x-accepts:
|
||||
- application/json
|
||||
@ -303,7 +303,7 @@ paths:
|
||||
- read:pets
|
||||
summary: uploads an image
|
||||
tags:
|
||||
- pet
|
||||
- common
|
||||
x-content-type: multipart/form-data
|
||||
x-accepts:
|
||||
- application/json
|
||||
@ -325,7 +325,7 @@ paths:
|
||||
- api_key: []
|
||||
summary: Returns pet inventories by status
|
||||
tags:
|
||||
- store
|
||||
- common
|
||||
x-accepts:
|
||||
- application/json
|
||||
/store/order:
|
||||
@ -353,7 +353,7 @@ paths:
|
||||
description: Invalid Order
|
||||
summary: Place an order for a pet
|
||||
tags:
|
||||
- store
|
||||
- common
|
||||
x-content-type: application/json
|
||||
x-accepts:
|
||||
- application/json
|
||||
@ -379,7 +379,7 @@ paths:
|
||||
description: Order not found
|
||||
summary: Delete purchase order by ID
|
||||
tags:
|
||||
- store
|
||||
- common
|
||||
x-accepts:
|
||||
- application/json
|
||||
get:
|
||||
@ -414,7 +414,7 @@ paths:
|
||||
description: Order not found
|
||||
summary: Find purchase order by ID
|
||||
tags:
|
||||
- store
|
||||
- common
|
||||
x-accepts:
|
||||
- application/json
|
||||
- application/xml
|
||||
@ -436,7 +436,7 @@ paths:
|
||||
- api_key: []
|
||||
summary: Create user
|
||||
tags:
|
||||
- user
|
||||
- common
|
||||
x-content-type: application/json
|
||||
x-accepts:
|
||||
- application/json
|
||||
@ -453,7 +453,7 @@ paths:
|
||||
- api_key: []
|
||||
summary: Creates list of users with given input array
|
||||
tags:
|
||||
- user
|
||||
- common
|
||||
x-content-type: application/json
|
||||
x-accepts:
|
||||
- application/json
|
||||
@ -470,7 +470,7 @@ paths:
|
||||
- api_key: []
|
||||
summary: Creates list of users with given input array
|
||||
tags:
|
||||
- user
|
||||
- common
|
||||
x-content-type: application/json
|
||||
x-accepts:
|
||||
- application/json
|
||||
@ -533,7 +533,7 @@ paths:
|
||||
description: Invalid username/password supplied
|
||||
summary: Logs user into the system
|
||||
tags:
|
||||
- user
|
||||
- common
|
||||
x-accepts:
|
||||
- application/json
|
||||
- application/xml
|
||||
@ -548,7 +548,7 @@ paths:
|
||||
- api_key: []
|
||||
summary: Logs out current logged in user session
|
||||
tags:
|
||||
- user
|
||||
- common
|
||||
x-accepts:
|
||||
- application/json
|
||||
/user/{username}:
|
||||
@ -573,7 +573,7 @@ paths:
|
||||
- api_key: []
|
||||
summary: Delete user
|
||||
tags:
|
||||
- user
|
||||
- common
|
||||
x-accepts:
|
||||
- application/json
|
||||
get:
|
||||
@ -604,7 +604,7 @@ paths:
|
||||
description: User not found
|
||||
summary: Get user by user name
|
||||
tags:
|
||||
- user
|
||||
- common
|
||||
x-accepts:
|
||||
- application/json
|
||||
- application/xml
|
||||
@ -636,7 +636,7 @@ paths:
|
||||
- api_key: []
|
||||
summary: Updated user
|
||||
tags:
|
||||
- user
|
||||
- common
|
||||
x-content-type: application/json
|
||||
x-accepts:
|
||||
- application/json
|
||||
|
1373
samples/client/petstore/java/okhttp-gson-swagger1/docs/CommonApi.md
Normal file
1373
samples/client/petstore/java/okhttp-gson-swagger1/docs/CommonApi.md
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,570 +0,0 @@
|
||||
# PetApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
|
||||
| Method | HTTP request | Description |
|
||||
|------------- | ------------- | -------------|
|
||||
| [**addPet**](PetApi.md#addPet) | **POST** /pet | Add a new pet to the store |
|
||||
| [**deletePet**](PetApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet |
|
||||
| [**findPetsByStatus**](PetApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status |
|
||||
| [**findPetsByTags**](PetApi.md#findPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags |
|
||||
| [**getPetById**](PetApi.md#getPetById) | **GET** /pet/{petId} | Find pet by ID |
|
||||
| [**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet |
|
||||
| [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data |
|
||||
| [**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image |
|
||||
|
||||
|
||||
<a id="addPet"></a>
|
||||
# **addPet**
|
||||
> Pet addPet(pet)
|
||||
|
||||
Add a new pet to the store
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
import org.openapitools.client.ApiClient;
|
||||
import org.openapitools.client.ApiException;
|
||||
import org.openapitools.client.Configuration;
|
||||
import org.openapitools.client.auth.*;
|
||||
import org.openapitools.client.models.*;
|
||||
import org.openapitools.client.api.PetApi;
|
||||
|
||||
public class Example {
|
||||
public static void main(String[] args) {
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
defaultClient.setBasePath("http://petstore.swagger.io/v2");
|
||||
|
||||
// Configure OAuth2 access token for authorization: petstore_auth
|
||||
OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
|
||||
petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
|
||||
|
||||
PetApi apiInstance = new PetApi(defaultClient);
|
||||
Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store
|
||||
try {
|
||||
Pet result = apiInstance.addPet(pet);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling PetApi#addPet");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------------- | ------------- | ------------- | -------------|
|
||||
| **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | |
|
||||
|
||||
### Return type
|
||||
|
||||
[**Pet**](Pet.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
| **405** | Invalid input | - |
|
||||
|
||||
<a id="deletePet"></a>
|
||||
# **deletePet**
|
||||
> deletePet(petId, apiKey)
|
||||
|
||||
Deletes a pet
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
import org.openapitools.client.ApiClient;
|
||||
import org.openapitools.client.ApiException;
|
||||
import org.openapitools.client.Configuration;
|
||||
import org.openapitools.client.auth.*;
|
||||
import org.openapitools.client.models.*;
|
||||
import org.openapitools.client.api.PetApi;
|
||||
|
||||
public class Example {
|
||||
public static void main(String[] args) {
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
defaultClient.setBasePath("http://petstore.swagger.io/v2");
|
||||
|
||||
// Configure OAuth2 access token for authorization: petstore_auth
|
||||
OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
|
||||
petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
|
||||
|
||||
PetApi apiInstance = new PetApi(defaultClient);
|
||||
Long petId = 56L; // Long | Pet id to delete
|
||||
String apiKey = "apiKey_example"; // String |
|
||||
try {
|
||||
apiInstance.deletePet(petId, apiKey);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling PetApi#deletePet");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------------- | ------------- | ------------- | -------------|
|
||||
| **petId** | **Long**| Pet id to delete | |
|
||||
| **apiKey** | **String**| | [optional] |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **400** | Invalid pet value | - |
|
||||
|
||||
<a id="findPetsByStatus"></a>
|
||||
# **findPetsByStatus**
|
||||
> List<Pet> findPetsByStatus(status)
|
||||
|
||||
Finds Pets by status
|
||||
|
||||
Multiple status values can be provided with comma separated strings
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
import org.openapitools.client.ApiClient;
|
||||
import org.openapitools.client.ApiException;
|
||||
import org.openapitools.client.Configuration;
|
||||
import org.openapitools.client.auth.*;
|
||||
import org.openapitools.client.models.*;
|
||||
import org.openapitools.client.api.PetApi;
|
||||
|
||||
public class Example {
|
||||
public static void main(String[] args) {
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
defaultClient.setBasePath("http://petstore.swagger.io/v2");
|
||||
|
||||
// Configure OAuth2 access token for authorization: petstore_auth
|
||||
OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
|
||||
petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
|
||||
|
||||
PetApi apiInstance = new PetApi(defaultClient);
|
||||
List<String> status = Arrays.asList("available"); // List<String> | Status values that need to be considered for filter
|
||||
try {
|
||||
List<Pet> result = apiInstance.findPetsByStatus(status);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling PetApi#findPetsByStatus");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------------- | ------------- | ------------- | -------------|
|
||||
| **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [enum: available, pending, sold] |
|
||||
|
||||
### Return type
|
||||
|
||||
[**List<Pet>**](Pet.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
| **400** | Invalid status value | - |
|
||||
|
||||
<a id="findPetsByTags"></a>
|
||||
# **findPetsByTags**
|
||||
> List<Pet> findPetsByTags(tags)
|
||||
|
||||
Finds Pets by tags
|
||||
|
||||
Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
import org.openapitools.client.ApiClient;
|
||||
import org.openapitools.client.ApiException;
|
||||
import org.openapitools.client.Configuration;
|
||||
import org.openapitools.client.auth.*;
|
||||
import org.openapitools.client.models.*;
|
||||
import org.openapitools.client.api.PetApi;
|
||||
|
||||
public class Example {
|
||||
public static void main(String[] args) {
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
defaultClient.setBasePath("http://petstore.swagger.io/v2");
|
||||
|
||||
// Configure OAuth2 access token for authorization: petstore_auth
|
||||
OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
|
||||
petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
|
||||
|
||||
PetApi apiInstance = new PetApi(defaultClient);
|
||||
List<String> tags = Arrays.asList(); // List<String> | Tags to filter by
|
||||
try {
|
||||
List<Pet> result = apiInstance.findPetsByTags(tags);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling PetApi#findPetsByTags");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------------- | ------------- | ------------- | -------------|
|
||||
| **tags** | [**List<String>**](String.md)| Tags to filter by | |
|
||||
|
||||
### Return type
|
||||
|
||||
[**List<Pet>**](Pet.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
| **400** | Invalid tag value | - |
|
||||
|
||||
<a id="getPetById"></a>
|
||||
# **getPetById**
|
||||
> Pet getPetById(petId)
|
||||
|
||||
Find pet by ID
|
||||
|
||||
Returns a single pet
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
import org.openapitools.client.ApiClient;
|
||||
import org.openapitools.client.ApiException;
|
||||
import org.openapitools.client.Configuration;
|
||||
import org.openapitools.client.auth.*;
|
||||
import org.openapitools.client.models.*;
|
||||
import org.openapitools.client.api.PetApi;
|
||||
|
||||
public class Example {
|
||||
public static void main(String[] args) {
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
defaultClient.setBasePath("http://petstore.swagger.io/v2");
|
||||
|
||||
// Configure API key authorization: api_key
|
||||
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
|
||||
api_key.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//api_key.setApiKeyPrefix("Token");
|
||||
|
||||
PetApi apiInstance = new PetApi(defaultClient);
|
||||
Long petId = 56L; // Long | ID of pet to return
|
||||
try {
|
||||
Pet result = apiInstance.getPetById(petId);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling PetApi#getPetById");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------------- | ------------- | ------------- | -------------|
|
||||
| **petId** | **Long**| ID of pet to return | |
|
||||
|
||||
### Return type
|
||||
|
||||
[**Pet**](Pet.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[api_key](../README.md#api_key)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
| **400** | Invalid ID supplied | - |
|
||||
| **404** | Pet not found | - |
|
||||
|
||||
<a id="updatePet"></a>
|
||||
# **updatePet**
|
||||
> Pet updatePet(pet)
|
||||
|
||||
Update an existing pet
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
import org.openapitools.client.ApiClient;
|
||||
import org.openapitools.client.ApiException;
|
||||
import org.openapitools.client.Configuration;
|
||||
import org.openapitools.client.auth.*;
|
||||
import org.openapitools.client.models.*;
|
||||
import org.openapitools.client.api.PetApi;
|
||||
|
||||
public class Example {
|
||||
public static void main(String[] args) {
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
defaultClient.setBasePath("http://petstore.swagger.io/v2");
|
||||
|
||||
// Configure OAuth2 access token for authorization: petstore_auth
|
||||
OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
|
||||
petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
|
||||
|
||||
PetApi apiInstance = new PetApi(defaultClient);
|
||||
Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store
|
||||
try {
|
||||
Pet result = apiInstance.updatePet(pet);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling PetApi#updatePet");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------------- | ------------- | ------------- | -------------|
|
||||
| **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | |
|
||||
|
||||
### Return type
|
||||
|
||||
[**Pet**](Pet.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
| **400** | Invalid ID supplied | - |
|
||||
| **404** | Pet not found | - |
|
||||
| **405** | Validation exception | - |
|
||||
|
||||
<a id="updatePetWithForm"></a>
|
||||
# **updatePetWithForm**
|
||||
> updatePetWithForm(petId, name, status)
|
||||
|
||||
Updates a pet in the store with form data
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
import org.openapitools.client.ApiClient;
|
||||
import org.openapitools.client.ApiException;
|
||||
import org.openapitools.client.Configuration;
|
||||
import org.openapitools.client.auth.*;
|
||||
import org.openapitools.client.models.*;
|
||||
import org.openapitools.client.api.PetApi;
|
||||
|
||||
public class Example {
|
||||
public static void main(String[] args) {
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
defaultClient.setBasePath("http://petstore.swagger.io/v2");
|
||||
|
||||
// Configure OAuth2 access token for authorization: petstore_auth
|
||||
OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
|
||||
petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
|
||||
|
||||
PetApi apiInstance = new PetApi(defaultClient);
|
||||
Long petId = 56L; // Long | ID of pet that needs to be updated
|
||||
String name = "name_example"; // String | Updated name of the pet
|
||||
String status = "status_example"; // String | Updated status of the pet
|
||||
try {
|
||||
apiInstance.updatePetWithForm(petId, name, status);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling PetApi#updatePetWithForm");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------------- | ------------- | ------------- | -------------|
|
||||
| **petId** | **Long**| ID of pet that needs to be updated | |
|
||||
| **name** | **String**| Updated name of the pet | [optional] |
|
||||
| **status** | **String**| Updated status of the pet | [optional] |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/x-www-form-urlencoded
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **405** | Invalid input | - |
|
||||
|
||||
<a id="uploadFile"></a>
|
||||
# **uploadFile**
|
||||
> ModelApiResponse uploadFile(petId, additionalMetadata, _file)
|
||||
|
||||
uploads an image
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
import org.openapitools.client.ApiClient;
|
||||
import org.openapitools.client.ApiException;
|
||||
import org.openapitools.client.Configuration;
|
||||
import org.openapitools.client.auth.*;
|
||||
import org.openapitools.client.models.*;
|
||||
import org.openapitools.client.api.PetApi;
|
||||
|
||||
public class Example {
|
||||
public static void main(String[] args) {
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
defaultClient.setBasePath("http://petstore.swagger.io/v2");
|
||||
|
||||
// Configure OAuth2 access token for authorization: petstore_auth
|
||||
OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
|
||||
petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
|
||||
|
||||
PetApi apiInstance = new PetApi(defaultClient);
|
||||
Long petId = 56L; // Long | ID of pet to update
|
||||
String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server
|
||||
File _file = new File("/path/to/file"); // File | file to upload
|
||||
try {
|
||||
ModelApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, _file);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling PetApi#uploadFile");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------------- | ------------- | ------------- | -------------|
|
||||
| **petId** | **Long**| ID of pet to update | |
|
||||
| **additionalMetadata** | **String**| Additional data to pass to server | [optional] |
|
||||
| **_file** | **File**| file to upload | [optional] |
|
||||
|
||||
### Return type
|
||||
|
||||
[**ModelApiResponse**](ModelApiResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: multipart/form-data
|
||||
- **Accept**: application/json
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
|
@ -1,266 +0,0 @@
|
||||
# StoreApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
|
||||
| Method | HTTP request | Description |
|
||||
|------------- | ------------- | -------------|
|
||||
| [**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID |
|
||||
| [**getInventory**](StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status |
|
||||
| [**getOrderById**](StoreApi.md#getOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID |
|
||||
| [**placeOrder**](StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet |
|
||||
|
||||
|
||||
<a id="deleteOrder"></a>
|
||||
# **deleteOrder**
|
||||
> deleteOrder(orderId)
|
||||
|
||||
Delete purchase order by ID
|
||||
|
||||
For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
import org.openapitools.client.ApiClient;
|
||||
import org.openapitools.client.ApiException;
|
||||
import org.openapitools.client.Configuration;
|
||||
import org.openapitools.client.models.*;
|
||||
import org.openapitools.client.api.StoreApi;
|
||||
|
||||
public class Example {
|
||||
public static void main(String[] args) {
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
defaultClient.setBasePath("http://petstore.swagger.io/v2");
|
||||
|
||||
StoreApi apiInstance = new StoreApi(defaultClient);
|
||||
String orderId = "orderId_example"; // String | ID of the order that needs to be deleted
|
||||
try {
|
||||
apiInstance.deleteOrder(orderId);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling StoreApi#deleteOrder");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------------- | ------------- | ------------- | -------------|
|
||||
| **orderId** | **String**| ID of the order that needs to be deleted | |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **400** | Invalid ID supplied | - |
|
||||
| **404** | Order not found | - |
|
||||
|
||||
<a id="getInventory"></a>
|
||||
# **getInventory**
|
||||
> Map<String, Integer> getInventory()
|
||||
|
||||
Returns pet inventories by status
|
||||
|
||||
Returns a map of status codes to quantities
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
import org.openapitools.client.ApiClient;
|
||||
import org.openapitools.client.ApiException;
|
||||
import org.openapitools.client.Configuration;
|
||||
import org.openapitools.client.auth.*;
|
||||
import org.openapitools.client.models.*;
|
||||
import org.openapitools.client.api.StoreApi;
|
||||
|
||||
public class Example {
|
||||
public static void main(String[] args) {
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
defaultClient.setBasePath("http://petstore.swagger.io/v2");
|
||||
|
||||
// Configure API key authorization: api_key
|
||||
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
|
||||
api_key.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//api_key.setApiKeyPrefix("Token");
|
||||
|
||||
StoreApi apiInstance = new StoreApi(defaultClient);
|
||||
try {
|
||||
Map<String, Integer> result = apiInstance.getInventory();
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling StoreApi#getInventory");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
**Map<String, Integer>**
|
||||
|
||||
### Authorization
|
||||
|
||||
[api_key](../README.md#api_key)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
|
||||
<a id="getOrderById"></a>
|
||||
# **getOrderById**
|
||||
> Order getOrderById(orderId)
|
||||
|
||||
Find purchase order by ID
|
||||
|
||||
For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
import org.openapitools.client.ApiClient;
|
||||
import org.openapitools.client.ApiException;
|
||||
import org.openapitools.client.Configuration;
|
||||
import org.openapitools.client.models.*;
|
||||
import org.openapitools.client.api.StoreApi;
|
||||
|
||||
public class Example {
|
||||
public static void main(String[] args) {
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
defaultClient.setBasePath("http://petstore.swagger.io/v2");
|
||||
|
||||
StoreApi apiInstance = new StoreApi(defaultClient);
|
||||
Long orderId = 56L; // Long | ID of pet that needs to be fetched
|
||||
try {
|
||||
Order result = apiInstance.getOrderById(orderId);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling StoreApi#getOrderById");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------------- | ------------- | ------------- | -------------|
|
||||
| **orderId** | **Long**| ID of pet that needs to be fetched | |
|
||||
|
||||
### Return type
|
||||
|
||||
[**Order**](Order.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
| **400** | Invalid ID supplied | - |
|
||||
| **404** | Order not found | - |
|
||||
|
||||
<a id="placeOrder"></a>
|
||||
# **placeOrder**
|
||||
> Order placeOrder(order)
|
||||
|
||||
Place an order for a pet
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
import org.openapitools.client.ApiClient;
|
||||
import org.openapitools.client.ApiException;
|
||||
import org.openapitools.client.Configuration;
|
||||
import org.openapitools.client.models.*;
|
||||
import org.openapitools.client.api.StoreApi;
|
||||
|
||||
public class Example {
|
||||
public static void main(String[] args) {
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
defaultClient.setBasePath("http://petstore.swagger.io/v2");
|
||||
|
||||
StoreApi apiInstance = new StoreApi(defaultClient);
|
||||
Order order = new Order(); // Order | order placed for purchasing the pet
|
||||
try {
|
||||
Order result = apiInstance.placeOrder(order);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling StoreApi#placeOrder");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------------- | ------------- | ------------- | -------------|
|
||||
| **order** | [**Order**](Order.md)| order placed for purchasing the pet | |
|
||||
|
||||
### Return type
|
||||
|
||||
[**Order**](Order.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
| **400** | Invalid Order | - |
|
||||
|
@ -1,553 +0,0 @@
|
||||
# UserApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
|
||||
| Method | HTTP request | Description |
|
||||
|------------- | ------------- | -------------|
|
||||
| [**createUser**](UserApi.md#createUser) | **POST** /user | Create user |
|
||||
| [**createUsersWithArrayInput**](UserApi.md#createUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array |
|
||||
| [**createUsersWithListInput**](UserApi.md#createUsersWithListInput) | **POST** /user/createWithList | Creates list of users with given input array |
|
||||
| [**deleteUser**](UserApi.md#deleteUser) | **DELETE** /user/{username} | Delete user |
|
||||
| [**getUserByName**](UserApi.md#getUserByName) | **GET** /user/{username} | Get user by user name |
|
||||
| [**loginUser**](UserApi.md#loginUser) | **GET** /user/login | Logs user into the system |
|
||||
| [**logoutUser**](UserApi.md#logoutUser) | **GET** /user/logout | Logs out current logged in user session |
|
||||
| [**updateUser**](UserApi.md#updateUser) | **PUT** /user/{username} | Updated user |
|
||||
|
||||
|
||||
<a id="createUser"></a>
|
||||
# **createUser**
|
||||
> createUser(user)
|
||||
|
||||
Create user
|
||||
|
||||
This can only be done by the logged in user.
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
import org.openapitools.client.ApiClient;
|
||||
import org.openapitools.client.ApiException;
|
||||
import org.openapitools.client.Configuration;
|
||||
import org.openapitools.client.auth.*;
|
||||
import org.openapitools.client.models.*;
|
||||
import org.openapitools.client.api.UserApi;
|
||||
|
||||
public class Example {
|
||||
public static void main(String[] args) {
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
defaultClient.setBasePath("http://petstore.swagger.io/v2");
|
||||
|
||||
// Configure API key authorization: api_key
|
||||
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
|
||||
api_key.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//api_key.setApiKeyPrefix("Token");
|
||||
|
||||
UserApi apiInstance = new UserApi(defaultClient);
|
||||
User user = new User(); // User | Created user object
|
||||
try {
|
||||
apiInstance.createUser(user);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling UserApi#createUser");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------------- | ------------- | ------------- | -------------|
|
||||
| **user** | [**User**](User.md)| Created user object | |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[api_key](../README.md#api_key)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **0** | successful operation | - |
|
||||
|
||||
<a id="createUsersWithArrayInput"></a>
|
||||
# **createUsersWithArrayInput**
|
||||
> createUsersWithArrayInput(user)
|
||||
|
||||
Creates list of users with given input array
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
import org.openapitools.client.ApiClient;
|
||||
import org.openapitools.client.ApiException;
|
||||
import org.openapitools.client.Configuration;
|
||||
import org.openapitools.client.auth.*;
|
||||
import org.openapitools.client.models.*;
|
||||
import org.openapitools.client.api.UserApi;
|
||||
|
||||
public class Example {
|
||||
public static void main(String[] args) {
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
defaultClient.setBasePath("http://petstore.swagger.io/v2");
|
||||
|
||||
// Configure API key authorization: api_key
|
||||
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
|
||||
api_key.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//api_key.setApiKeyPrefix("Token");
|
||||
|
||||
UserApi apiInstance = new UserApi(defaultClient);
|
||||
List<User> user = Arrays.asList(); // List<User> | List of user object
|
||||
try {
|
||||
apiInstance.createUsersWithArrayInput(user);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling UserApi#createUsersWithArrayInput");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------------- | ------------- | ------------- | -------------|
|
||||
| **user** | [**List<User>**](User.md)| List of user object | |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[api_key](../README.md#api_key)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **0** | successful operation | - |
|
||||
|
||||
<a id="createUsersWithListInput"></a>
|
||||
# **createUsersWithListInput**
|
||||
> createUsersWithListInput(user)
|
||||
|
||||
Creates list of users with given input array
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
import org.openapitools.client.ApiClient;
|
||||
import org.openapitools.client.ApiException;
|
||||
import org.openapitools.client.Configuration;
|
||||
import org.openapitools.client.auth.*;
|
||||
import org.openapitools.client.models.*;
|
||||
import org.openapitools.client.api.UserApi;
|
||||
|
||||
public class Example {
|
||||
public static void main(String[] args) {
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
defaultClient.setBasePath("http://petstore.swagger.io/v2");
|
||||
|
||||
// Configure API key authorization: api_key
|
||||
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
|
||||
api_key.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//api_key.setApiKeyPrefix("Token");
|
||||
|
||||
UserApi apiInstance = new UserApi(defaultClient);
|
||||
List<User> user = Arrays.asList(); // List<User> | List of user object
|
||||
try {
|
||||
apiInstance.createUsersWithListInput(user);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling UserApi#createUsersWithListInput");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------------- | ------------- | ------------- | -------------|
|
||||
| **user** | [**List<User>**](User.md)| List of user object | |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[api_key](../README.md#api_key)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **0** | successful operation | - |
|
||||
|
||||
<a id="deleteUser"></a>
|
||||
# **deleteUser**
|
||||
> deleteUser(username)
|
||||
|
||||
Delete user
|
||||
|
||||
This can only be done by the logged in user.
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
import org.openapitools.client.ApiClient;
|
||||
import org.openapitools.client.ApiException;
|
||||
import org.openapitools.client.Configuration;
|
||||
import org.openapitools.client.auth.*;
|
||||
import org.openapitools.client.models.*;
|
||||
import org.openapitools.client.api.UserApi;
|
||||
|
||||
public class Example {
|
||||
public static void main(String[] args) {
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
defaultClient.setBasePath("http://petstore.swagger.io/v2");
|
||||
|
||||
// Configure API key authorization: api_key
|
||||
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
|
||||
api_key.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//api_key.setApiKeyPrefix("Token");
|
||||
|
||||
UserApi apiInstance = new UserApi(defaultClient);
|
||||
String username = "username_example"; // String | The name that needs to be deleted
|
||||
try {
|
||||
apiInstance.deleteUser(username);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling UserApi#deleteUser");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------------- | ------------- | ------------- | -------------|
|
||||
| **username** | **String**| The name that needs to be deleted | |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[api_key](../README.md#api_key)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **400** | Invalid username supplied | - |
|
||||
| **404** | User not found | - |
|
||||
|
||||
<a id="getUserByName"></a>
|
||||
# **getUserByName**
|
||||
> User getUserByName(username)
|
||||
|
||||
Get user by user name
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
import org.openapitools.client.ApiClient;
|
||||
import org.openapitools.client.ApiException;
|
||||
import org.openapitools.client.Configuration;
|
||||
import org.openapitools.client.models.*;
|
||||
import org.openapitools.client.api.UserApi;
|
||||
|
||||
public class Example {
|
||||
public static void main(String[] args) {
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
defaultClient.setBasePath("http://petstore.swagger.io/v2");
|
||||
|
||||
UserApi apiInstance = new UserApi(defaultClient);
|
||||
String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing.
|
||||
try {
|
||||
User result = apiInstance.getUserByName(username);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling UserApi#getUserByName");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------------- | ------------- | ------------- | -------------|
|
||||
| **username** | **String**| The name that needs to be fetched. Use user1 for testing. | |
|
||||
|
||||
### Return type
|
||||
|
||||
[**User**](User.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
| **400** | Invalid username supplied | - |
|
||||
| **404** | User not found | - |
|
||||
|
||||
<a id="loginUser"></a>
|
||||
# **loginUser**
|
||||
> String loginUser(username, password)
|
||||
|
||||
Logs user into the system
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
import org.openapitools.client.ApiClient;
|
||||
import org.openapitools.client.ApiException;
|
||||
import org.openapitools.client.Configuration;
|
||||
import org.openapitools.client.models.*;
|
||||
import org.openapitools.client.api.UserApi;
|
||||
|
||||
public class Example {
|
||||
public static void main(String[] args) {
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
defaultClient.setBasePath("http://petstore.swagger.io/v2");
|
||||
|
||||
UserApi apiInstance = new UserApi(defaultClient);
|
||||
String username = "username_example"; // String | The user name for login
|
||||
String password = "password_example"; // String | The password for login in clear text
|
||||
try {
|
||||
String result = apiInstance.loginUser(username, password);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling UserApi#loginUser");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------------- | ------------- | ------------- | -------------|
|
||||
| **username** | **String**| The user name for login | |
|
||||
| **password** | **String**| The password for login in clear text | |
|
||||
|
||||
### Return type
|
||||
|
||||
**String**
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | * Set-Cookie - Cookie authentication key for use with the `api_key` apiKey authentication. <br> * X-Rate-Limit - calls per hour allowed by the user <br> * X-Expires-After - date in UTC when token expires <br> |
|
||||
| **400** | Invalid username/password supplied | - |
|
||||
|
||||
<a id="logoutUser"></a>
|
||||
# **logoutUser**
|
||||
> logoutUser()
|
||||
|
||||
Logs out current logged in user session
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
import org.openapitools.client.ApiClient;
|
||||
import org.openapitools.client.ApiException;
|
||||
import org.openapitools.client.Configuration;
|
||||
import org.openapitools.client.auth.*;
|
||||
import org.openapitools.client.models.*;
|
||||
import org.openapitools.client.api.UserApi;
|
||||
|
||||
public class Example {
|
||||
public static void main(String[] args) {
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
defaultClient.setBasePath("http://petstore.swagger.io/v2");
|
||||
|
||||
// Configure API key authorization: api_key
|
||||
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
|
||||
api_key.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//api_key.setApiKeyPrefix("Token");
|
||||
|
||||
UserApi apiInstance = new UserApi(defaultClient);
|
||||
try {
|
||||
apiInstance.logoutUser();
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling UserApi#logoutUser");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[api_key](../README.md#api_key)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **0** | successful operation | - |
|
||||
|
||||
<a id="updateUser"></a>
|
||||
# **updateUser**
|
||||
> updateUser(username, user)
|
||||
|
||||
Updated user
|
||||
|
||||
This can only be done by the logged in user.
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
import org.openapitools.client.ApiClient;
|
||||
import org.openapitools.client.ApiException;
|
||||
import org.openapitools.client.Configuration;
|
||||
import org.openapitools.client.auth.*;
|
||||
import org.openapitools.client.models.*;
|
||||
import org.openapitools.client.api.UserApi;
|
||||
|
||||
public class Example {
|
||||
public static void main(String[] args) {
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
defaultClient.setBasePath("http://petstore.swagger.io/v2");
|
||||
|
||||
// Configure API key authorization: api_key
|
||||
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
|
||||
api_key.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//api_key.setApiKeyPrefix("Token");
|
||||
|
||||
UserApi apiInstance = new UserApi(defaultClient);
|
||||
String username = "username_example"; // String | name that need to be deleted
|
||||
User user = new User(); // User | Updated user object
|
||||
try {
|
||||
apiInstance.updateUser(username, user);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling UserApi#updateUser");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------------- | ------------- | ------------- | -------------|
|
||||
| **username** | **String**| name that need to be deleted | |
|
||||
| **user** | [**User**](User.md)| Updated user object | |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[api_key](../README.md#api_key)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **400** | Invalid user supplied | - |
|
||||
| **404** | User not found | - |
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,570 +0,0 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package org.openapitools.client.api;
|
||||
|
||||
import org.openapitools.client.ApiCallback;
|
||||
import org.openapitools.client.ApiClient;
|
||||
import org.openapitools.client.ApiException;
|
||||
import org.openapitools.client.ApiResponse;
|
||||
import org.openapitools.client.Configuration;
|
||||
import org.openapitools.client.Pair;
|
||||
import org.openapitools.client.ProgressRequestBody;
|
||||
import org.openapitools.client.ProgressResponseBody;
|
||||
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
|
||||
import org.openapitools.client.model.Order;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class StoreApi {
|
||||
private ApiClient localVarApiClient;
|
||||
private int localHostIndex;
|
||||
private String localCustomBaseUrl;
|
||||
|
||||
public StoreApi() {
|
||||
this(Configuration.getDefaultApiClient());
|
||||
}
|
||||
|
||||
public StoreApi(ApiClient apiClient) {
|
||||
this.localVarApiClient = apiClient;
|
||||
}
|
||||
|
||||
public ApiClient getApiClient() {
|
||||
return localVarApiClient;
|
||||
}
|
||||
|
||||
public void setApiClient(ApiClient apiClient) {
|
||||
this.localVarApiClient = apiClient;
|
||||
}
|
||||
|
||||
public int getHostIndex() {
|
||||
return localHostIndex;
|
||||
}
|
||||
|
||||
public void setHostIndex(int hostIndex) {
|
||||
this.localHostIndex = hostIndex;
|
||||
}
|
||||
|
||||
public String getCustomBaseUrl() {
|
||||
return localCustomBaseUrl;
|
||||
}
|
||||
|
||||
public void setCustomBaseUrl(String customBaseUrl) {
|
||||
this.localCustomBaseUrl = customBaseUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build call for deleteOrder
|
||||
* @param orderId ID of the order that needs to be deleted (required)
|
||||
* @param _callback Callback for upload/download progress
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
* @http.response.details
|
||||
<table summary="Response Details" border="1">
|
||||
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
|
||||
<tr><td> 400 </td><td> Invalid ID supplied </td><td> - </td></tr>
|
||||
<tr><td> 404 </td><td> Order not found </td><td> - </td></tr>
|
||||
</table>
|
||||
*/
|
||||
public okhttp3.Call deleteOrderCall(String orderId, final ApiCallback _callback) throws ApiException {
|
||||
String basePath = null;
|
||||
// Operation Servers
|
||||
String[] localBasePaths = new String[] { };
|
||||
|
||||
// Determine Base Path to Use
|
||||
if (localCustomBaseUrl != null){
|
||||
basePath = localCustomBaseUrl;
|
||||
} else if ( localBasePaths.length > 0 ) {
|
||||
basePath = localBasePaths[localHostIndex];
|
||||
} else {
|
||||
basePath = null;
|
||||
}
|
||||
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/store/order/{orderId}"
|
||||
.replace("{" + "orderId" + "}", localVarApiClient.escapeString(orderId.toString()));
|
||||
|
||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
|
||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||
|
||||
final String[] localVarAccepts = {
|
||||
};
|
||||
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
|
||||
if (localVarAccept != null) {
|
||||
localVarHeaderParams.put("Accept", localVarAccept);
|
||||
}
|
||||
|
||||
final String[] localVarContentTypes = {
|
||||
};
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
if (localVarContentType != null) {
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call deleteOrderValidateBeforeCall(String orderId, final ApiCallback _callback) throws ApiException {
|
||||
// verify the required parameter 'orderId' is set
|
||||
if (orderId == null) {
|
||||
throw new ApiException("Missing the required parameter 'orderId' when calling deleteOrder(Async)");
|
||||
}
|
||||
|
||||
return deleteOrderCall(orderId, _callback);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete purchase order by ID
|
||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
* @param orderId ID of the order that needs to be deleted (required)
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
* @http.response.details
|
||||
<table summary="Response Details" border="1">
|
||||
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
|
||||
<tr><td> 400 </td><td> Invalid ID supplied </td><td> - </td></tr>
|
||||
<tr><td> 404 </td><td> Order not found </td><td> - </td></tr>
|
||||
</table>
|
||||
*/
|
||||
public void deleteOrder(String orderId) throws ApiException {
|
||||
deleteOrderWithHttpInfo(orderId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete purchase order by ID
|
||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
* @param orderId ID of the order that needs to be deleted (required)
|
||||
* @return ApiResponse<Void>
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
* @http.response.details
|
||||
<table summary="Response Details" border="1">
|
||||
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
|
||||
<tr><td> 400 </td><td> Invalid ID supplied </td><td> - </td></tr>
|
||||
<tr><td> 404 </td><td> Order not found </td><td> - </td></tr>
|
||||
</table>
|
||||
*/
|
||||
public ApiResponse<Void> deleteOrderWithHttpInfo(String orderId) throws ApiException {
|
||||
okhttp3.Call localVarCall = deleteOrderValidateBeforeCall(orderId, null);
|
||||
return localVarApiClient.execute(localVarCall);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete purchase order by ID (asynchronously)
|
||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
* @param orderId ID of the order that needs to be deleted (required)
|
||||
* @param _callback The callback to be executed when the API call finishes
|
||||
* @return The request call
|
||||
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
|
||||
* @http.response.details
|
||||
<table summary="Response Details" border="1">
|
||||
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
|
||||
<tr><td> 400 </td><td> Invalid ID supplied </td><td> - </td></tr>
|
||||
<tr><td> 404 </td><td> Order not found </td><td> - </td></tr>
|
||||
</table>
|
||||
*/
|
||||
public okhttp3.Call deleteOrderAsync(String orderId, final ApiCallback<Void> _callback) throws ApiException {
|
||||
|
||||
okhttp3.Call localVarCall = deleteOrderValidateBeforeCall(orderId, _callback);
|
||||
localVarApiClient.executeAsync(localVarCall, _callback);
|
||||
return localVarCall;
|
||||
}
|
||||
/**
|
||||
* Build call for getInventory
|
||||
* @param _callback Callback for upload/download progress
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
* @http.response.details
|
||||
<table summary="Response Details" border="1">
|
||||
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
|
||||
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
|
||||
</table>
|
||||
*/
|
||||
public okhttp3.Call getInventoryCall(final ApiCallback _callback) throws ApiException {
|
||||
String basePath = null;
|
||||
// Operation Servers
|
||||
String[] localBasePaths = new String[] { };
|
||||
|
||||
// Determine Base Path to Use
|
||||
if (localCustomBaseUrl != null){
|
||||
basePath = localCustomBaseUrl;
|
||||
} else if ( localBasePaths.length > 0 ) {
|
||||
basePath = localBasePaths[localHostIndex];
|
||||
} else {
|
||||
basePath = null;
|
||||
}
|
||||
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/store/inventory";
|
||||
|
||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
|
||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||
|
||||
final String[] localVarAccepts = {
|
||||
"application/json"
|
||||
};
|
||||
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
|
||||
if (localVarAccept != null) {
|
||||
localVarHeaderParams.put("Accept", localVarAccept);
|
||||
}
|
||||
|
||||
final String[] localVarContentTypes = {
|
||||
};
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
if (localVarContentType != null) {
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { "api_key" };
|
||||
return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call getInventoryValidateBeforeCall(final ApiCallback _callback) throws ApiException {
|
||||
return getInventoryCall(_callback);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns pet inventories by status
|
||||
* Returns a map of status codes to quantities
|
||||
* @return Map<String, Integer>
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
* @http.response.details
|
||||
<table summary="Response Details" border="1">
|
||||
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
|
||||
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
|
||||
</table>
|
||||
*/
|
||||
public Map<String, Integer> getInventory() throws ApiException {
|
||||
ApiResponse<Map<String, Integer>> localVarResp = getInventoryWithHttpInfo();
|
||||
return localVarResp.getData();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns pet inventories by status
|
||||
* Returns a map of status codes to quantities
|
||||
* @return ApiResponse<Map<String, Integer>>
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
* @http.response.details
|
||||
<table summary="Response Details" border="1">
|
||||
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
|
||||
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
|
||||
</table>
|
||||
*/
|
||||
public ApiResponse<Map<String, Integer>> getInventoryWithHttpInfo() throws ApiException {
|
||||
okhttp3.Call localVarCall = getInventoryValidateBeforeCall(null);
|
||||
Type localVarReturnType = new TypeToken<Map<String, Integer>>(){}.getType();
|
||||
return localVarApiClient.execute(localVarCall, localVarReturnType);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns pet inventories by status (asynchronously)
|
||||
* Returns a map of status codes to quantities
|
||||
* @param _callback The callback to be executed when the API call finishes
|
||||
* @return The request call
|
||||
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
|
||||
* @http.response.details
|
||||
<table summary="Response Details" border="1">
|
||||
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
|
||||
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
|
||||
</table>
|
||||
*/
|
||||
public okhttp3.Call getInventoryAsync(final ApiCallback<Map<String, Integer>> _callback) throws ApiException {
|
||||
|
||||
okhttp3.Call localVarCall = getInventoryValidateBeforeCall(_callback);
|
||||
Type localVarReturnType = new TypeToken<Map<String, Integer>>(){}.getType();
|
||||
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
|
||||
return localVarCall;
|
||||
}
|
||||
/**
|
||||
* Build call for getOrderById
|
||||
* @param orderId ID of pet that needs to be fetched (required)
|
||||
* @param _callback Callback for upload/download progress
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
* @http.response.details
|
||||
<table summary="Response Details" border="1">
|
||||
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
|
||||
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
|
||||
<tr><td> 400 </td><td> Invalid ID supplied </td><td> - </td></tr>
|
||||
<tr><td> 404 </td><td> Order not found </td><td> - </td></tr>
|
||||
</table>
|
||||
*/
|
||||
public okhttp3.Call getOrderByIdCall(Long orderId, final ApiCallback _callback) throws ApiException {
|
||||
String basePath = null;
|
||||
// Operation Servers
|
||||
String[] localBasePaths = new String[] { };
|
||||
|
||||
// Determine Base Path to Use
|
||||
if (localCustomBaseUrl != null){
|
||||
basePath = localCustomBaseUrl;
|
||||
} else if ( localBasePaths.length > 0 ) {
|
||||
basePath = localBasePaths[localHostIndex];
|
||||
} else {
|
||||
basePath = null;
|
||||
}
|
||||
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/store/order/{orderId}"
|
||||
.replace("{" + "orderId" + "}", localVarApiClient.escapeString(orderId.toString()));
|
||||
|
||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
|
||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||
|
||||
final String[] localVarAccepts = {
|
||||
"application/xml",
|
||||
"application/json"
|
||||
};
|
||||
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
|
||||
if (localVarAccept != null) {
|
||||
localVarHeaderParams.put("Accept", localVarAccept);
|
||||
}
|
||||
|
||||
final String[] localVarContentTypes = {
|
||||
};
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
if (localVarContentType != null) {
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call getOrderByIdValidateBeforeCall(Long orderId, final ApiCallback _callback) throws ApiException {
|
||||
// verify the required parameter 'orderId' is set
|
||||
if (orderId == null) {
|
||||
throw new ApiException("Missing the required parameter 'orderId' when calling getOrderById(Async)");
|
||||
}
|
||||
|
||||
return getOrderByIdCall(orderId, _callback);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Find purchase order by ID
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions
|
||||
* @param orderId ID of pet that needs to be fetched (required)
|
||||
* @return Order
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
* @http.response.details
|
||||
<table summary="Response Details" border="1">
|
||||
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
|
||||
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
|
||||
<tr><td> 400 </td><td> Invalid ID supplied </td><td> - </td></tr>
|
||||
<tr><td> 404 </td><td> Order not found </td><td> - </td></tr>
|
||||
</table>
|
||||
*/
|
||||
public Order getOrderById(Long orderId) throws ApiException {
|
||||
ApiResponse<Order> localVarResp = getOrderByIdWithHttpInfo(orderId);
|
||||
return localVarResp.getData();
|
||||
}
|
||||
|
||||
/**
|
||||
* Find purchase order by ID
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions
|
||||
* @param orderId ID of pet that needs to be fetched (required)
|
||||
* @return ApiResponse<Order>
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
* @http.response.details
|
||||
<table summary="Response Details" border="1">
|
||||
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
|
||||
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
|
||||
<tr><td> 400 </td><td> Invalid ID supplied </td><td> - </td></tr>
|
||||
<tr><td> 404 </td><td> Order not found </td><td> - </td></tr>
|
||||
</table>
|
||||
*/
|
||||
public ApiResponse<Order> getOrderByIdWithHttpInfo(Long orderId) throws ApiException {
|
||||
okhttp3.Call localVarCall = getOrderByIdValidateBeforeCall(orderId, null);
|
||||
Type localVarReturnType = new TypeToken<Order>(){}.getType();
|
||||
return localVarApiClient.execute(localVarCall, localVarReturnType);
|
||||
}
|
||||
|
||||
/**
|
||||
* Find purchase order by ID (asynchronously)
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions
|
||||
* @param orderId ID of pet that needs to be fetched (required)
|
||||
* @param _callback The callback to be executed when the API call finishes
|
||||
* @return The request call
|
||||
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
|
||||
* @http.response.details
|
||||
<table summary="Response Details" border="1">
|
||||
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
|
||||
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
|
||||
<tr><td> 400 </td><td> Invalid ID supplied </td><td> - </td></tr>
|
||||
<tr><td> 404 </td><td> Order not found </td><td> - </td></tr>
|
||||
</table>
|
||||
*/
|
||||
public okhttp3.Call getOrderByIdAsync(Long orderId, final ApiCallback<Order> _callback) throws ApiException {
|
||||
|
||||
okhttp3.Call localVarCall = getOrderByIdValidateBeforeCall(orderId, _callback);
|
||||
Type localVarReturnType = new TypeToken<Order>(){}.getType();
|
||||
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
|
||||
return localVarCall;
|
||||
}
|
||||
/**
|
||||
* Build call for placeOrder
|
||||
* @param order order placed for purchasing the pet (required)
|
||||
* @param _callback Callback for upload/download progress
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
* @http.response.details
|
||||
<table summary="Response Details" border="1">
|
||||
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
|
||||
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
|
||||
<tr><td> 400 </td><td> Invalid Order </td><td> - </td></tr>
|
||||
</table>
|
||||
*/
|
||||
public okhttp3.Call placeOrderCall(Order order, final ApiCallback _callback) throws ApiException {
|
||||
String basePath = null;
|
||||
// Operation Servers
|
||||
String[] localBasePaths = new String[] { };
|
||||
|
||||
// Determine Base Path to Use
|
||||
if (localCustomBaseUrl != null){
|
||||
basePath = localCustomBaseUrl;
|
||||
} else if ( localBasePaths.length > 0 ) {
|
||||
basePath = localBasePaths[localHostIndex];
|
||||
} else {
|
||||
basePath = null;
|
||||
}
|
||||
|
||||
Object localVarPostBody = order;
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/store/order";
|
||||
|
||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
|
||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||
|
||||
final String[] localVarAccepts = {
|
||||
"application/xml",
|
||||
"application/json"
|
||||
};
|
||||
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
|
||||
if (localVarAccept != null) {
|
||||
localVarHeaderParams.put("Accept", localVarAccept);
|
||||
}
|
||||
|
||||
final String[] localVarContentTypes = {
|
||||
"application/json"
|
||||
};
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
if (localVarContentType != null) {
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call placeOrderValidateBeforeCall(Order order, final ApiCallback _callback) throws ApiException {
|
||||
// verify the required parameter 'order' is set
|
||||
if (order == null) {
|
||||
throw new ApiException("Missing the required parameter 'order' when calling placeOrder(Async)");
|
||||
}
|
||||
|
||||
return placeOrderCall(order, _callback);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Place an order for a pet
|
||||
*
|
||||
* @param order order placed for purchasing the pet (required)
|
||||
* @return Order
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
* @http.response.details
|
||||
<table summary="Response Details" border="1">
|
||||
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
|
||||
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
|
||||
<tr><td> 400 </td><td> Invalid Order </td><td> - </td></tr>
|
||||
</table>
|
||||
*/
|
||||
public Order placeOrder(Order order) throws ApiException {
|
||||
ApiResponse<Order> localVarResp = placeOrderWithHttpInfo(order);
|
||||
return localVarResp.getData();
|
||||
}
|
||||
|
||||
/**
|
||||
* Place an order for a pet
|
||||
*
|
||||
* @param order order placed for purchasing the pet (required)
|
||||
* @return ApiResponse<Order>
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
* @http.response.details
|
||||
<table summary="Response Details" border="1">
|
||||
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
|
||||
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
|
||||
<tr><td> 400 </td><td> Invalid Order </td><td> - </td></tr>
|
||||
</table>
|
||||
*/
|
||||
public ApiResponse<Order> placeOrderWithHttpInfo(Order order) throws ApiException {
|
||||
okhttp3.Call localVarCall = placeOrderValidateBeforeCall(order, null);
|
||||
Type localVarReturnType = new TypeToken<Order>(){}.getType();
|
||||
return localVarApiClient.execute(localVarCall, localVarReturnType);
|
||||
}
|
||||
|
||||
/**
|
||||
* Place an order for a pet (asynchronously)
|
||||
*
|
||||
* @param order order placed for purchasing the pet (required)
|
||||
* @param _callback The callback to be executed when the API call finishes
|
||||
* @return The request call
|
||||
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
|
||||
* @http.response.details
|
||||
<table summary="Response Details" border="1">
|
||||
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
|
||||
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
|
||||
<tr><td> 400 </td><td> Invalid Order </td><td> - </td></tr>
|
||||
</table>
|
||||
*/
|
||||
public okhttp3.Call placeOrderAsync(Order order, final ApiCallback<Order> _callback) throws ApiException {
|
||||
|
||||
okhttp3.Call localVarCall = placeOrderValidateBeforeCall(order, _callback);
|
||||
Type localVarReturnType = new TypeToken<Order>(){}.getType();
|
||||
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
|
||||
return localVarCall;
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,324 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package org.openapitools.client.api;
|
||||
|
||||
import org.openapitools.client.ApiException;
|
||||
import java.io.File;
|
||||
import org.openapitools.client.model.ModelApiResponse;
|
||||
import java.time.OffsetDateTime;
|
||||
import org.openapitools.client.model.Order;
|
||||
import org.openapitools.client.model.Pet;
|
||||
import org.openapitools.client.model.User;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* API tests for CommonApi
|
||||
*/
|
||||
@Disabled
|
||||
public class CommonApiTest {
|
||||
|
||||
private final CommonApi api = new CommonApi();
|
||||
|
||||
/**
|
||||
* Add a new pet to the store
|
||||
*
|
||||
*
|
||||
*
|
||||
* @throws ApiException if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void addPetTest() throws ApiException {
|
||||
Pet pet = null;
|
||||
Pet response = api.addPet(pet);
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
/**
|
||||
* Create user
|
||||
*
|
||||
* This can only be done by the logged in user.
|
||||
*
|
||||
* @throws ApiException if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void createUserTest() throws ApiException {
|
||||
User user = null;
|
||||
api.createUser(user);
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*
|
||||
*
|
||||
*
|
||||
* @throws ApiException if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void createUsersWithArrayInputTest() throws ApiException {
|
||||
List<User> user = null;
|
||||
api.createUsersWithArrayInput(user);
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*
|
||||
*
|
||||
*
|
||||
* @throws ApiException if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void createUsersWithListInputTest() throws ApiException {
|
||||
List<User> user = null;
|
||||
api.createUsersWithListInput(user);
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete purchase order by ID
|
||||
*
|
||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
*
|
||||
* @throws ApiException if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void deleteOrderTest() throws ApiException {
|
||||
String orderId = null;
|
||||
api.deleteOrder(orderId);
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a pet
|
||||
*
|
||||
*
|
||||
*
|
||||
* @throws ApiException if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void deletePetTest() throws ApiException {
|
||||
Long petId = null;
|
||||
String apiKey = null;
|
||||
api.deletePet(petId, apiKey);
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete user
|
||||
*
|
||||
* This can only be done by the logged in user.
|
||||
*
|
||||
* @throws ApiException if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void deleteUserTest() throws ApiException {
|
||||
String username = null;
|
||||
api.deleteUser(username);
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds Pets by status
|
||||
*
|
||||
* Multiple status values can be provided with comma separated strings
|
||||
*
|
||||
* @throws ApiException if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void findPetsByStatusTest() throws ApiException {
|
||||
List<String> status = null;
|
||||
List<Pet> response = api.findPetsByStatus(status);
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds Pets by tags
|
||||
*
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
*
|
||||
* @throws ApiException if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void findPetsByTagsTest() throws ApiException {
|
||||
List<String> tags = null;
|
||||
List<Pet> response = api.findPetsByTags(tags);
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns pet inventories by status
|
||||
*
|
||||
* Returns a map of status codes to quantities
|
||||
*
|
||||
* @throws ApiException if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void getInventoryTest() throws ApiException {
|
||||
Map<String, Integer> response = api.getInventory();
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
/**
|
||||
* Find purchase order by ID
|
||||
*
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions
|
||||
*
|
||||
* @throws ApiException if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void getOrderByIdTest() throws ApiException {
|
||||
Long orderId = null;
|
||||
Order response = api.getOrderById(orderId);
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
/**
|
||||
* Find pet by ID
|
||||
*
|
||||
* Returns a single pet
|
||||
*
|
||||
* @throws ApiException if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void getPetByIdTest() throws ApiException {
|
||||
Long petId = null;
|
||||
Pet response = api.getPetById(petId);
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user by user name
|
||||
*
|
||||
*
|
||||
*
|
||||
* @throws ApiException if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void getUserByNameTest() throws ApiException {
|
||||
String username = null;
|
||||
User response = api.getUserByName(username);
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs user into the system
|
||||
*
|
||||
*
|
||||
*
|
||||
* @throws ApiException if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void loginUserTest() throws ApiException {
|
||||
String username = null;
|
||||
String password = null;
|
||||
String response = api.loginUser(username, password);
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs out current logged in user session
|
||||
*
|
||||
*
|
||||
*
|
||||
* @throws ApiException if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void logoutUserTest() throws ApiException {
|
||||
api.logoutUser();
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
/**
|
||||
* Place an order for a pet
|
||||
*
|
||||
*
|
||||
*
|
||||
* @throws ApiException if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void placeOrderTest() throws ApiException {
|
||||
Order order = null;
|
||||
Order response = api.placeOrder(order);
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
/**
|
||||
* Update an existing pet
|
||||
*
|
||||
*
|
||||
*
|
||||
* @throws ApiException if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void updatePetTest() throws ApiException {
|
||||
Pet pet = null;
|
||||
Pet response = api.updatePet(pet);
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates a pet in the store with form data
|
||||
*
|
||||
*
|
||||
*
|
||||
* @throws ApiException if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void updatePetWithFormTest() throws ApiException {
|
||||
Long petId = null;
|
||||
String name = null;
|
||||
String status = null;
|
||||
api.updatePetWithForm(petId, name, status);
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
/**
|
||||
* Updated user
|
||||
*
|
||||
* This can only be done by the logged in user.
|
||||
*
|
||||
* @throws ApiException if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void updateUserTest() throws ApiException {
|
||||
String username = null;
|
||||
User user = null;
|
||||
api.updateUser(username, user);
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
/**
|
||||
* uploads an image
|
||||
*
|
||||
*
|
||||
*
|
||||
* @throws ApiException if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void uploadFileTest() throws ApiException {
|
||||
Long petId = null;
|
||||
String additionalMetadata = null;
|
||||
File _file = null;
|
||||
ModelApiResponse response = api.uploadFile(petId, additionalMetadata, _file);
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
}
|
@ -1,153 +0,0 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package org.openapitools.client.api;
|
||||
|
||||
import org.openapitools.client.ApiException;
|
||||
import java.io.File;
|
||||
import org.openapitools.client.model.ModelApiResponse;
|
||||
import org.openapitools.client.model.Pet;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* API tests for PetApi
|
||||
*/
|
||||
@Disabled
|
||||
public class PetApiTest {
|
||||
|
||||
private final PetApi api = new PetApi();
|
||||
|
||||
/**
|
||||
* Add a new pet to the store
|
||||
*
|
||||
*
|
||||
*
|
||||
* @throws ApiException if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void addPetTest() throws ApiException {
|
||||
Pet pet = null;
|
||||
Pet response = api.addPet(pet);
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a pet
|
||||
*
|
||||
*
|
||||
*
|
||||
* @throws ApiException if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void deletePetTest() throws ApiException {
|
||||
Long petId = null;
|
||||
String apiKey = null;
|
||||
api.deletePet(petId, apiKey);
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds Pets by status
|
||||
*
|
||||
* Multiple status values can be provided with comma separated strings
|
||||
*
|
||||
* @throws ApiException if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void findPetsByStatusTest() throws ApiException {
|
||||
List<String> status = null;
|
||||
List<Pet> response = api.findPetsByStatus(status);
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds Pets by tags
|
||||
*
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
*
|
||||
* @throws ApiException if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void findPetsByTagsTest() throws ApiException {
|
||||
List<String> tags = null;
|
||||
List<Pet> response = api.findPetsByTags(tags);
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
/**
|
||||
* Find pet by ID
|
||||
*
|
||||
* Returns a single pet
|
||||
*
|
||||
* @throws ApiException if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void getPetByIdTest() throws ApiException {
|
||||
Long petId = null;
|
||||
Pet response = api.getPetById(petId);
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
/**
|
||||
* Update an existing pet
|
||||
*
|
||||
*
|
||||
*
|
||||
* @throws ApiException if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void updatePetTest() throws ApiException {
|
||||
Pet pet = null;
|
||||
Pet response = api.updatePet(pet);
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates a pet in the store with form data
|
||||
*
|
||||
*
|
||||
*
|
||||
* @throws ApiException if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void updatePetWithFormTest() throws ApiException {
|
||||
Long petId = null;
|
||||
String name = null;
|
||||
String status = null;
|
||||
api.updatePetWithForm(petId, name, status);
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
/**
|
||||
* uploads an image
|
||||
*
|
||||
*
|
||||
*
|
||||
* @throws ApiException if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void uploadFileTest() throws ApiException {
|
||||
Long petId = null;
|
||||
String additionalMetadata = null;
|
||||
File _file = null;
|
||||
ModelApiResponse response = api.uploadFile(petId, additionalMetadata, _file);
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
}
|
@ -1,89 +0,0 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package org.openapitools.client.api;
|
||||
|
||||
import org.openapitools.client.ApiException;
|
||||
import org.openapitools.client.model.Order;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* API tests for StoreApi
|
||||
*/
|
||||
@Disabled
|
||||
public class StoreApiTest {
|
||||
|
||||
private final StoreApi api = new StoreApi();
|
||||
|
||||
/**
|
||||
* Delete purchase order by ID
|
||||
*
|
||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
*
|
||||
* @throws ApiException if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void deleteOrderTest() throws ApiException {
|
||||
String orderId = null;
|
||||
api.deleteOrder(orderId);
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns pet inventories by status
|
||||
*
|
||||
* Returns a map of status codes to quantities
|
||||
*
|
||||
* @throws ApiException if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void getInventoryTest() throws ApiException {
|
||||
Map<String, Integer> response = api.getInventory();
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
/**
|
||||
* Find purchase order by ID
|
||||
*
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions
|
||||
*
|
||||
* @throws ApiException if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void getOrderByIdTest() throws ApiException {
|
||||
Long orderId = null;
|
||||
Order response = api.getOrderById(orderId);
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
/**
|
||||
* Place an order for a pet
|
||||
*
|
||||
*
|
||||
*
|
||||
* @throws ApiException if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void placeOrderTest() throws ApiException {
|
||||
Order order = null;
|
||||
Order response = api.placeOrder(order);
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
}
|
@ -1,148 +0,0 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package org.openapitools.client.api;
|
||||
|
||||
import org.openapitools.client.ApiException;
|
||||
import java.time.OffsetDateTime;
|
||||
import org.openapitools.client.model.User;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* API tests for UserApi
|
||||
*/
|
||||
@Disabled
|
||||
public class UserApiTest {
|
||||
|
||||
private final UserApi api = new UserApi();
|
||||
|
||||
/**
|
||||
* Create user
|
||||
*
|
||||
* This can only be done by the logged in user.
|
||||
*
|
||||
* @throws ApiException if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void createUserTest() throws ApiException {
|
||||
User user = null;
|
||||
api.createUser(user);
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*
|
||||
*
|
||||
*
|
||||
* @throws ApiException if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void createUsersWithArrayInputTest() throws ApiException {
|
||||
List<User> user = null;
|
||||
api.createUsersWithArrayInput(user);
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*
|
||||
*
|
||||
*
|
||||
* @throws ApiException if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void createUsersWithListInputTest() throws ApiException {
|
||||
List<User> user = null;
|
||||
api.createUsersWithListInput(user);
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete user
|
||||
*
|
||||
* This can only be done by the logged in user.
|
||||
*
|
||||
* @throws ApiException if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void deleteUserTest() throws ApiException {
|
||||
String username = null;
|
||||
api.deleteUser(username);
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user by user name
|
||||
*
|
||||
*
|
||||
*
|
||||
* @throws ApiException if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void getUserByNameTest() throws ApiException {
|
||||
String username = null;
|
||||
User response = api.getUserByName(username);
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs user into the system
|
||||
*
|
||||
*
|
||||
*
|
||||
* @throws ApiException if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void loginUserTest() throws ApiException {
|
||||
String username = null;
|
||||
String password = null;
|
||||
String response = api.loginUser(username, password);
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs out current logged in user session
|
||||
*
|
||||
*
|
||||
*
|
||||
* @throws ApiException if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void logoutUserTest() throws ApiException {
|
||||
api.logoutUser();
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
/**
|
||||
* Updated user
|
||||
*
|
||||
* This can only be done by the logged in user.
|
||||
*
|
||||
* @throws ApiException if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void updateUserTest() throws ApiException {
|
||||
String username = null;
|
||||
User user = null;
|
||||
api.updateUser(username, user);
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
}
|
@ -21,10 +21,10 @@ import com.google.gson.stream.JsonWriter;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
||||
/**
|
||||
* Model tests for Category
|
||||
*/
|
||||
|
@ -21,10 +21,10 @@ import com.google.gson.stream.JsonWriter;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
||||
/**
|
||||
* Model tests for ModelApiResponse
|
||||
*/
|
||||
|
@ -22,10 +22,10 @@ import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.io.IOException;
|
||||
import java.time.OffsetDateTime;
|
||||
import java.util.Arrays;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
||||
/**
|
||||
* Model tests for Order
|
||||
*/
|
||||
|
@ -22,13 +22,13 @@ import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import org.openapitools.client.model.Category;
|
||||
import org.openapitools.client.model.Tag;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
||||
/**
|
||||
* Model tests for Pet
|
||||
*/
|
||||
|
@ -21,10 +21,10 @@ import com.google.gson.stream.JsonWriter;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
||||
/**
|
||||
* Model tests for Tag
|
||||
*/
|
||||
|
@ -21,10 +21,10 @@ import com.google.gson.stream.JsonWriter;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
||||
/**
|
||||
* Model tests for User
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user