mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-11 07:32:48 +00:00
Merge remote-tracking branch 'origin/master' into 6.0.x
This commit is contained in:
@@ -0,0 +1,6 @@
|
|||||||
|
generatorName: java-play-framework
|
||||||
|
outputDir: samples/server/petstore/java-play-framework-fake-endpoints-with-security
|
||||||
|
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-for-testing-playframework-with-security.yaml
|
||||||
|
templateDir: modules/openapi-generator/src/main/resources/JavaPlayFramework
|
||||||
|
additionalProperties:
|
||||||
|
hideGenerationTimestamp: "true"
|
||||||
13
bin/configs/spring-boot-beanvalidation-no-nullable-oas3.yaml
Normal file
13
bin/configs/spring-boot-beanvalidation-no-nullable-oas3.yaml
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
generatorName: spring
|
||||||
|
outputDir: samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable
|
||||||
|
library: spring-boot
|
||||||
|
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
|
||||||
|
templateDir: modules/openapi-generator/src/main/resources/JavaSpring
|
||||||
|
additionalProperties:
|
||||||
|
groupId: org.openapitools.openapi3
|
||||||
|
oas3: "true"
|
||||||
|
java8: "false"
|
||||||
|
useBeanValidation: true
|
||||||
|
artifactId: spring-boot-beanvalidation-no-nullable
|
||||||
|
hideGenerationTimestamp: "true"
|
||||||
|
openApiNullable: "false"
|
||||||
11
bin/configs/spring-boot-delegate-oas3.yaml
Normal file
11
bin/configs/spring-boot-delegate-oas3.yaml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
generatorName: spring
|
||||||
|
outputDir: samples/openapi3/server/petstore/springboot-delegate
|
||||||
|
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
|
||||||
|
templateDir: modules/openapi-generator/src/main/resources/JavaSpring
|
||||||
|
additionalProperties:
|
||||||
|
groupId: org.openapitools.openapi3
|
||||||
|
oas3: "true"
|
||||||
|
artifactId: springboot-delegate
|
||||||
|
hideGenerationTimestamp: "true"
|
||||||
|
java8: true
|
||||||
|
delegatePattern: "true"
|
||||||
10
bin/configs/spring-boot-implicitHeaders-oas3.yaml
Normal file
10
bin/configs/spring-boot-implicitHeaders-oas3.yaml
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
generatorName: spring
|
||||||
|
outputDir: samples/openapi3/server/petstore/springboot-implicitHeaders
|
||||||
|
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
|
||||||
|
templateDir: modules/openapi-generator/src/main/resources/JavaSpring
|
||||||
|
additionalProperties:
|
||||||
|
groupId: org.openapitools.openapi3
|
||||||
|
oas3: "true"
|
||||||
|
artifactId: springboot-implicitHeaders
|
||||||
|
hideGenerationTimestamp: "true"
|
||||||
|
implicitHeaders: true
|
||||||
10
bin/configs/spring-boot-oas3.yaml
Normal file
10
bin/configs/spring-boot-oas3.yaml
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
generatorName: spring
|
||||||
|
outputDir: samples/openapi3/server/petstore/springboot
|
||||||
|
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
|
||||||
|
templateDir: modules/openapi-generator/src/main/resources/JavaSpring
|
||||||
|
additionalProperties:
|
||||||
|
groupId: org.openapitools.openapi3
|
||||||
|
artifactId: springboot
|
||||||
|
snapshotVersion: "true"
|
||||||
|
oas3: "true"
|
||||||
|
hideGenerationTimestamp: "true"
|
||||||
11
bin/configs/spring-boot-reactive-oas3.yaml
Normal file
11
bin/configs/spring-boot-reactive-oas3.yaml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
generatorName: spring
|
||||||
|
outputDir: samples/openapi3/server/petstore/springboot-reactive
|
||||||
|
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
|
||||||
|
templateDir: modules/openapi-generator/src/main/resources/JavaSpring
|
||||||
|
additionalProperties:
|
||||||
|
groupId: org.openapitools.openapi3
|
||||||
|
oas3: "true"
|
||||||
|
artifactId: springboot-reactive
|
||||||
|
reactive: "true"
|
||||||
|
hideGenerationTimestamp: "true"
|
||||||
|
delegatePattern: "true"
|
||||||
10
bin/configs/spring-boot-useoptional-oas3.yaml
Normal file
10
bin/configs/spring-boot-useoptional-oas3.yaml
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
generatorName: spring
|
||||||
|
outputDir: samples/openapi3/server/petstore/springboot-useoptional
|
||||||
|
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
|
||||||
|
templateDir: modules/openapi-generator/src/main/resources/JavaSpring
|
||||||
|
additionalProperties:
|
||||||
|
groupId: org.openapitools.openapi3
|
||||||
|
oas3: "true"
|
||||||
|
useOptional: true
|
||||||
|
artifactId: spring-boot-useoptional
|
||||||
|
hideGenerationTimestamp: "true"
|
||||||
12
bin/configs/spring-cloud-async-oas3.yaml
Normal file
12
bin/configs/spring-cloud-async-oas3.yaml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
generatorName: spring
|
||||||
|
outputDir: samples/openapi3/client/petstore/spring-cloud-async
|
||||||
|
library: spring-cloud
|
||||||
|
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml
|
||||||
|
templateDir: modules/openapi-generator/src/main/resources/JavaSpring
|
||||||
|
additionalProperties:
|
||||||
|
groupId: org.openapitools.openapi3
|
||||||
|
oas3: "true"
|
||||||
|
async: "true"
|
||||||
|
java8: "true"
|
||||||
|
artifactId: petstore-spring-cloud
|
||||||
|
hideGenerationTimestamp: "true"
|
||||||
12
bin/configs/spring-cloud-date-time-oas3.yaml
Normal file
12
bin/configs/spring-cloud-date-time-oas3.yaml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
generatorName: spring
|
||||||
|
library: spring-cloud
|
||||||
|
outputDir: samples/openapi3/client/petstore/spring-cloud-date-time
|
||||||
|
inputSpec: modules/openapi-generator/src/test/resources/3_0/spring/date-time-parameter-types-for-testing.yml
|
||||||
|
templateDir: modules/openapi-generator/src/main/resources/JavaSpring
|
||||||
|
additionalProperties:
|
||||||
|
groupId: org.openapitools.openapi3
|
||||||
|
artifactId: spring-cloud-date-time-oas3
|
||||||
|
interfaceOnly: "true"
|
||||||
|
singleContentTypes: "true"
|
||||||
|
hideGenerationTimestamp: "true"
|
||||||
|
oas3: "true"
|
||||||
10
bin/configs/spring-cloud-date-time.yaml
Normal file
10
bin/configs/spring-cloud-date-time.yaml
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
generatorName: spring
|
||||||
|
library: spring-cloud
|
||||||
|
outputDir: samples/client/petstore/spring-cloud-date-time
|
||||||
|
inputSpec: modules/openapi-generator/src/test/resources/3_0/spring/date-time-parameter-types-for-testing.yml
|
||||||
|
templateDir: modules/openapi-generator/src/main/resources/JavaSpring
|
||||||
|
additionalProperties:
|
||||||
|
artifactId: spring-cloud-date-time
|
||||||
|
interfaceOnly: "true"
|
||||||
|
singleContentTypes: "true"
|
||||||
|
hideGenerationTimestamp: "true"
|
||||||
12
bin/configs/spring-cloud-oas3-fakeapi.yaml
Normal file
12
bin/configs/spring-cloud-oas3-fakeapi.yaml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
generatorName: spring
|
||||||
|
library: spring-cloud
|
||||||
|
outputDir: samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi
|
||||||
|
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
|
||||||
|
templateDir: modules/openapi-generator/src/main/resources/JavaSpring
|
||||||
|
additionalProperties:
|
||||||
|
groupId: org.openapitools.openapi3
|
||||||
|
artifactId: spring-cloud-oas3
|
||||||
|
interfaceOnly: "true"
|
||||||
|
singleContentTypes: "true"
|
||||||
|
hideGenerationTimestamp: "true"
|
||||||
|
oas3: "true"
|
||||||
12
bin/configs/spring-cloud-oas3.yaml
Normal file
12
bin/configs/spring-cloud-oas3.yaml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
generatorName: spring
|
||||||
|
library: spring-cloud
|
||||||
|
outputDir: samples/openapi3/client/petstore/spring-cloud
|
||||||
|
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
|
||||||
|
templateDir: modules/openapi-generator/src/main/resources/JavaSpring
|
||||||
|
additionalProperties:
|
||||||
|
groupId: org.openapitools.openapi3
|
||||||
|
artifactId: spring-cloud-oas3
|
||||||
|
interfaceOnly: "true"
|
||||||
|
singleContentTypes: "true"
|
||||||
|
hideGenerationTimestamp: "true"
|
||||||
|
oas3: "true"
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
generatorName: spring
|
||||||
|
outputDir: samples/openapi3/client/petstore/spring-cloud-spring-pageable
|
||||||
|
library: spring-cloud
|
||||||
|
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-spring-pageable.yaml
|
||||||
|
templateDir: modules/openapi-generator/src/main/resources/JavaSpring
|
||||||
|
additionalProperties:
|
||||||
|
groupId: org.openapitools.openapi3
|
||||||
|
oas3: "true"
|
||||||
|
artifactId: spring-cloud-spring-pageable
|
||||||
|
hideGenerationTimestamp: 'true'
|
||||||
@@ -58,6 +58,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
|||||||
|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true|
|
|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true|
|
||||||
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
|
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
|
||||||
|sourceFolder|source folder for generated code| |src/gen/java|
|
|sourceFolder|source folder for generated code| |src/gen/java|
|
||||||
|
|supportAsync|Wrap responses in CompletionStage type, allowing asynchronous computation (requires JAX-RS 2.1).| |false|
|
||||||
|title|a title describing the application| |OpenAPI Server|
|
|title|a title describing the application| |OpenAPI Server|
|
||||||
|useBeanValidation|Use BeanValidation API annotations| |true|
|
|useBeanValidation|Use BeanValidation API annotations| |true|
|
||||||
|useSwaggerAnnotations|Whether to generate Swagger annotations.| |true|
|
|useSwaggerAnnotations|Whether to generate Swagger annotations.| |true|
|
||||||
|
|||||||
@@ -58,6 +58,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
|||||||
|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true|
|
|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true|
|
||||||
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
|
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
|
||||||
|sourceFolder|source folder for generated code| |src/main/java|
|
|sourceFolder|source folder for generated code| |src/main/java|
|
||||||
|
|supportAsync|Wrap responses in CompletionStage type, allowing asynchronous computation (requires JAX-RS 2.1).| |false|
|
||||||
|title|a title describing the application| |OpenAPI Server|
|
|title|a title describing the application| |OpenAPI Server|
|
||||||
|useBeanValidation|Use BeanValidation API annotations| |true|
|
|useBeanValidation|Use BeanValidation API annotations| |true|
|
||||||
|useSwaggerAnnotations|Whether to generate Swagger annotations.| |true|
|
|useSwaggerAnnotations|Whether to generate Swagger annotations.| |true|
|
||||||
|
|||||||
@@ -4103,7 +4103,7 @@ public class DefaultCodegen implements CodegenConfig {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// add example
|
// add example
|
||||||
if (schemas != null) {
|
if (schemas != null && !isSkipOperationExample()) {
|
||||||
op.requestBodyExamples = new ExampleGenerator(schemas, this.openAPI).generate(null, new ArrayList<>(getConsumesInfo(this.openAPI, operation)), bodyParam.baseType);
|
op.requestBodyExamples = new ExampleGenerator(schemas, this.openAPI).generate(null, new ArrayList<>(getConsumesInfo(this.openAPI, operation)), bodyParam.baseType);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -175,7 +175,7 @@ public class CppTizenClientCodegen extends AbstractCppCodegen implements Codegen
|
|||||||
if (languageSpecificPrimitives.contains(name)) {
|
if (languageSpecificPrimitives.contains(name)) {
|
||||||
return name;
|
return name;
|
||||||
} else {
|
} else {
|
||||||
return name;
|
return super.getTypeDeclaration(name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -102,6 +102,7 @@ public class JavaJAXRSSpecServerCodegen extends AbstractJavaJAXRSServerCodegen {
|
|||||||
cliOptions.add(CliOption.newBoolean(RETURN_RESPONSE, "Whether generate API interface should return javax.ws.rs.core.Response instead of a deserialized entity. Only useful if interfaceOnly is true.").defaultValue(String.valueOf(returnResponse)));
|
cliOptions.add(CliOption.newBoolean(RETURN_RESPONSE, "Whether generate API interface should return javax.ws.rs.core.Response instead of a deserialized entity. Only useful if interfaceOnly is true.").defaultValue(String.valueOf(returnResponse)));
|
||||||
cliOptions.add(CliOption.newBoolean(USE_SWAGGER_ANNOTATIONS, "Whether to generate Swagger annotations.", useSwaggerAnnotations));
|
cliOptions.add(CliOption.newBoolean(USE_SWAGGER_ANNOTATIONS, "Whether to generate Swagger annotations.", useSwaggerAnnotations));
|
||||||
cliOptions.add(CliOption.newString(OPEN_API_SPEC_FILE_LOCATION, "Location where the file containing the spec will be generated in the output folder. No file generated when set to null or empty string."));
|
cliOptions.add(CliOption.newString(OPEN_API_SPEC_FILE_LOCATION, "Location where the file containing the spec will be generated in the output folder. No file generated when set to null or empty string."));
|
||||||
|
cliOptions.add(CliOption.newBoolean(SUPPORT_ASYNC, "Wrap responses in CompletionStage type, allowing asynchronous computation (requires JAX-RS 2.1).", supportAsync));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -121,6 +122,14 @@ public class JavaJAXRSSpecServerCodegen extends AbstractJavaJAXRSServerCodegen {
|
|||||||
additionalProperties.remove(RETURN_RESPONSE);
|
additionalProperties.remove(RETURN_RESPONSE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (additionalProperties.containsKey(SUPPORT_ASYNC)) {
|
||||||
|
supportAsync = Boolean.parseBoolean(additionalProperties.get(SUPPORT_ASYNC).toString());
|
||||||
|
if (!supportAsync) {
|
||||||
|
additionalProperties.remove(SUPPORT_ASYNC);
|
||||||
|
} else {
|
||||||
|
setJava8ModeAndAdditionalProperties(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
if (QUARKUS_LIBRARY.equals(library) || THORNTAIL_LIBRARY.equals(library) || HELIDON_LIBRARY.equals(library) || OPEN_LIBERTY_LIBRARY.equals(library) || KUMULUZEE_LIBRARY.equals(library)) {
|
if (QUARKUS_LIBRARY.equals(library) || THORNTAIL_LIBRARY.equals(library) || HELIDON_LIBRARY.equals(library) || OPEN_LIBERTY_LIBRARY.equals(library) || KUMULUZEE_LIBRARY.equals(library)) {
|
||||||
useSwaggerAnnotations = false;
|
useSwaggerAnnotations = false;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import org.slf4j.LoggerFactory;
|
|||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.EnumSet;
|
import java.util.EnumSet;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
import static org.openapitools.codegen.CodegenConstants.INVOKER_PACKAGE;
|
import static org.openapitools.codegen.CodegenConstants.INVOKER_PACKAGE;
|
||||||
|
|
||||||
@@ -97,18 +98,18 @@ public class JavaMicronautClientCodegen extends AbstractJavaCodegen implements B
|
|||||||
cliOptions.add(CliOption.newBoolean(USE_BEANVALIDATION, "Use BeanValidation API annotations", useBeanValidation));
|
cliOptions.add(CliOption.newBoolean(USE_BEANVALIDATION, "Use BeanValidation API annotations", useBeanValidation));
|
||||||
|
|
||||||
CliOption buildToolOption = new CliOption(OPT_BUILD, "Specify for which build tool to generate files").defaultValue(buildTool);
|
CliOption buildToolOption = new CliOption(OPT_BUILD, "Specify for which build tool to generate files").defaultValue(buildTool);
|
||||||
buildToolOption.setEnum(new HashMap<String, String>() {{
|
Map buildToolOptionMap = new HashMap();
|
||||||
put(OPT_BUILD_GRADLE, "Gradle configuration is generated for the project");
|
buildToolOptionMap.put(OPT_BUILD_GRADLE, "Gradle configuration is generated for the project");
|
||||||
put(OPT_BUILD_MAVEN, "Maven configuration is generated for the project");
|
buildToolOptionMap.put(OPT_BUILD_MAVEN, "Maven configuration is generated for the project");
|
||||||
put(OPT_BUILD_ALL, "Both Gradle and Maven configurations are generated");
|
buildToolOptionMap.put(OPT_BUILD_ALL, "Both Gradle and Maven configurations are generated");
|
||||||
}});
|
buildToolOption.setEnum(buildToolOptionMap);
|
||||||
cliOptions.add(buildToolOption);
|
cliOptions.add(buildToolOption);
|
||||||
|
|
||||||
CliOption testToolOption = new CliOption(OPT_TEST, "Specify which test tool to generate files for").defaultValue(testTool);
|
CliOption testToolOption = new CliOption(OPT_TEST, "Specify which test tool to generate files for").defaultValue(testTool);
|
||||||
testToolOption.setEnum(new HashMap<String, String>() {{
|
Map testToolOptionMap = new HashMap();
|
||||||
put(OPT_TEST_JUNIT, "Use JUnit as test tool");
|
testToolOptionMap.put(OPT_TEST_JUNIT, "Use JUnit as test tool");
|
||||||
put(OPT_TEST_SPOCK, "Use Spock as test tool");
|
testToolOptionMap.put(OPT_TEST_SPOCK, "Use Spock as test tool");
|
||||||
}});
|
testToolOption.setEnum(testToolOptionMap);
|
||||||
cliOptions.add(testToolOption);
|
cliOptions.add(testToolOption);
|
||||||
|
|
||||||
// Remove the date library option
|
// Remove the date library option
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
package org.openapitools.codegen.languages;
|
package org.openapitools.codegen.languages;
|
||||||
|
|
||||||
import io.swagger.v3.oas.models.media.Schema;
|
import io.swagger.v3.oas.models.media.Schema;
|
||||||
|
import io.swagger.v3.oas.models.security.SecurityScheme;
|
||||||
import org.openapitools.codegen.*;
|
import org.openapitools.codegen.*;
|
||||||
import org.openapitools.codegen.languages.features.BeanValidationFeatures;
|
import org.openapitools.codegen.languages.features.BeanValidationFeatures;
|
||||||
import org.openapitools.codegen.meta.features.DocumentationFeature;
|
import org.openapitools.codegen.meta.features.DocumentationFeature;
|
||||||
@@ -25,11 +26,10 @@ import org.slf4j.Logger;
|
|||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.List;
|
import java.util.*;
|
||||||
import java.util.Locale;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import static org.openapitools.codegen.utils.StringUtils.camelize;
|
import static org.openapitools.codegen.utils.StringUtils.camelize;
|
||||||
|
|
||||||
@@ -45,6 +45,10 @@ public class JavaPlayFrameworkCodegen extends AbstractJavaCodegen implements Bea
|
|||||||
public static final String USE_SWAGGER_UI = "useSwaggerUI";
|
public static final String USE_SWAGGER_UI = "useSwaggerUI";
|
||||||
public static final String SUPPORT_ASYNC = "supportAsync";
|
public static final String SUPPORT_ASYNC = "supportAsync";
|
||||||
|
|
||||||
|
private static final String X_JWKS_URL = "x-jwksUrl";
|
||||||
|
private static final String X_TOKEN_INTROSPECT_URL = "x-tokenIntrospectUrl";
|
||||||
|
|
||||||
|
|
||||||
protected String title = "openapi-java-playframework";
|
protected String title = "openapi-java-playframework";
|
||||||
protected String configPackage = "org.openapitools.configuration";
|
protected String configPackage = "org.openapitools.configuration";
|
||||||
protected String basePackage = "org.openapitools";
|
protected String basePackage = "org.openapitools";
|
||||||
@@ -197,6 +201,7 @@ public class JavaPlayFrameworkCodegen extends AbstractJavaCodegen implements Bea
|
|||||||
supportingFiles.add(new SupportingFile("module.mustache", "app", "Module.java"));
|
supportingFiles.add(new SupportingFile("module.mustache", "app", "Module.java"));
|
||||||
}
|
}
|
||||||
supportingFiles.add(new SupportingFile("openapiUtils.mustache", "app/openapitools", "OpenAPIUtils.java"));
|
supportingFiles.add(new SupportingFile("openapiUtils.mustache", "app/openapitools", "OpenAPIUtils.java"));
|
||||||
|
supportingFiles.add(new SupportingFile("securityApiUtils.mustache", "app/openapitools", "SecurityAPIUtils.java"));
|
||||||
if (this.handleExceptions) {
|
if (this.handleExceptions) {
|
||||||
supportingFiles.add(new SupportingFile("errorHandler.mustache", "app/openapitools", "ErrorHandler.java"));
|
supportingFiles.add(new SupportingFile("errorHandler.mustache", "app/openapitools", "ErrorHandler.java"));
|
||||||
}
|
}
|
||||||
@@ -376,4 +381,98 @@ public class JavaPlayFrameworkCodegen extends AbstractJavaCodegen implements Bea
|
|||||||
generateJSONSpecFile(objs);
|
generateJSONSpecFile(objs);
|
||||||
return super.postProcessSupportingFileData(objs);
|
return super.postProcessSupportingFileData(objs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<CodegenSecurity> fromSecurity(Map<String, SecurityScheme> securitySchemeMap) {
|
||||||
|
List<? extends CodegenSecurity> securities = super.fromSecurity(securitySchemeMap);
|
||||||
|
List<CodegenSecurity> extendedSecurities = new ArrayList<>();
|
||||||
|
|
||||||
|
for (CodegenSecurity codegenSecurity : securities) {
|
||||||
|
ExtendedCodegenSecurity extendedCodegenSecurity = new ExtendedCodegenSecurity(codegenSecurity);
|
||||||
|
Object jwksUrl = extendedCodegenSecurity.vendorExtensions.get(X_JWKS_URL);
|
||||||
|
|
||||||
|
if (jwksUrl instanceof String) {
|
||||||
|
extendedCodegenSecurity.jwksUrl = (String) jwksUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
Object tokenIntrospectUrl = extendedCodegenSecurity.vendorExtensions.get(X_TOKEN_INTROSPECT_URL);
|
||||||
|
|
||||||
|
if (tokenIntrospectUrl instanceof String) {
|
||||||
|
extendedCodegenSecurity.tokenIntrospectUrl = (String) tokenIntrospectUrl;
|
||||||
|
}
|
||||||
|
extendedSecurities.add(extendedCodegenSecurity);
|
||||||
|
}
|
||||||
|
|
||||||
|
return extendedSecurities;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
class ExtendedCodegenSecurity extends CodegenSecurity {
|
||||||
|
public String jwksUrl;
|
||||||
|
public String tokenIntrospectUrl;
|
||||||
|
|
||||||
|
public ExtendedCodegenSecurity(CodegenSecurity cm) {
|
||||||
|
super();
|
||||||
|
|
||||||
|
this.name = cm.name;
|
||||||
|
this.type = cm.type;
|
||||||
|
this.scheme = cm.scheme;
|
||||||
|
this.isBasic = cm.isBasic;
|
||||||
|
this.isOAuth = cm.isOAuth;
|
||||||
|
this.isApiKey = cm.isApiKey;
|
||||||
|
this.isBasicBasic = cm.isBasicBasic;
|
||||||
|
this.isBasicBearer = cm.isBasicBearer;
|
||||||
|
this.isHttpSignature = cm.isHttpSignature;
|
||||||
|
this.bearerFormat = cm.bearerFormat;
|
||||||
|
this.vendorExtensions = new HashMap<String, Object>(cm.vendorExtensions);
|
||||||
|
this.keyParamName = cm.keyParamName;
|
||||||
|
this.isKeyInQuery = cm.isKeyInQuery;
|
||||||
|
this.isKeyInHeader = cm.isKeyInHeader;
|
||||||
|
this.isKeyInCookie = cm.isKeyInCookie;
|
||||||
|
this.flow = cm.flow;
|
||||||
|
this.authorizationUrl = cm.authorizationUrl;
|
||||||
|
this.tokenUrl = cm.tokenUrl;
|
||||||
|
this.refreshUrl = cm.refreshUrl;
|
||||||
|
this.scopes = cm.scopes;
|
||||||
|
this.isCode = cm.isCode;
|
||||||
|
this.isPassword = cm.isPassword;
|
||||||
|
this.isApplication = cm.isApplication;
|
||||||
|
this.isImplicit = cm.isImplicit;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CodegenSecurity filterByScopeNames(List<String> filterScopes) {
|
||||||
|
CodegenSecurity codegenSecurity = super.filterByScopeNames(filterScopes);
|
||||||
|
ExtendedCodegenSecurity extendedCodegenSecurity = new ExtendedCodegenSecurity(codegenSecurity);
|
||||||
|
extendedCodegenSecurity.jwksUrl = this.jwksUrl;
|
||||||
|
extendedCodegenSecurity.tokenIntrospectUrl = this.tokenIntrospectUrl;
|
||||||
|
return extendedCodegenSecurity;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
boolean result = super.equals(o);
|
||||||
|
JavaPlayFrameworkCodegen.ExtendedCodegenSecurity that = (JavaPlayFrameworkCodegen.ExtendedCodegenSecurity) o;
|
||||||
|
return result &&
|
||||||
|
Objects.equals(jwksUrl, that.jwksUrl) &&
|
||||||
|
Objects.equals(tokenIntrospectUrl, that.tokenIntrospectUrl);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
int superHash = super.hashCode();
|
||||||
|
return Objects.hash(superHash, tokenIntrospectUrl, jwksUrl);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
String superString = super.toString();
|
||||||
|
final StringBuilder sb = new StringBuilder(superString);
|
||||||
|
sb.append(", jwksUrl='").append(jwksUrl).append('\'');
|
||||||
|
sb.append(", tokenIntrospectUrl='").append(tokenIntrospectUrl).append('\'');
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1041,7 +1041,7 @@ public class K6ClientCodegen extends DefaultCodegen implements CodegenConfig {
|
|||||||
Map<?, ?> respExtensions = (Map<?, ?>) resp.getExtensions().get(X_OPERATION_RESPONSE);
|
Map<?, ?> respExtensions = (Map<?, ?>) resp.getExtensions().get(X_OPERATION_RESPONSE);
|
||||||
Entry<?, ?> entry = respExtensions.entrySet().stream().findFirst().orElse(null);
|
Entry<?, ?> entry = respExtensions.entrySet().stream().findFirst().orElse(null);
|
||||||
|
|
||||||
if (entry.getKey().equals(X_OPERATION_RESPONSE_HIDE)) {
|
if (entry != null && entry.getKey().equals(X_OPERATION_RESPONSE_HIDE)) {
|
||||||
return Boolean.parseBoolean(String.valueOf(entry.getValue()));
|
return Boolean.parseBoolean(String.valueOf(entry.getValue()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -541,10 +541,12 @@ public class KotlinSpringServerCodegen extends AbstractKotlinCodegen
|
|||||||
.forEach(cm -> {
|
.forEach(cm -> {
|
||||||
cm.imports.add(importMapping.get("JsonValue"));
|
cm.imports.add(importMapping.get("JsonValue"));
|
||||||
cm.imports.add(importMapping.get("JsonProperty"));
|
cm.imports.add(importMapping.get("JsonProperty"));
|
||||||
Map<String, String> item = new HashMap<>();
|
Map<String, String> itemJsonValue = new HashMap<>();
|
||||||
item.put("import", importMapping.get("JsonValue"));
|
itemJsonValue.put("import", importMapping.get("JsonValue"));
|
||||||
item.put("import", importMapping.get("JsonProperty"));
|
imports.add(itemJsonValue);
|
||||||
imports.add(item);
|
Map<String, String> itemJsonProperty = new HashMap<>();
|
||||||
|
itemJsonProperty.put("import", importMapping.get("JsonProperty"));
|
||||||
|
imports.add(itemJsonProperty);
|
||||||
});
|
});
|
||||||
|
|
||||||
return objs;
|
return objs;
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ package org.openapitools.codegen.languages;
|
|||||||
import static org.apache.commons.lang3.StringUtils.isNotEmpty;
|
import static org.apache.commons.lang3.StringUtils.isNotEmpty;
|
||||||
import static org.openapitools.codegen.utils.StringUtils.camelize;
|
import static org.openapitools.codegen.utils.StringUtils.camelize;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.models.media.Schema;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@@ -923,6 +924,17 @@ public class SpringCodegen extends AbstractJavaCodegen
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CodegenModel fromModel(String name, Schema model) {
|
||||||
|
CodegenModel codegenModel = super.fromModel(name, model);
|
||||||
|
if (oas3) {
|
||||||
|
// remove swagger2 imports
|
||||||
|
codegenModel.imports.remove("ApiModelProperty");
|
||||||
|
codegenModel.imports.remove("ApiModel");
|
||||||
|
}
|
||||||
|
return codegenModel;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Object> postProcessModelsEnum(Map<String, Object> objs) {
|
public Map<String, Object> postProcessModelsEnum(Map<String, Object> objs) {
|
||||||
objs = super.postProcessModelsEnum(objs);
|
objs = super.postProcessModelsEnum(objs);
|
||||||
|
|||||||
@@ -41,10 +41,6 @@ public class Pair {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (arg.trim().isEmpty()) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -173,7 +173,7 @@ public class {{classname}} {
|
|||||||
{{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}}
|
{{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}}
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -204,7 +204,7 @@ public class {{classname}} {
|
|||||||
{{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}}
|
{{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}}
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,10 @@ import javax.ws.rs.core.Response;
|
|||||||
{{#useSwaggerAnnotations}}
|
{{#useSwaggerAnnotations}}
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
{{/useSwaggerAnnotations}}
|
{{/useSwaggerAnnotations}}
|
||||||
|
{{#supportAsync}}
|
||||||
|
import java.util.concurrent.CompletionStage;
|
||||||
|
import java.util.concurrent.CompletableFuture;
|
||||||
|
{{/supportAsync}}
|
||||||
|
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|||||||
@@ -10,4 +10,4 @@
|
|||||||
{{/isOAuth}}{{/authMethods}} }{{/hasAuthMethods}}, tags={ {{#vendorExtensions.x-tags}}"{{tag}}"{{^-last}}, {{/-last}}{{/vendorExtensions.x-tags}} })
|
{{/isOAuth}}{{/authMethods}} }{{/hasAuthMethods}}, tags={ {{#vendorExtensions.x-tags}}"{{tag}}"{{^-last}}, {{/-last}}{{/vendorExtensions.x-tags}} })
|
||||||
@ApiResponses(value = { {{#responses}}
|
@ApiResponses(value = { {{#responses}}
|
||||||
@ApiResponse(code = {{{code}}}, message = "{{{message}}}", response = {{{baseType}}}.class{{#returnContainer}}, responseContainer = "{{{.}}}"{{/returnContainer}}){{^-last}},{{/-last}}{{/responses}} }){{/useSwaggerAnnotations}}
|
@ApiResponse(code = {{{code}}}, message = "{{{message}}}", response = {{{baseType}}}.class{{#returnContainer}}, responseContainer = "{{{.}}}"{{/returnContainer}}){{^-last}},{{/-last}}{{/responses}} }){{/useSwaggerAnnotations}}
|
||||||
{{#returnResponse}}Response{{/returnResponse}}{{^returnResponse}}{{>returnTypeInterface}}{{/returnResponse}} {{nickname}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{^-last}},{{/-last}}{{/allParams}});
|
{{#supportAsync}}{{>returnAsyncTypeInterface}}{{/supportAsync}}{{^supportAsync}}{{#returnResponse}}Response{{/returnResponse}}{{^returnResponse}}{{>returnTypeInterface}}{{/returnResponse}}{{/supportAsync}} {{nickname}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{^-last}},{{/-last}}{{/allParams}});
|
||||||
@@ -11,6 +11,6 @@
|
|||||||
@ApiResponses(value = { {{#responses}}
|
@ApiResponses(value = { {{#responses}}
|
||||||
@ApiResponse(code = {{{code}}}, message = "{{{message}}}", response = {{{baseType}}}.class{{#containerType}}, responseContainer = "{{{.}}}"{{/containerType}}){{^-last}},{{/-last}}{{/responses}}
|
@ApiResponse(code = {{{code}}}, message = "{{{message}}}", response = {{{baseType}}}.class{{#containerType}}, responseContainer = "{{{.}}}"{{/containerType}}){{^-last}},{{/-last}}{{/responses}}
|
||||||
}){{/useSwaggerAnnotations}}
|
}){{/useSwaggerAnnotations}}
|
||||||
public Response {{nickname}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>cookieParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{^-last}},{{/-last}}{{/allParams}}) {
|
public {{#supportAsync}}CompletionStage<{{/supportAsync}}Response{{#supportAsync}}>{{/supportAsync}} {{nickname}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>cookieParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{^-last}},{{/-last}}{{/allParams}}) {
|
||||||
return Response.ok().entity("magic!").build();
|
return {{#supportAsync}}CompletableFuture.supplyAsync(() -> {{/supportAsync}}Response.ok().entity("magic!").build(){{#supportAsync}}){{/supportAsync}};
|
||||||
}
|
}
|
||||||
@@ -140,6 +140,11 @@
|
|||||||
{{/useBeanValidation}}
|
{{/useBeanValidation}}
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<properties>
|
<properties>
|
||||||
|
{{#java8}}
|
||||||
|
<java.version>1.8</java.version>
|
||||||
|
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||||
|
<maven.compiler.target>${java.version}</maven.compiler.target>
|
||||||
|
{{/java8}}
|
||||||
<jackson-version>2.9.9</jackson-version>
|
<jackson-version>2.9.9</jackson-version>
|
||||||
<junit-version>4.13.1</junit-version>
|
<junit-version>4.13.1</junit-version>
|
||||||
{{#useBeanValidation}}
|
{{#useBeanValidation}}
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
CompletionStage<{{#returnResponse}}Response{{/returnResponse}}{{^returnResponse}}{{#returnContainer}}{{#isMap}}Map<String, {{{returnBaseType}}}>{{/isMap}}{{#isArray}}{{{returnContainer}}}<{{{returnBaseType}}}>{{/isArray}}{{/returnContainer}}{{^returnContainer}}{{{returnBaseType}}}{{/returnContainer}}{{/returnResponse}}>
|
||||||
@@ -13,3 +13,6 @@ libraryDependencies += "org.webjars" % "swagger-ui" % "3.32.5"
|
|||||||
libraryDependencies += "javax.validation" % "validation-api" % "2.0.1.Final"
|
libraryDependencies += "javax.validation" % "validation-api" % "2.0.1.Final"
|
||||||
{{/useBeanValidation}}
|
{{/useBeanValidation}}
|
||||||
libraryDependencies += guice
|
libraryDependencies += guice
|
||||||
|
libraryDependencies += "com.auth0" % "java-jwt" % "3.18.1"
|
||||||
|
libraryDependencies += "com.auth0" % "jwks-rsa" % "0.19.0"
|
||||||
|
libraryDependencies += "org.apache.httpcomponents" % "httpclient" % "4.5.6"
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import com.google.inject.AbstractModule;
|
import com.google.inject.AbstractModule;
|
||||||
|
|
||||||
import {{apiPackage}}.*;
|
import {{apiPackage}}.*;
|
||||||
|
import openapitools.SecurityAPIUtils;
|
||||||
|
|
||||||
public class Module extends AbstractModule {
|
public class Module extends AbstractModule {
|
||||||
|
|
||||||
@@ -11,5 +12,6 @@ public class Module extends AbstractModule {
|
|||||||
bind({{classname}}ControllerImpInterface.class).to({{classname}}ControllerImp.class);
|
bind({{classname}}ControllerImpInterface.class).to({{classname}}ControllerImp.class);
|
||||||
{{/apis}}
|
{{/apis}}
|
||||||
{{/apiInfo}}
|
{{/apiInfo}}
|
||||||
|
bind(SecurityAPIUtils.class);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -20,6 +20,9 @@ import play.libs.Files.TemporaryFile;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
{{/handleExceptions}}
|
{{/handleExceptions}}
|
||||||
import openapitools.OpenAPIUtils;
|
import openapitools.OpenAPIUtils;
|
||||||
|
{{^useInterfaces}}
|
||||||
|
import openapitools.SecurityAPIUtils;
|
||||||
|
{{/useInterfaces}}
|
||||||
import com.fasterxml.jackson.core.type.TypeReference;
|
import com.fasterxml.jackson.core.type.TypeReference;
|
||||||
{{#supportAsync}}
|
{{#supportAsync}}
|
||||||
|
|
||||||
@@ -46,9 +49,12 @@ public class {{classname}}Controller extends Controller {
|
|||||||
{{#useBeanValidation}}
|
{{#useBeanValidation}}
|
||||||
private final Config configuration;
|
private final Config configuration;
|
||||||
{{/useBeanValidation}}
|
{{/useBeanValidation}}
|
||||||
|
{{^useInterfaces}}
|
||||||
|
private final SecurityAPIUtils securityAPIUtils;
|
||||||
|
{{/useInterfaces}}
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private {{classname}}Controller({{#useBeanValidation}}Config configuration{{^controllerOnly}}, {{/controllerOnly}}{{/useBeanValidation}}{{^controllerOnly}}{{classname}}ControllerImp{{#useInterfaces}}Interface{{/useInterfaces}} imp{{/controllerOnly}}) {
|
private {{classname}}Controller({{#useBeanValidation}}Config configuration{{^controllerOnly}}, {{/controllerOnly}}{{/useBeanValidation}}{{^controllerOnly}}{{classname}}ControllerImp{{#useInterfaces}}Interface{{/useInterfaces}} imp{{/controllerOnly}}{{^useInterfaces}}, SecurityAPIUtils securityAPIUtils{{/useInterfaces}}) {
|
||||||
{{^controllerOnly}}
|
{{^controllerOnly}}
|
||||||
this.imp = imp;
|
this.imp = imp;
|
||||||
{{/controllerOnly}}
|
{{/controllerOnly}}
|
||||||
@@ -56,6 +62,9 @@ public class {{classname}}Controller extends Controller {
|
|||||||
{{#useBeanValidation}}
|
{{#useBeanValidation}}
|
||||||
this.configuration = configuration;
|
this.configuration = configuration;
|
||||||
{{/useBeanValidation}}
|
{{/useBeanValidation}}
|
||||||
|
{{^useInterfaces}}
|
||||||
|
this.securityAPIUtils = securityAPIUtils;
|
||||||
|
{{/useInterfaces}}
|
||||||
}
|
}
|
||||||
|
|
||||||
{{#operation}}
|
{{#operation}}
|
||||||
|
|||||||
@@ -14,7 +14,9 @@ import play.mvc.Result;
|
|||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.fasterxml.jackson.databind.JsonNode;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import openapitools.OpenAPIUtils;
|
import openapitools.OpenAPIUtils;
|
||||||
|
import openapitools.SecurityAPIUtils;
|
||||||
import static play.mvc.Results.ok;
|
import static play.mvc.Results.ok;
|
||||||
|
import static play.mvc.Results.unauthorized;
|
||||||
import play.libs.Files.TemporaryFile;
|
import play.libs.Files.TemporaryFile;
|
||||||
{{#supportAsync}}
|
{{#supportAsync}}
|
||||||
import java.util.concurrent.CompletionException;
|
import java.util.concurrent.CompletionException;
|
||||||
@@ -32,6 +34,7 @@ public abstract class {{classname}}ControllerImpInterface {
|
|||||||
{{#useBeanValidation}}
|
{{#useBeanValidation}}
|
||||||
@Inject private Config configuration;
|
@Inject private Config configuration;
|
||||||
{{/useBeanValidation}}
|
{{/useBeanValidation}}
|
||||||
|
@Inject private SecurityAPIUtils securityAPIUtils;
|
||||||
private ObjectMapper mapper = new ObjectMapper();
|
private ObjectMapper mapper = new ObjectMapper();
|
||||||
|
|
||||||
{{#operation}}
|
{{#operation}}
|
||||||
|
|||||||
@@ -1,4 +1,12 @@
|
|||||||
{{^controllerOnly}}
|
{{^controllerOnly}}
|
||||||
|
{{#authMethods.0}}
|
||||||
|
{{#isOAuth}}
|
||||||
|
if (!securityAPIUtils.isRequestTokenValid(request, "{{name}}")) {
|
||||||
|
return {{#supportAsync}}CompletableFuture.supplyAsync(play.mvc.Results::unauthorized){{/supportAsync}}{{^supportAsync}}unauthorized(){{/supportAsync}};
|
||||||
|
}
|
||||||
|
|
||||||
|
{{/isOAuth}}
|
||||||
|
{{/authMethods.0}}
|
||||||
{{^returnType}}
|
{{^returnType}}
|
||||||
{{#supportAsync}}
|
{{#supportAsync}}
|
||||||
CompletableFuture<Result> result = CompletableFuture.supplyAsync(() -> {
|
CompletableFuture<Result> result = CompletableFuture.supplyAsync(() -> {
|
||||||
@@ -10,7 +18,7 @@ CompletableFuture<Result> result = CompletableFuture.supplyAsync(() -> {
|
|||||||
{{^isResponseFile}}
|
{{^isResponseFile}}
|
||||||
{{^returnTypeIsPrimitive}}
|
{{^returnTypeIsPrimitive}}
|
||||||
{{#useBeanValidation}}
|
{{#useBeanValidation}}
|
||||||
{{^supportAsync}}
|
|
||||||
if (configuration.getBoolean("useOutputBeanValidation")) {
|
if (configuration.getBoolean("useOutputBeanValidation")) {
|
||||||
{{#isArray}}
|
{{#isArray}}
|
||||||
for ({{{returnType}}} curItem : obj) {
|
for ({{{returnType}}} curItem : obj) {
|
||||||
@@ -26,24 +34,7 @@ CompletableFuture<Result> result = CompletableFuture.supplyAsync(() -> {
|
|||||||
OpenAPIUtils.validate(obj);
|
OpenAPIUtils.validate(obj);
|
||||||
{{/returnContainer}}
|
{{/returnContainer}}
|
||||||
}
|
}
|
||||||
{{/supportAsync}}
|
|
||||||
{{#supportAsync}}
|
|
||||||
if (configuration.getBoolean("useOutputBeanValidation")) {
|
|
||||||
{{#isArray}}
|
|
||||||
for ({{{returnType}}} curItem : obj) {
|
|
||||||
OpenAPIUtils.validate(curItem);
|
|
||||||
}
|
|
||||||
{{/isArray}}
|
|
||||||
{{#isMap}}
|
|
||||||
for (Map.Entry<String, {{{returnType}}}> entry : obj.entrySet()) {
|
|
||||||
OpenAPIUtils.validate(entry.getValue());
|
|
||||||
}
|
|
||||||
{{/isMap}}
|
|
||||||
{{^returnContainer}}
|
|
||||||
OpenAPIUtils.validate(obj);
|
|
||||||
{{/returnContainer}}
|
|
||||||
}
|
|
||||||
{{/supportAsync}}
|
|
||||||
{{/useBeanValidation}}
|
{{/useBeanValidation}}
|
||||||
{{/returnTypeIsPrimitive}}
|
{{/returnTypeIsPrimitive}}
|
||||||
{{/isResponseFile}}
|
{{/isResponseFile}}
|
||||||
@@ -58,9 +49,11 @@ return stage.thenApply(obj -> {
|
|||||||
{{/supportAsync}}
|
{{/supportAsync}}
|
||||||
{{^isResponseFile}}
|
{{^isResponseFile}}
|
||||||
{{#supportAsync}} {{/supportAsync}} JsonNode result = mapper.valueToTree(obj);
|
{{#supportAsync}} {{/supportAsync}} JsonNode result = mapper.valueToTree(obj);
|
||||||
|
|
||||||
{{#supportAsync}} {{/supportAsync}} return ok(result);
|
{{#supportAsync}} {{/supportAsync}} return ok(result);
|
||||||
{{/isResponseFile}}
|
{{/isResponseFile}}
|
||||||
{{#isResponseFile}}
|
{{#isResponseFile}}
|
||||||
|
|
||||||
{{#supportAsync}} {{/supportAsync}} return ok(obj);
|
{{#supportAsync}} {{/supportAsync}} return ok(obj);
|
||||||
{{/isResponseFile}}
|
{{/isResponseFile}}
|
||||||
{{/returnType}}
|
{{/returnType}}
|
||||||
|
|||||||
173
modules/openapi-generator/src/main/resources/JavaPlayFramework/securityApiUtils.mustache
vendored
Normal file
173
modules/openapi-generator/src/main/resources/JavaPlayFramework/securityApiUtils.mustache
vendored
Normal file
@@ -0,0 +1,173 @@
|
|||||||
|
package openapitools;
|
||||||
|
|
||||||
|
import com.auth0.jwk.Jwk;
|
||||||
|
import com.auth0.jwk.UrlJwkProvider;
|
||||||
|
import com.auth0.jwt.JWT;
|
||||||
|
import com.auth0.jwt.JWTVerifier;
|
||||||
|
import com.auth0.jwt.algorithms.Algorithm;
|
||||||
|
import com.auth0.jwt.interfaces.DecodedJWT;
|
||||||
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
import com.google.inject.Inject;
|
||||||
|
import com.google.inject.Singleton;
|
||||||
|
import com.typesafe.config.Config;
|
||||||
|
import org.apache.http.HttpHeaders;
|
||||||
|
import org.apache.http.HttpResponse;
|
||||||
|
import org.apache.http.HttpStatus;
|
||||||
|
import org.apache.http.NameValuePair;
|
||||||
|
import org.apache.http.client.HttpClient;
|
||||||
|
import org.apache.http.client.entity.UrlEncodedFormEntity;
|
||||||
|
import org.apache.http.client.methods.HttpPost;
|
||||||
|
import org.apache.http.impl.client.HttpClientBuilder;
|
||||||
|
import org.apache.http.message.BasicNameValuePair;
|
||||||
|
import org.apache.http.util.EntityUtils;
|
||||||
|
import play.mvc.Http;
|
||||||
|
|
||||||
|
import java.net.URL;
|
||||||
|
import java.security.PublicKey;
|
||||||
|
import java.security.interfaces.RSAPublicKey;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
@Singleton
|
||||||
|
public class SecurityAPIUtils {
|
||||||
|
private final String bearerPrefix = "Bearer ";
|
||||||
|
private final ObjectMapper mapper;
|
||||||
|
|
||||||
|
private boolean useOnlineValidation = false;
|
||||||
|
|
||||||
|
// Online validation
|
||||||
|
private HashMap<String, String> tokenIntrospectEndpoints = new HashMap<>();
|
||||||
|
private final String clientId;
|
||||||
|
private final String clientSecret;
|
||||||
|
|
||||||
|
// Offline validation
|
||||||
|
private HashMap<String, String> jwksEndpoints = new HashMap<>();
|
||||||
|
private String tokenKeyId = "";
|
||||||
|
private JWTVerifier tokenVerifier; //Reusable verifier instance until tokenKeyId changes.
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
SecurityAPIUtils(Config configuration) {
|
||||||
|
mapper = new ObjectMapper();
|
||||||
|
|
||||||
|
clientId = configuration.hasPath("oauth.clientId") ? configuration.getString("oauth.clientId") : "";
|
||||||
|
clientSecret = configuration.hasPath("oauth.clientSecret") ? configuration.getString("oauth.clientSecret") : "";
|
||||||
|
|
||||||
|
{{#hasOAuthMethods}}
|
||||||
|
{{#oauthMethods}}
|
||||||
|
tokenIntrospectEndpoints.put("{{name}}", "{{tokenIntrospectUrl}}");
|
||||||
|
{{/oauthMethods}}
|
||||||
|
{{/hasOAuthMethods}}
|
||||||
|
|
||||||
|
{{#hasOAuthMethods}}
|
||||||
|
{{#oauthMethods}}
|
||||||
|
jwksEndpoints.put("{{name}}", "{{jwksUrl}}");
|
||||||
|
{{/oauthMethods}}
|
||||||
|
{{/hasOAuthMethods}}
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean isRequestTokenValidByOnlineCheck(Http.Request request, String securityMethodName) {
|
||||||
|
try {
|
||||||
|
Optional<String> authToken = request.getHeaders().get(HttpHeaders.AUTHORIZATION);
|
||||||
|
|
||||||
|
if (authToken.isPresent()) {
|
||||||
|
String tokenWithoutBearerPrefix = authToken.get().substring(bearerPrefix.length());
|
||||||
|
|
||||||
|
HttpClientBuilder builder = HttpClientBuilder.create();
|
||||||
|
HttpClient httpClient = builder.build();
|
||||||
|
HttpPost httppost = new HttpPost(this.tokenIntrospectEndpoints.get(securityMethodName));
|
||||||
|
|
||||||
|
List<NameValuePair> params = new ArrayList<>();
|
||||||
|
params.add(new BasicNameValuePair("token", tokenWithoutBearerPrefix));
|
||||||
|
params.add(new BasicNameValuePair("client_id", clientId));
|
||||||
|
params.add(new BasicNameValuePair("client_secret", clientSecret));
|
||||||
|
httppost.setEntity(new UrlEncodedFormEntity(params, "UTF-8"));
|
||||||
|
|
||||||
|
HttpResponse response = httpClient.execute(httppost);
|
||||||
|
String responseJsonString = EntityUtils.toString(response.getEntity());
|
||||||
|
HashMap responseJsonObject = mapper.readValue(responseJsonString, HashMap.class);
|
||||||
|
|
||||||
|
return response.getStatusLine().getStatusCode() == HttpStatus.SC_OK && (boolean) responseJsonObject.get("active");
|
||||||
|
}
|
||||||
|
} catch (Exception exception) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean isRequestTokenValidByOfflineCheck(Http.Request request, String securityMethodName) {
|
||||||
|
try {
|
||||||
|
Optional<String> authHeader = request.getHeaders().get(HttpHeaders.AUTHORIZATION);
|
||||||
|
|
||||||
|
if (authHeader.isPresent()) {
|
||||||
|
String bearerToken = authHeader.get().substring(bearerPrefix.length());
|
||||||
|
return isTokenValidByOfflineCheck(bearerToken, securityMethodName);
|
||||||
|
}
|
||||||
|
} catch (Exception exception) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isTokenValidByOfflineCheck(String bearerToken, String securityMethodName) {
|
||||||
|
try {
|
||||||
|
DecodedJWT jwt = JWT.decode(bearerToken);
|
||||||
|
String issuer = jwt.getIssuer();
|
||||||
|
String keyId = jwt.getKeyId();
|
||||||
|
if (!tokenKeyId.equals(keyId)) {
|
||||||
|
if (securityMethodName == null) {
|
||||||
|
securityMethodName = jwksEndpoints.keySet().stream().findFirst().get();
|
||||||
|
}
|
||||||
|
|
||||||
|
Jwk jwk = new UrlJwkProvider(new URL(this.jwksEndpoints.get(securityMethodName))).get(keyId);
|
||||||
|
final PublicKey publicKey = jwk.getPublicKey();
|
||||||
|
|
||||||
|
if (!(publicKey instanceof RSAPublicKey)) {
|
||||||
|
throw new IllegalArgumentException(String.format("Key with ID %s was found in JWKS but is not a RSA-key.", keyId));
|
||||||
|
}
|
||||||
|
|
||||||
|
Algorithm algorithm = Algorithm.RSA256((RSAPublicKey) publicKey, null);
|
||||||
|
tokenVerifier = JWT.require(algorithm)
|
||||||
|
.withIssuer(issuer)
|
||||||
|
.build();
|
||||||
|
tokenKeyId = keyId;
|
||||||
|
}
|
||||||
|
|
||||||
|
DecodedJWT verifiedJWT = tokenVerifier.verify(bearerToken);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
} catch (Exception exception) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOAuthUserIdFromRequestToken(Http.Request requestWithPreviouslyVerifiedToken) {
|
||||||
|
try {
|
||||||
|
Optional<String> authHeader = requestWithPreviouslyVerifiedToken.getHeaders().get(HttpHeaders.AUTHORIZATION);
|
||||||
|
if (authHeader.isPresent()) {
|
||||||
|
String bearerToken = authHeader.get().substring(bearerPrefix.length());
|
||||||
|
return getOAuthUserIdFromToken(bearerToken);
|
||||||
|
}
|
||||||
|
} catch (Exception exception) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOAuthUserIdFromToken(String bearerToken) {
|
||||||
|
try {
|
||||||
|
DecodedJWT jwt = JWT.decode(bearerToken);
|
||||||
|
return jwt.getSubject();
|
||||||
|
} catch (Exception exception) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isRequestTokenValid(Http.Request request, String securityMethodName) {
|
||||||
|
return useOnlineValidation ? isRequestTokenValidByOnlineCheck(request, securityMethodName) : isRequestTokenValidByOfflineCheck(request, securityMethodName);
|
||||||
|
}
|
||||||
|
}
|
||||||
1
modules/openapi-generator/src/main/resources/JavaSpring/allowableValues.mustache
vendored
Normal file
1
modules/openapi-generator/src/main/resources/JavaSpring/allowableValues.mustache
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{{#allowableValues}}allowableValues ={{#oas3}} { {{#values}}"{{{.}}}"{{^-last}}, {{/-last}}{{/values}} }{{/oas3}}{{^oas3}} "{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{#-last}}{{/-last}}{{/values}}"{{/oas3}}{{/allowableValues}}
|
||||||
@@ -10,9 +10,9 @@ package {{package}};
|
|||||||
{{#oas3}}
|
{{#oas3}}
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.Parameter;
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
|
import io.swagger.v3.oas.annotations.Parameters;
|
||||||
import io.swagger.v3.oas.annotations.media.Content;
|
import io.swagger.v3.oas.annotations.media.Content;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import io.swagger.v3.oas.annotations.parameters.RequestBody;
|
|
||||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
@@ -120,29 +120,62 @@ public interface {{classname}} {
|
|||||||
@ApiVirtual
|
@ApiVirtual
|
||||||
{{/virtualService}}
|
{{/virtualService}}
|
||||||
{{#oas3}}
|
{{#oas3}}
|
||||||
@Operation(summary = "{{{summary}}}", tags={ {{#vendorExtensions.x-tags}}"{{tag}}",{{/vendorExtensions.x-tags}} }, responses = { {{#responses}} @ApiResponse(responseCode = "{{{code}}}", description = "{{{message}}}"{{#baseType}}, content = @Content(mediaType = "application/json", schema = @Schema(implementation = {{{baseType}}}.class)){{/baseType}}){{^-last}},{{/-last}}{{/responses}} }{{#hasAuthMethods}},security = {
|
@Operation(
|
||||||
{{#authMethods}}@SecurityRequirement(name = "{{name}}"{{#isOAuth}}, scopes={ {{#scopes}}"{{scope}}"{{^-last}}, {{/-last}}{{/scopes}} }{{/isOAuth}}){{^-last}},{{/-last}}{{/authMethods}} } {{/hasAuthMethods}})
|
summary = "{{{summary}}}",
|
||||||
{{/oas3}}{{^oas3}}
|
tags = { {{#vendorExtensions.x-tags}}"{{tag}}"{{^-last}}, {{/-last}}{{/vendorExtensions.x-tags}} },
|
||||||
@ApiOperation(value = "{{{summary}}}", nickname = "{{{operationId}}}", notes = "{{{notes}}}"{{#returnBaseType}}, response = {{{.}}}.class{{/returnBaseType}}{{#returnContainer}}, responseContainer = "{{{.}}}"{{/returnContainer}}{{#hasAuthMethods}}, authorizations = {
|
responses = {
|
||||||
{{#authMethods}}{{#isOAuth}}@Authorization(value = "{{name}}", scopes = {
|
{{#responses}}
|
||||||
{{#scopes}}@AuthorizationScope(scope = "{{scope}}", description = "{{description}}"){{^-last}},
|
@ApiResponse(responseCode = "{{{code}}}", description = "{{{message}}}"{{#baseType}}, content = @Content(mediaType = "application/json", schema = @Schema(implementation = {{{baseType}}}.class)){{/baseType}}){{^-last}},{{/-last}}
|
||||||
{{/-last}}{{/scopes}} }){{^-last}},{{/-last}}{{/isOAuth}}
|
{{/responses}}
|
||||||
{{^isOAuth}}@Authorization(value = "{{name}}"){{^-last}},{{/-last}}
|
}{{#hasAuthMethods}},
|
||||||
{{/isOAuth}}{{/authMethods}} }{{/hasAuthMethods}}, tags={ {{#vendorExtensions.x-tags}}"{{tag}}",{{/vendorExtensions.x-tags}} })
|
security = {
|
||||||
@ApiResponses(value = { {{#responses}}
|
{{#authMethods}}
|
||||||
|
@SecurityRequirement(name = "{{name}}"{{#isOAuth}}, scopes={ {{#scopes}}"{{scope}}"{{^-last}}, {{/-last}}{{/scopes}} }{{/isOAuth}}){{^-last}},{{/-last}}
|
||||||
@ApiResponse(code = {{{code}}}, message = "{{{message}}}"{{#baseType}}, response = {{{.}}}.class{{/baseType}}{{#containerType}}, responseContainer = "{{{.}}}"{{/containerType}}){{^-last}},{{/-last}}{{/responses}} })
|
{{/authMethods}}
|
||||||
|
}{{/hasAuthMethods}}
|
||||||
|
)
|
||||||
|
{{/oas3}}
|
||||||
|
{{^oas3}}
|
||||||
|
@ApiOperation(
|
||||||
|
tags = { {{#vendorExtensions.x-tags}}"{{tag}}"{{^-last}}, {{/-last}}{{/vendorExtensions.x-tags}} },
|
||||||
|
value = "{{{summary}}}",
|
||||||
|
nickname = "{{{operationId}}}",
|
||||||
|
notes = "{{{notes}}}"{{#returnBaseType}},
|
||||||
|
response = {{{.}}}.class{{/returnBaseType}}{{#returnContainer}},
|
||||||
|
responseContainer = "{{{.}}}"{{/returnContainer}}{{#hasAuthMethods}},
|
||||||
|
authorizations = {
|
||||||
|
{{#authMethods}}
|
||||||
|
{{#isOAuth}}
|
||||||
|
@Authorization(value = "{{name}}", scopes = {
|
||||||
|
{{#scopes}}
|
||||||
|
@AuthorizationScope(scope = "{{scope}}", description = "{{description}}"){{^-last}},{{/-last}}
|
||||||
|
{{/scopes}}
|
||||||
|
}){{^-last}},{{/-last}}
|
||||||
|
{{/isOAuth}}
|
||||||
|
{{^isOAuth}}
|
||||||
|
@Authorization(value = "{{name}}"){{^-last}},{{/-last}}
|
||||||
|
{{/isOAuth}}
|
||||||
|
{{/authMethods}} }{{/hasAuthMethods}}
|
||||||
|
)
|
||||||
|
@ApiResponses({
|
||||||
|
{{#responses}}
|
||||||
|
@ApiResponse(code = {{{code}}}, message = "{{{message}}}"{{#baseType}}, response = {{{.}}}.class{{/baseType}}{{#containerType}}, responseContainer = "{{{.}}}"{{/containerType}}){{^-last}},{{/-last}}
|
||||||
|
{{/responses}}
|
||||||
|
})
|
||||||
{{/oas3}}
|
{{/oas3}}
|
||||||
{{#implicitHeaders}}
|
{{#implicitHeaders}}
|
||||||
{{#oas3}}
|
{{#oas3}}
|
||||||
@Parameters({
|
@Parameters({
|
||||||
|
{{#headerParams}}
|
||||||
|
{{>paramDoc}}{{^-last}},{{/-last}}
|
||||||
|
{{/headerParams}}
|
||||||
{{/oas3}}
|
{{/oas3}}
|
||||||
{{^oas3}}
|
{{^oas3}}
|
||||||
@ApiImplicitParams({
|
@ApiImplicitParams({
|
||||||
{{/oas3}}
|
|
||||||
{{#headerParams}}
|
{{#headerParams}}
|
||||||
{{>implicitHeader}}
|
{{>implicitHeader}}{{^-last}},{{/-last}}
|
||||||
{{/headerParams}}
|
{{/headerParams}}
|
||||||
|
{{/oas3}}
|
||||||
})
|
})
|
||||||
{{/implicitHeaders}}
|
{{/implicitHeaders}}
|
||||||
@RequestMapping(
|
@RequestMapping(
|
||||||
@@ -153,13 +186,18 @@ public interface {{classname}} {
|
|||||||
produces = { {{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}} }{{/hasProduces}}{{#hasConsumes}},
|
produces = { {{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}} }{{/hasProduces}}{{#hasConsumes}},
|
||||||
consumes = { {{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}} }{{/hasConsumes}}{{/singleContentTypes}}
|
consumes = { {{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}} }{{/hasConsumes}}{{/singleContentTypes}}
|
||||||
)
|
)
|
||||||
{{#jdk8-default-interface}}default {{/jdk8-default-interface}}{{#responseWrapper}}{{.}}<{{/responseWrapper}}ResponseEntity<{{>returnTypes}}>{{#responseWrapper}}>{{/responseWrapper}} {{#delegate-method}}_{{/delegate-method}}{{operationId}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{>cookieParams}}{{^-last}},{{/-last}}{{#-last}}{{#reactive}}, {{/reactive}}{{/-last}}{{/allParams}}{{#reactive}}{{#oas3}}@Hidden{{/oas3}}{{^oas3}}@springfox.documentation.annotations.ApiIgnore{{/oas3}} final ServerWebExchange exchange{{/reactive}}{{#vendorExtensions.x-spring-paginated}}, {{#oas3}}@Hidden{{/oas3}}{{^oas3}}@springfox.documentation.annotations.ApiIgnore{{/oas3}} final org.springframework.data.domain.Pageable pageable{{/vendorExtensions.x-spring-paginated}}){{^jdk8-default-interface}};{{/jdk8-default-interface}}{{#jdk8-default-interface}}{{#unhandledException}} throws Exception{{/unhandledException}} {
|
{{#jdk8-default-interface}}default {{/jdk8-default-interface}}{{#responseWrapper}}{{.}}<{{/responseWrapper}}ResponseEntity<{{>returnTypes}}>{{#responseWrapper}}>{{/responseWrapper}} {{#delegate-method}}_{{/delegate-method}}{{operationId}}(
|
||||||
|
{{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{>cookieParams}}{{^-last}},
|
||||||
|
{{/-last}}{{/allParams}}{{#reactive}}{{#hasParams}},
|
||||||
|
{{/hasParams}}{{#oas3}}@Parameter(hidden = true){{/oas3}}{{#useSpringfox}}@springfox.documentation.annotations.ApiIgnore{{/useSpringfox}} final ServerWebExchange exchange{{/reactive}}{{#vendorExtensions.x-spring-paginated}}{{#hasParams}},
|
||||||
|
{{/hasParams}}{{#useSpringfox}}@springfox.documentation.annotations.ApiIgnore {{/useSpringfox}}final org.springframework.data.domain.Pageable pageable{{/vendorExtensions.x-spring-paginated}}
|
||||||
|
){{^jdk8-default-interface}};{{/jdk8-default-interface}}{{#jdk8-default-interface}}{{#unhandledException}} throws Exception{{/unhandledException}} {
|
||||||
{{#delegate-method}}
|
{{#delegate-method}}
|
||||||
return {{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#reactive}}{{#hasParams}}, {{/hasParams}}exchange{{/reactive}}{{#vendorExtensions.x-spring-paginated}}, pageable{{/vendorExtensions.x-spring-paginated}});
|
return {{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#reactive}}{{#hasParams}}, {{/hasParams}}exchange{{/reactive}}{{#vendorExtensions.x-spring-paginated}}, pageable{{/vendorExtensions.x-spring-paginated}});
|
||||||
}
|
}
|
||||||
|
|
||||||
// Override this method
|
// Override this method
|
||||||
{{#jdk8-default-interface}}default {{/jdk8-default-interface}} {{#responseWrapper}}{{.}}<{{/responseWrapper}}ResponseEntity<{{>returnTypes}}>{{#responseWrapper}}>{{/responseWrapper}} {{operationId}}({{#allParams}}{{^isFile}}{{^isBodyParam}}{{>optionalDataType}}{{/isBodyParam}}{{#isBodyParam}}{{^reactive}}{{{dataType}}}{{/reactive}}{{#reactive}}{{^isArray}}Mono<{{{dataType}}}>{{/isArray}}{{#isArray}}Flux<{{{baseType}}}>{{/isArray}}{{/reactive}}{{/isBodyParam}}{{/isFile}}{{#isFile}}{{#reactive}}Flux<Part>{{/reactive}}{{^reactive}}MultipartFile{{/reactive}}{{/isFile}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#reactive}}{{#hasParams}}, {{/hasParams}}{{#oas3}}@Hidden{{/oas3}}{{^oas3}}@springfox.documentation.annotations.ApiIgnore{{/oas3}} final ServerWebExchange exchange{{/reactive}}{{#vendorExtensions.x-spring-paginated}}, {{#oas3}}@Hidden{{/oas3}}{{^oas3}}@springfox.documentation.annotations.ApiIgnore{{/oas3}} final org.springframework.data.domain.Pageable pageable{{/vendorExtensions.x-spring-paginated}}){{#unhandledException}} throws Exception{{/unhandledException}} {
|
{{#jdk8-default-interface}}default {{/jdk8-default-interface}} {{#responseWrapper}}{{.}}<{{/responseWrapper}}ResponseEntity<{{>returnTypes}}>{{#responseWrapper}}>{{/responseWrapper}} {{operationId}}({{#allParams}}{{^isFile}}{{^isBodyParam}}{{>optionalDataType}}{{/isBodyParam}}{{#isBodyParam}}{{^reactive}}{{{dataType}}}{{/reactive}}{{#reactive}}{{^isArray}}Mono<{{{dataType}}}>{{/isArray}}{{#isArray}}Flux<{{{baseType}}}>{{/isArray}}{{/reactive}}{{/isBodyParam}}{{/isFile}}{{#isFile}}{{#reactive}}Flux<Part>{{/reactive}}{{^reactive}}MultipartFile{{/reactive}}{{/isFile}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#reactive}}{{#hasParams}}, {{/hasParams}}{{#useSpringfox}}@springfox.documentation.annotations.ApiIgnore{{/useSpringfox}} final ServerWebExchange exchange{{/reactive}}{{#vendorExtensions.x-spring-paginated}}, {{#useSpringfox}}@springfox.documentation.annotations.ApiIgnore{{/useSpringfox}} final org.springframework.data.domain.Pageable pageable{{/vendorExtensions.x-spring-paginated}}){{#unhandledException}} throws Exception{{/unhandledException}} {
|
||||||
{{/delegate-method}}
|
{{/delegate-method}}
|
||||||
{{^isDelegate}}
|
{{^isDelegate}}
|
||||||
{{>methodBody}}
|
{{>methodBody}}
|
||||||
|
|||||||
@@ -3,7 +3,18 @@ package {{package}};
|
|||||||
{{^jdk8}}
|
{{^jdk8}}
|
||||||
{{#imports}}import {{import}};
|
{{#imports}}import {{import}};
|
||||||
{{/imports}}
|
{{/imports}}
|
||||||
|
{{#oas3}}
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Content;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||||
|
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
{{/oas3}}
|
||||||
|
{{^oas3}}
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
|
{{/oas3}}
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
import org.springframework.http.MediaType;
|
import org.springframework.http.MediaType;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
@@ -118,7 +129,11 @@ public class {{classname}}Controller implements {{classname}} {
|
|||||||
{{/externalDocs}}
|
{{/externalDocs}}
|
||||||
* @see {{classname}}#{{operationId}}
|
* @see {{classname}}#{{operationId}}
|
||||||
*/
|
*/
|
||||||
public {{#responseWrapper}}{{.}}<{{/responseWrapper}}ResponseEntity<{{>returnTypes}}>{{#responseWrapper}}>{{/responseWrapper}} {{operationId}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{>cookieParams}}{{^-last}},{{/-last}}{{/allParams}}{{#vendorExtensions.x-spring-paginated}}, @springfox.documentation.annotations.ApiIgnore final Pageable pageable{{/vendorExtensions.x-spring-paginated}}) {
|
public {{#responseWrapper}}{{.}}<{{/responseWrapper}}ResponseEntity<{{>returnTypes}}>{{#responseWrapper}}>{{/responseWrapper}} {{operationId}}(
|
||||||
|
{{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{>cookieParams}}{{^-last}},
|
||||||
|
{{/-last}}{{/allParams}}{{#vendorExtensions.x-spring-paginated}}{{#hasParams}},
|
||||||
|
{{/hasParams}}{{#useSpringfox}}@springfox.documentation.annotations.ApiIgnore {{/useSpringfox}}final Pageable pageable{{/vendorExtensions.x-spring-paginated}}
|
||||||
|
) {
|
||||||
{{^isDelegate}}
|
{{^isDelegate}}
|
||||||
{{^async}}
|
{{^async}}
|
||||||
{{>methodBody}}
|
{{>methodBody}}
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package {{package}};
|
|||||||
|
|
||||||
{{#imports}}import {{import}};
|
{{#imports}}import {{import}};
|
||||||
{{/imports}}
|
{{/imports}}
|
||||||
import io.swagger.annotations.*;
|
|
||||||
{{#vendorExtensions.x-spring-paginated}}
|
{{#vendorExtensions.x-spring-paginated}}
|
||||||
import org.springframework.data.domain.Pageable;
|
import org.springframework.data.domain.Pageable;
|
||||||
{{/vendorExtensions.x-spring-paginated}}
|
{{/vendorExtensions.x-spring-paginated}}
|
||||||
@@ -73,7 +72,7 @@ public interface {{classname}}Delegate {
|
|||||||
*/
|
*/
|
||||||
{{#jdk8-default-interface}}default {{/jdk8-default-interface}}{{#responseWrapper}}{{.}}<{{/responseWrapper}}ResponseEntity<{{>returnTypes}}>{{#responseWrapper}}>{{/responseWrapper}} {{operationId}}({{#allParams}}{{^isFile}}{{^isBodyParam}}{{>optionalDataType}}{{/isBodyParam}}{{#isBodyParam}}{{^reactive}}{{{dataType}}}{{/reactive}}{{#reactive}}{{^isArray}}Mono<{{{dataType}}}>{{/isArray}}{{#isArray}}Flux<{{{baseType}}}>{{/isArray}}{{/reactive}}{{/isBodyParam}}{{/isFile}}{{#isFile}}{{#isArray}}List<{{/isArray}}{{#reactive}}Flux<Part>{{/reactive}}{{^reactive}}MultipartFile{{/reactive}}{{#isArray}}>{{/isArray}}{{/isFile}} {{paramName}}{{^-last}},
|
{{#jdk8-default-interface}}default {{/jdk8-default-interface}}{{#responseWrapper}}{{.}}<{{/responseWrapper}}ResponseEntity<{{>returnTypes}}>{{#responseWrapper}}>{{/responseWrapper}} {{operationId}}({{#allParams}}{{^isFile}}{{^isBodyParam}}{{>optionalDataType}}{{/isBodyParam}}{{#isBodyParam}}{{^reactive}}{{{dataType}}}{{/reactive}}{{#reactive}}{{^isArray}}Mono<{{{dataType}}}>{{/isArray}}{{#isArray}}Flux<{{{baseType}}}>{{/isArray}}{{/reactive}}{{/isBodyParam}}{{/isFile}}{{#isFile}}{{#isArray}}List<{{/isArray}}{{#reactive}}Flux<Part>{{/reactive}}{{^reactive}}MultipartFile{{/reactive}}{{#isArray}}>{{/isArray}}{{/isFile}} {{paramName}}{{^-last}},
|
||||||
{{/-last}}{{/allParams}}{{#reactive}}{{#hasParams}},
|
{{/-last}}{{/allParams}}{{#reactive}}{{#hasParams}},
|
||||||
{{/hasParams}}ServerWebExchange exchange{{/reactive}}{{#vendorExtensions.x-spring-paginated}}, final Pageable pageable{{/vendorExtensions.x-spring-paginated}}){{#unhandledException}} throws Exception{{/unhandledException}}{{^jdk8-default-interface}};{{/jdk8-default-interface}}{{#jdk8-default-interface}} {
|
{{/hasParams}}ServerWebExchange exchange{{/reactive}}{{#vendorExtensions.x-spring-paginated}}, final org.springframework.data.domain.Pageable pageable{{/vendorExtensions.x-spring-paginated}}){{#unhandledException}} throws Exception{{/unhandledException}}{{^jdk8-default-interface}};{{/jdk8-default-interface}}{{#jdk8-default-interface}} {
|
||||||
{{>methodBody}}
|
{{>methodBody}}
|
||||||
}{{/jdk8-default-interface}}
|
}{{/jdk8-default-interface}}
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
{{#isBodyParam}}{{#oas3}}@Parameter(name ={{/oas3}}{{^oas3}}@ApiParam(value ={{/oas3}} "{{{description}}}"{{#required}}, required = true{{/required}} {{^isContainer}}{{#defaultValue}}, defaultValue = "{{{.}}}"{{/defaultValue}}{{/isContainer}}{{#allowableValues}}, {{#oas3}}schema = @Schema({{/oas3}}allowableValues = "{{{.}}}"{{#oas3}}){{/oas3}}{{/allowableValues}}) {{#useBeanValidation}} @Valid{{/useBeanValidation}} @RequestBody{{^required}}(required = false){{/required}} {{^reactive}}{{{dataType}}}{{/reactive}}{{#reactive}}{{^isArray}}Mono<{{{dataType}}}>{{/isArray}}{{#isArray}}Flux<{{{baseType}}}>{{/isArray}}{{/reactive}} {{paramName}}{{/isBodyParam}}
|
{{#isBodyParam}}{{>paramDoc}}{{#useBeanValidation}} @Valid{{/useBeanValidation}} @RequestBody{{^required}}(required = false){{/required}} {{^reactive}}{{{dataType}}}{{/reactive}}{{#reactive}}{{^isArray}}Mono<{{{dataType}}}>{{/isArray}}{{#isArray}}Flux<{{{baseType}}}>{{/isArray}}{{/reactive}} {{paramName}}{{/isBodyParam}}
|
||||||
@@ -1 +1 @@
|
|||||||
{{#isCookieParam}}{{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}{{#oas3}}@Parameter(name = "{{{baseName}}}", description = {{/oas3}}{{^oas3}}@ApiParam(value = {{/oas3}}"{{{description}}}"{{#required}}, required = true{{/required}}{{#allowableValues}}, allowableValues = "{{#enumVars}}{{#lambdaEscapeDoubleQuote}}{{{value}}}{{/lambdaEscapeDoubleQuote}}{{^-last}}, {{/-last}}{{#-last}}{{/-last}}{{/enumVars}}"{{/allowableValues}}{{^isContainer}}{{#defaultValue}}, defaultValue = "{{{.}}}"{{/defaultValue}}{{/isContainer}}) @CookieValue("{{baseName}}") {{>optionalDataType}} {{paramName}}{{/isCookieParam}}
|
{{#isCookieParam}}{{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}{{>paramDoc}} @CookieValue("{{baseName}}"){{>dateTimeParam}} {{>optionalDataType}} {{paramName}}{{/isCookieParam}}
|
||||||
1
modules/openapi-generator/src/main/resources/JavaSpring/dateTimeParam.mustache
vendored
Normal file
1
modules/openapi-generator/src/main/resources/JavaSpring/dateTimeParam.mustache
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{{#isDate}} @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE){{/isDate}}{{#isDateTime}} @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME){{/isDateTime}}
|
||||||
@@ -1 +1 @@
|
|||||||
{{#isFormParam}}{{^isFile}}{{#oas3}}@Parameter(name = "{{{baseName}}}", description = {{/oas3}}{{^oas3}}@ApiParam(value = {{/oas3}}"{{{description}}}"{{#required}}, required = true{{/required}}{{#allowableValues}}, allowableValues = "{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{#-last}}{{/-last}}{{/values}}"{{/allowableValues}}{{^isContainer}}{{#defaultValue}}, defaultValue = "{{{.}}}"{{/defaultValue}}{{/isContainer}}) {{#useBeanValidation}}@Valid{{/useBeanValidation}} @RequestPart(value = "{{baseName}}"{{#required}}, required = true{{/required}}{{^required}}, required = false{{/required}}) {{{dataType}}} {{paramName}}{{/isFile}}{{#isFile}}{{#oas3}}@Parameter(name = "{{{baseName}}}", description = {{/oas3}}{{^oas3}}@ApiParam(value = {{/oas3}}"{{{description}}}") {{#useBeanValidation}}@Valid{{/useBeanValidation}} @RequestPart(value = "{{baseName}}"{{#required}}, required = true{{/required}}{{^required}}, required = false{{/required}}) {{#isArray}}List<{{/isArray}}{{#reactive}}Flux<Part>{{/reactive}}{{^reactive}}MultipartFile{{/reactive}}{{#isArray}}>{{/isArray}} {{baseName}}{{/isFile}}{{/isFormParam}}
|
{{#isFormParam}}{{^isFile}}{{>paramDoc}}{{#useBeanValidation}} @Valid{{/useBeanValidation}} @RequestPart(value = "{{baseName}}"{{#required}}, required = true{{/required}}{{^required}}, required = false{{/required}}){{>dateTimeParam}} {{{dataType}}} {{paramName}}{{/isFile}}{{#isFile}}{{>paramDoc}} @RequestPart(value = "{{baseName}}"{{#required}}, required = true{{/required}}{{^required}}, required = false{{/required}}) {{#isArray}}List<{{/isArray}}{{#reactive}}Flux<Part>{{/reactive}}{{^reactive}}MultipartFile{{/reactive}}{{#isArray}}>{{/isArray}} {{baseName}}{{/isFile}}{{/isFormParam}}
|
||||||
@@ -1 +1 @@
|
|||||||
{{#isHeaderParam}}{{#oas3}}@Parameter(description ={{/oas3}}{{^oas3}}@ApiParam(value ={{/oas3}} "{{{description}}}"{{#required}}, required = true{{/required}}{{#allowableValues}}, allowableValues = "{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{#-last}}{{/-last}}{{/values}}"{{/allowableValues}}{{^isContainer}}{{#defaultValue}}, defaultValue = "{{{.}}}"{{/defaultValue}}{{/isContainer}}) @RequestHeader(value = "{{baseName}}", required = {{#required}}true{{/required}}{{^required}}false{{/required}}) {{>optionalDataType}} {{paramName}}{{/isHeaderParam}}
|
{{#isHeaderParam}}{{>paramDoc}} @RequestHeader(value = "{{baseName}}", required = {{#required}}true{{/required}}{{^required}}false{{/required}}){{>dateTimeParam}} {{>optionalDataType}} {{paramName}}{{/isHeaderParam}}
|
||||||
@@ -1 +1 @@
|
|||||||
{{#isHeaderParam}}@ApiImplicitParam(name = "{{{paramName}}}", value = "{{{description}}}", {{#required}}required = true,{{/required}} dataType = "{{{dataType}}}", paramType = "header"){{^-last}},{{/-last}}{{/isHeaderParam}}
|
{{#isHeaderParam}}@ApiImplicitParam(name = "{{{paramName}}}", value = "{{{description}}}", {{#required}}required = true,{{/required}} dataType = "{{{dataType}}}", paramType = "header"){{/isHeaderParam}}
|
||||||
@@ -10,7 +10,10 @@
|
|||||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||||
<maven.compiler.target>${java.version}</maven.compiler.target>
|
<maven.compiler.target>${java.version}</maven.compiler.target>
|
||||||
{{#useSpringfox}}
|
{{#useSpringfox}}
|
||||||
<springfox-version>2.9.2</springfox-version>
|
<springfox.version>2.9.2</springfox.version>
|
||||||
|
{{/useSpringfox}}
|
||||||
|
{{^useSpringfox}}
|
||||||
|
<swagger-core-version>{{#oas3}}2.1.11{{/oas3}}{{^oas3}}1.6.3{{/oas3}}</swagger-core-version>
|
||||||
{{/useSpringfox}}
|
{{/useSpringfox}}
|
||||||
</properties>
|
</properties>
|
||||||
{{#parentOverridden}}
|
{{#parentOverridden}}
|
||||||
@@ -24,7 +27,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-parent</artifactId>
|
<artifactId>spring-boot-starter-parent</artifactId>
|
||||||
<version>{{#java8}}2.3.3.RELEASE{{/java8}}{{^java8}}1.5.12.RELEASE{{/java8}}</version>
|
<version>2.5.8</version>
|
||||||
</parent>
|
</parent>
|
||||||
{{/parentOverridden}}
|
{{/parentOverridden}}
|
||||||
<build>
|
<build>
|
||||||
@@ -34,13 +37,6 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<goals>
|
|
||||||
<goal>repackage</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
</plugin>
|
||||||
{{#apiFirst}}
|
{{#apiFirst}}
|
||||||
<plugin>
|
<plugin>
|
||||||
@@ -91,43 +87,25 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.springfox</groupId>
|
<groupId>io.springfox</groupId>
|
||||||
<artifactId>springfox-swagger2</artifactId>
|
<artifactId>springfox-swagger2</artifactId>
|
||||||
<version>${springfox-version}</version>
|
<version>${springfox.version}</version>
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>io.springfox</groupId>
|
|
||||||
<artifactId>springfox-swagger-ui</artifactId>
|
|
||||||
<version>${springfox-version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>jakarta.xml.bind</groupId>
|
|
||||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
{{/useSpringfox}}
|
{{/useSpringfox}}
|
||||||
{{^useSpringfox}}
|
{{^useSpringfox}}
|
||||||
<dependency>
|
|
||||||
<groupId>io.springfox</groupId>
|
|
||||||
<artifactId>springfox-swagger2</artifactId>
|
|
||||||
<version>2.8.0</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.webjars</groupId>
|
|
||||||
<artifactId>swagger-ui</artifactId>
|
|
||||||
<version>3.14.2</version>
|
|
||||||
</dependency>
|
|
||||||
{{#oas3}}
|
{{#oas3}}
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.swagger.core.v3</groupId>
|
<groupId>io.swagger.core.v3</groupId>
|
||||||
<artifactId>swagger-annotations</artifactId>
|
<artifactId>swagger-annotations</artifactId>
|
||||||
<version>2.1.2</version>
|
<version>${swagger-core-version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
{{/oas3}}
|
{{/oas3}}
|
||||||
{{^oas3}}
|
{{^oas3}}
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.swagger</groupId>
|
<groupId>io.swagger</groupId>
|
||||||
<artifactId>swagger-annotations</artifactId>
|
<artifactId>swagger-annotations</artifactId>
|
||||||
<version>1.5.14</version>
|
<version>${swagger-core-version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
{{/oas3}}
|
{{/oas3}}
|
||||||
|
{{/useSpringfox}}
|
||||||
<!-- @Nullable annotation -->
|
<!-- @Nullable annotation -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.code.findbugs</groupId>
|
<groupId>com.google.code.findbugs</groupId>
|
||||||
@@ -138,9 +116,12 @@
|
|||||||
<groupId>com.fasterxml.jackson.dataformat</groupId>
|
<groupId>com.fasterxml.jackson.dataformat</groupId>
|
||||||
<artifactId>jackson-dataformat-yaml</artifactId>
|
<artifactId>jackson-dataformat-yaml</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
{{/useSpringfox}}
|
|
||||||
{{#withXml}}
|
{{#withXml}}
|
||||||
<!-- XML processing: Jackson -->
|
<!-- XML processing: Jackson -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>jakarta.xml.bind</groupId>
|
||||||
|
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.fasterxml.jackson.dataformat</groupId>
|
<groupId>com.fasterxml.jackson.dataformat</groupId>
|
||||||
<artifactId>jackson-dataformat-xml</artifactId>
|
<artifactId>jackson-dataformat-xml</artifactId>
|
||||||
@@ -162,21 +143,21 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.github.joschi.jackson</groupId>
|
<groupId>com.github.joschi.jackson</groupId>
|
||||||
<artifactId>jackson-datatype-threetenbp</artifactId>
|
<artifactId>jackson-datatype-threetenbp</artifactId>
|
||||||
<version>2.8.4</version>
|
<version>2.9.10</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
{{/threetenbp}}
|
{{/threetenbp}}
|
||||||
{{#openApiNullable}}
|
{{#openApiNullable}}
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.openapitools</groupId>
|
<groupId>org.openapitools</groupId>
|
||||||
<artifactId>jackson-databind-nullable</artifactId>
|
<artifactId>jackson-databind-nullable</artifactId>
|
||||||
<version>0.2.1</version>
|
<version>0.2.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
{{/openApiNullable}}
|
{{/openApiNullable}}
|
||||||
{{#useBeanValidation}}
|
{{#useBeanValidation}}
|
||||||
<!-- Bean Validation API support -->
|
<!-- Bean Validation API support -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>jakarta.validation</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>jakarta.validation-api</artifactId>
|
<artifactId>spring-boot-starter-validation</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
{{/useBeanValidation}}
|
{{/useBeanValidation}}
|
||||||
{{#virtualService}}
|
{{#virtualService}}
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
{{#isFormParam}}{{^isFile}}{{#oas3}}@Parameter(name = "{{{baseName}}}", description = {{/oas3}}{{^oas3}}@ApiParam(value = {{/oas3}}"{{{description}}}"{{#required}}, required=true{{/required}} {{#allowableValues}}, allowableValues="{{{.}}}"{{/allowableValues}}{{^isContainer}}{{#defaultValue}}, defaultValue="{{{.}}}"{{/defaultValue}}{{/isContainer}}) @RequestParam(value="{{baseName}}"{{#required}}, required=true{{/required}}{{^required}}, required=false{{/required}}) {{{dataType}}} {{paramName}}{{/isFile}}{{#isFile}}{{#oas3}}@Parameter(name = "{{{baseName}}}", description = {{/oas3}}{{^oas3}}@ApiParam(value = {{/oas3}}"{{{description}}}") @RequestParam("{{baseName}}") {{#isArray}}List<{{/isArray}}{{#reactive}}Flux<Part>{{/reactive}}{{^reactive}}MultipartFile{{/reactive}}{{#isArray}}>{{/isArray}} {{paramName}}{{/isFile}}{{/isFormParam}}
|
{{#isFormParam}}{{^isFile}}{{>paramDoc}} @RequestParam(value="{{baseName}}"{{#required}}, required=true{{/required}}{{^required}}, required=false{{/required}}){{>dateTimeParam}} {{{dataType}}} {{paramName}}{{/isFile}}{{#isFile}}{{>paramDoc}} @RequestParam("{{baseName}}") {{#isArray}}List<{{/isArray}}{{#reactive}}Flux<Part>{{/reactive}}{{^reactive}}MultipartFile{{/reactive}}{{#isArray}}>{{/isArray}} {{paramName}}{{/isFile}}{{/isFormParam}}
|
||||||
@@ -9,7 +9,10 @@
|
|||||||
<java.version>{{#java8}}1.8{{/java8}}{{^java8}}1.7{{/java8}}</java.version>
|
<java.version>{{#java8}}1.8{{/java8}}{{^java8}}1.7{{/java8}}</java.version>
|
||||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||||
<maven.compiler.target>${java.version}</maven.compiler.target>
|
<maven.compiler.target>${java.version}</maven.compiler.target>
|
||||||
<swagger-core-version>1.5.18</swagger-core-version>
|
<swagger-core-version>{{#oas3}}2.1.11{{/oas3}}{{^oas3}}1.6.3{{/oas3}}</swagger-core-version>
|
||||||
|
{{#useSpringfox}}
|
||||||
|
<springfox.version>2.9.2</springfox.version>
|
||||||
|
{{/useSpringfox}}
|
||||||
</properties>
|
</properties>
|
||||||
{{#parentOverridden}}
|
{{#parentOverridden}}
|
||||||
<parent>
|
<parent>
|
||||||
@@ -22,7 +25,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-parent</artifactId>
|
<artifactId>spring-boot-starter-parent</artifactId>
|
||||||
<version>2.5.5</version>
|
<version>2.6.2</version>
|
||||||
</parent>
|
</parent>
|
||||||
{{/parentOverridden}}
|
{{/parentOverridden}}
|
||||||
<build>
|
<build>
|
||||||
@@ -35,7 +38,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.cloud</groupId>
|
<groupId>org.springframework.cloud</groupId>
|
||||||
<artifactId>spring-cloud-starter-parent</artifactId>
|
<artifactId>spring-cloud-starter-parent</artifactId>
|
||||||
<version>2020.0.4</version>
|
<version>2021.0.0</version>
|
||||||
<type>pom</type>
|
<type>pom</type>
|
||||||
<scope>import</scope>
|
<scope>import</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
@@ -44,27 +47,37 @@
|
|||||||
|
|
||||||
{{/parentOverridden}}
|
{{/parentOverridden}}
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
{{#useSpringfox}}
|
||||||
|
<!--SpringFox dependencies -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.springfox</groupId>
|
||||||
|
<artifactId>springfox-swagger2</artifactId>
|
||||||
|
<version>${springfox.version}</version>
|
||||||
|
</dependency>
|
||||||
|
{{/useSpringfox}}
|
||||||
|
{{^useSpringfox}}
|
||||||
{{#oas3}}
|
{{#oas3}}
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.swagger.core.v3</groupId>
|
<groupId>io.swagger.core.v3</groupId>
|
||||||
<artifactId>swagger-annotations</artifactId>
|
<artifactId>swagger-annotations</artifactId>
|
||||||
<version>2.1.2</version>
|
<version>${swagger-core-version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
{{/oas3}}
|
{{/oas3}}
|
||||||
{{^oas3}}
|
{{^oas3}}
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.swagger</groupId>
|
<groupId>io.swagger</groupId>
|
||||||
<artifactId>swagger-annotations</artifactId>
|
<artifactId>swagger-annotations</artifactId>
|
||||||
{{^parentOverridden}}
|
|
||||||
<version>${swagger-core-version}</version>
|
<version>${swagger-core-version}</version>
|
||||||
{{/parentOverridden}}
|
|
||||||
</dependency>
|
</dependency>
|
||||||
{{/oas3}}
|
{{/oas3}}
|
||||||
|
{{/useSpringfox}}
|
||||||
<!-- @Nullable annotation -->
|
<!-- @Nullable annotation -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.code.findbugs</groupId>
|
<groupId>com.google.code.findbugs</groupId>
|
||||||
<artifactId>jsr305</artifactId>
|
<artifactId>jsr305</artifactId>
|
||||||
|
{{^parentOverridden}}
|
||||||
<version>3.0.2</version>
|
<version>3.0.2</version>
|
||||||
|
{{/parentOverridden}}
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.cloud</groupId>
|
<groupId>org.springframework.cloud</groupId>
|
||||||
@@ -73,7 +86,9 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.cloud</groupId>
|
<groupId>org.springframework.cloud</groupId>
|
||||||
<artifactId>spring-cloud-starter-oauth2</artifactId>
|
<artifactId>spring-cloud-starter-oauth2</artifactId>
|
||||||
|
{{^parentOverridden}}
|
||||||
<version>2.2.5.RELEASE</version>
|
<version>2.2.5.RELEASE</version>
|
||||||
|
{{/parentOverridden}}
|
||||||
</dependency>
|
</dependency>
|
||||||
{{#withXml}}
|
{{#withXml}}
|
||||||
<!-- XML processing: Jackson -->
|
<!-- XML processing: Jackson -->
|
||||||
@@ -108,17 +123,11 @@
|
|||||||
<groupId>org.openapitools</groupId>
|
<groupId>org.openapitools</groupId>
|
||||||
<artifactId>jackson-databind-nullable</artifactId>
|
<artifactId>jackson-databind-nullable</artifactId>
|
||||||
{{^parentOverridden}}
|
{{^parentOverridden}}
|
||||||
<version>0.2.1</version>
|
<version>0.2.2</version>
|
||||||
{{/parentOverridden}}
|
{{/parentOverridden}}
|
||||||
</dependency>
|
</dependency>
|
||||||
{{/openApiNullable}}
|
{{/openApiNullable}}
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-test</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
{{#hateoas}}
|
{{#hateoas}}
|
||||||
<!-- Spring HATEOAS -->
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-hateoas</artifactId>
|
<artifactId>spring-boot-starter-hateoas</artifactId>
|
||||||
@@ -126,21 +135,18 @@
|
|||||||
{{/hateoas}}
|
{{/hateoas}}
|
||||||
{{#useBeanValidation}}
|
{{#useBeanValidation}}
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.hibernate.validator</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>hibernate-validator</artifactId>
|
<artifactId>spring-boot-starter-validation</artifactId>
|
||||||
{{^parentOverridden}}
|
|
||||||
<version>6.0.16.Final</version>
|
|
||||||
{{/parentOverridden}}
|
|
||||||
</dependency>
|
</dependency>
|
||||||
{{/useBeanValidation}}
|
{{/useBeanValidation}}
|
||||||
<dependency>
|
|
||||||
<groupId>io.springfox</groupId>
|
|
||||||
<artifactId>springfox-swagger2</artifactId>
|
|
||||||
<version>3.0.0</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.data</groupId>
|
<groupId>org.springframework.data</groupId>
|
||||||
<artifactId>spring-data-commons</artifactId>
|
<artifactId>spring-data-commons</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-test</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@@ -187,14 +187,14 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.swagger.core.v3</groupId>
|
<groupId>io.swagger.core.v3</groupId>
|
||||||
<artifactId>swagger-annotations</artifactId>
|
<artifactId>swagger-annotations</artifactId>
|
||||||
<version>2.1.2</version>
|
<version>${swagger-core-version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
{{/oas3}}
|
{{/oas3}}
|
||||||
{{^oas3}}
|
{{^oas3}}
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.swagger</groupId>
|
<groupId>io.swagger</groupId>
|
||||||
<artifactId>swagger-annotations</artifactId>
|
<artifactId>swagger-annotations</artifactId>
|
||||||
<version>1.5.14</version>
|
<version>${swagger-core-version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
{{/oas3}}
|
{{/oas3}}
|
||||||
<!-- @Nullable annotation -->
|
<!-- @Nullable annotation -->
|
||||||
@@ -294,7 +294,7 @@
|
|||||||
<slf4j-version>1.7.21</slf4j-version>
|
<slf4j-version>1.7.21</slf4j-version>
|
||||||
<junit-version>4.13.1</junit-version>
|
<junit-version>4.13.1</junit-version>
|
||||||
<servlet-api-version>4.0.4</servlet-api-version>
|
<servlet-api-version>4.0.4</servlet-api-version>
|
||||||
<springfox-version>2.8.0</springfox-version>
|
<springfox-version>2.9.2</springfox-version>
|
||||||
<jackson-version>2.9.9</jackson-version>
|
<jackson-version>2.9.9</jackson-version>
|
||||||
<jackson-threetenbp-version>2.8.4</jackson-threetenbp-version>
|
<jackson-threetenbp-version>2.8.4</jackson-threetenbp-version>
|
||||||
{{#useBeanValidation}}
|
{{#useBeanValidation}}
|
||||||
@@ -305,5 +305,6 @@
|
|||||||
<jackson-databind-nullable-version>0.2.2</jackson-databind-nullable-version>
|
<jackson-databind-nullable-version>0.2.2</jackson-databind-nullable-version>
|
||||||
{{/openApiNullable}}
|
{{/openApiNullable}}
|
||||||
<jackson-databind-version>2.9.8</jackson-databind-version>
|
<jackson-databind-version>2.9.8</jackson-databind-version>
|
||||||
|
<swagger-core-version>{{#oas3}}2.1.11{{/oas3}}{{^oas3}}1.6.3{{/oas3}}</swagger-core-version>
|
||||||
</properties>
|
</properties>
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
1
modules/openapi-generator/src/main/resources/JavaSpring/paramDoc.mustache
vendored
Normal file
1
modules/openapi-generator/src/main/resources/JavaSpring/paramDoc.mustache
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{{#oas3}}@Parameter(name = "{{{baseName}}}", description = "{{{description}}}"{{#required}}, required = true{{/required}}, schema = @Schema(description = ""{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{^isContainer}}{{#defaultValue}}, defaultValue = "{{{.}}}"{{/defaultValue}}{{/isContainer}})){{/oas3}}{{^oas3}}@ApiParam(value = "{{{description}}}"{{#required}}, required = true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{^isContainer}}{{#defaultValue}}, defaultValue = "{{{.}}}"{{/defaultValue}}{{/isContainer}}){{/oas3}}
|
||||||
@@ -1 +1 @@
|
|||||||
{{#isPathParam}}{{#useBeanValidation}}{{>beanValidationPathParams}}{{/useBeanValidation}}{{#oas3}}@Parameter(name = "{{baseName}}", description ={{/oas3}}{{^oas3}}@ApiParam(value ={{/oas3}} "{{{description}}}"{{#required}}, required = true{{/required}}{{#allowableValues}}, allowableValues = "{{#enumVars}}{{#lambdaRemoveDoubleQuote}}{{{value}}}{{/lambdaRemoveDoubleQuote}}{{^-last}}, {{/-last}}{{#-last}}{{/-last}}{{/enumVars}}"{{/allowableValues}}{{^isContainer}}{{#defaultValue}}, defaultValue = "{{{.}}}"{{/defaultValue}}{{/isContainer}}) @PathVariable("{{baseName}}") {{>optionalDataType}} {{paramName}}{{/isPathParam}}
|
{{#isPathParam}}{{#useBeanValidation}}{{>beanValidationPathParams}}{{/useBeanValidation}}{{>paramDoc}} @PathVariable("{{baseName}}"){{>dateTimeParam}} {{>optionalDataType}} {{paramName}}{{/isPathParam}}
|
||||||
@@ -1 +1 @@
|
|||||||
{{#isQueryParam}}{{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}{{#oas3}}@Parameter(name = "{{{baseName}}}", description = {{/oas3}}{{^oas3}}@ApiParam(value = {{/oas3}}"{{{description}}}"{{#required}}, required = true{{/required}}{{#allowableValues}}, {{#oas3}}schema = @Schema({{/oas3}}allowableValues = "{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{#-last}}{{/-last}}{{/values}}"{{#oas3}}){{/oas3}}{{/allowableValues}}{{^isContainer}}{{#defaultValue}}, defaultValue = "{{{.}}}"{{/defaultValue}}{{/isContainer}}){{#useBeanValidation}} @Valid{{/useBeanValidation}}{{^isModel}} @RequestParam(value = {{#isMap}}""{{/isMap}}{{^isMap}}"{{baseName}}"{{/isMap}}{{#required}}, required = true{{/required}}{{^required}}, required = false{{/required}}{{^isContainer}}{{#defaultValue}}, defaultValue = "{{{.}}}"{{/defaultValue}}{{/isContainer}}){{/isModel}}{{#isDate}} @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE){{/isDate}}{{#isDateTime}} @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE_TIME){{/isDateTime}} {{>optionalDataType}} {{paramName}}{{/isQueryParam}}
|
{{#isQueryParam}}{{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}{{>paramDoc}}{{#useBeanValidation}} @Valid{{/useBeanValidation}}{{^isModel}} @RequestParam(value = {{#isMap}}""{{/isMap}}{{^isMap}}"{{baseName}}"{{/isMap}}{{#required}}, required = true{{/required}}{{^required}}, required = false{{/required}}{{^isContainer}}{{#defaultValue}}, defaultValue = "{{{.}}}"{{/defaultValue}}{{/isContainer}}){{/isModel}}{{>dateTimeParam}} {{>optionalDataType}} {{paramName}}{{/isQueryParam}}
|
||||||
@@ -28,6 +28,11 @@ import java.util.Map;
|
|||||||
|
|
||||||
import static org.openapitools.codegen.TestUtils.assertFileContains;
|
import static org.openapitools.codegen.TestUtils.assertFileContains;
|
||||||
import static org.openapitools.codegen.TestUtils.validateJavaSourceFiles;
|
import static org.openapitools.codegen.TestUtils.validateJavaSourceFiles;
|
||||||
|
import static org.openapitools.codegen.languages.AbstractJavaCodegen.JAVA8_MODE;
|
||||||
|
import static org.openapitools.codegen.languages.AbstractJavaJAXRSServerCodegen.USE_TAGS;
|
||||||
|
import static org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen.INTERFACE_ONLY;
|
||||||
|
import static org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen.SUPPORT_ASYNC;
|
||||||
|
import static org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen.RETURN_RESPONSE;
|
||||||
import static org.testng.Assert.assertTrue;
|
import static org.testng.Assert.assertTrue;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -95,6 +100,8 @@ public class JavaJAXRSSpecServerCodegenTest extends JavaJaxrsBaseTest {
|
|||||||
codegen.additionalProperties().put(CodegenConstants.INVOKER_PACKAGE, "xyz.yyyyy.iiii.invoker");
|
codegen.additionalProperties().put(CodegenConstants.INVOKER_PACKAGE, "xyz.yyyyy.iiii.invoker");
|
||||||
codegen.additionalProperties().put("serverPort", "8088");
|
codegen.additionalProperties().put("serverPort", "8088");
|
||||||
codegen.additionalProperties().put(JavaJAXRSSpecServerCodegen.OPEN_API_SPEC_FILE_LOCATION, "openapi.yml");
|
codegen.additionalProperties().put(JavaJAXRSSpecServerCodegen.OPEN_API_SPEC_FILE_LOCATION, "openapi.yml");
|
||||||
|
codegen.additionalProperties().put(SUPPORT_ASYNC, true);
|
||||||
|
codegen.additionalProperties().put(JAVA8_MODE, false);
|
||||||
codegen.processOpts();
|
codegen.processOpts();
|
||||||
|
|
||||||
OpenAPI openAPI = new OpenAPI();
|
OpenAPI openAPI = new OpenAPI();
|
||||||
@@ -112,6 +119,8 @@ public class JavaJAXRSSpecServerCodegenTest extends JavaJaxrsBaseTest {
|
|||||||
Assert.assertEquals(codegen.additionalProperties().get(AbstractJavaJAXRSServerCodegen.SERVER_PORT), "8088");
|
Assert.assertEquals(codegen.additionalProperties().get(AbstractJavaJAXRSServerCodegen.SERVER_PORT), "8088");
|
||||||
Assert.assertEquals(codegen.getOpenApiSpecFileLocation(), "openapi.yml");
|
Assert.assertEquals(codegen.getOpenApiSpecFileLocation(), "openapi.yml");
|
||||||
Assert.assertEquals(codegen.additionalProperties().get(JavaJAXRSSpecServerCodegen.OPEN_API_SPEC_FILE_LOCATION), "openapi.yml");
|
Assert.assertEquals(codegen.additionalProperties().get(JavaJAXRSSpecServerCodegen.OPEN_API_SPEC_FILE_LOCATION), "openapi.yml");
|
||||||
|
Assert.assertEquals(codegen.additionalProperties().get(SUPPORT_ASYNC), "true");
|
||||||
|
Assert.assertEquals(codegen.additionalProperties().get(JAVA8_MODE), true); //overridden by supportAsync=true
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -419,4 +428,170 @@ public class JavaJAXRSSpecServerCodegenTest extends JavaJaxrsBaseTest {
|
|||||||
|
|
||||||
assertFileContains(path, "\nimport java.util.Set;\n");
|
assertFileContains(path, "\nimport java.util.Set;\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void generateApiWithAsyncSupport() throws Exception {
|
||||||
|
final File output = Files.createTempDirectory("test").toFile();
|
||||||
|
output.deleteOnExit();
|
||||||
|
|
||||||
|
final OpenAPI openAPI = new OpenAPIParser()
|
||||||
|
.readLocation("src/test/resources/3_0/ping.yaml", null, new ParseOptions()).getOpenAPI();
|
||||||
|
|
||||||
|
codegen.setOutputDir(output.getAbsolutePath());
|
||||||
|
codegen.additionalProperties().put(SUPPORT_ASYNC, true); //Given support async is enabled
|
||||||
|
|
||||||
|
final ClientOptInput input = new ClientOptInput()
|
||||||
|
.openAPI(openAPI)
|
||||||
|
.config(codegen); //Using JavaJAXRSSpecServerCodegen
|
||||||
|
|
||||||
|
final DefaultGenerator generator = new DefaultGenerator();
|
||||||
|
final List<File> files = generator.opts(input).generate(); //When generating files
|
||||||
|
|
||||||
|
//Then the java files are compilable
|
||||||
|
validateJavaSourceFiles(files);
|
||||||
|
|
||||||
|
//And the generated class contains CompletionStage<Response>
|
||||||
|
TestUtils.ensureContainsFile(files, output, "src/gen/java/org/openapitools/api/PingApi.java");
|
||||||
|
assertFileContains(output.toPath().resolve("src/gen/java/org/openapitools/api/PingApi.java"),
|
||||||
|
"\nimport java.util.concurrent.CompletionStage;\n",
|
||||||
|
"\nimport java.util.concurrent.CompletableFuture;\n",
|
||||||
|
"\npublic CompletionStage<Response> pingGet() {\n",
|
||||||
|
"\nCompletableFuture.supplyAsync(() -> Response.ok().entity(\"magic!\").build())\n"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void generateApiWithAsyncSupportAndInterfaceOnly() throws Exception {
|
||||||
|
final File output = Files.createTempDirectory("test").toFile().getCanonicalFile();
|
||||||
|
output.deleteOnExit();
|
||||||
|
|
||||||
|
final OpenAPI openAPI = new OpenAPIParser()
|
||||||
|
.readLocation("src/test/resources/3_0/ping.yaml", null, new ParseOptions()).getOpenAPI();
|
||||||
|
|
||||||
|
codegen.setOutputDir(output.getAbsolutePath());
|
||||||
|
codegen.additionalProperties().put(SUPPORT_ASYNC, true); //Given support async is enabled
|
||||||
|
codegen.additionalProperties().put(INTERFACE_ONLY, true); //And only interfaces are generated
|
||||||
|
|
||||||
|
final ClientOptInput input = new ClientOptInput()
|
||||||
|
.openAPI(openAPI)
|
||||||
|
.config(codegen); //Using JavaJAXRSSpecServerCodegen
|
||||||
|
|
||||||
|
final DefaultGenerator generator = new DefaultGenerator();
|
||||||
|
final List<File> files = generator.opts(input).generate(); //When generating files
|
||||||
|
|
||||||
|
//Then the java files are compilable
|
||||||
|
validateJavaSourceFiles(files);
|
||||||
|
|
||||||
|
//And the generated interface contains CompletionStage<Void>
|
||||||
|
TestUtils.ensureContainsFile(files, output, "src/gen/java/org/openapitools/api/PingApi.java");
|
||||||
|
assertFileContains(output.toPath().resolve("src/gen/java/org/openapitools/api/PingApi.java"),
|
||||||
|
"\nimport java.util.concurrent.CompletionStage;\n",
|
||||||
|
"\nCompletionStage<Void> pingGet();\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void generateApiWithAsyncSupportAndInterfaceOnlyAndResponse() throws Exception {
|
||||||
|
final File output = Files.createTempDirectory("test").toFile().getCanonicalFile();
|
||||||
|
output.deleteOnExit();
|
||||||
|
|
||||||
|
final OpenAPI openAPI = new OpenAPIParser()
|
||||||
|
.readLocation("src/test/resources/3_0/ping.yaml", null, new ParseOptions()).getOpenAPI();
|
||||||
|
|
||||||
|
codegen.setOutputDir(output.getAbsolutePath());
|
||||||
|
codegen.additionalProperties().put(SUPPORT_ASYNC, true); //Given support async is enabled
|
||||||
|
codegen.additionalProperties().put(INTERFACE_ONLY, true); //And only interfaces are generated
|
||||||
|
codegen.additionalProperties().put(RETURN_RESPONSE, true); //And return type is Response
|
||||||
|
|
||||||
|
final ClientOptInput input = new ClientOptInput()
|
||||||
|
.openAPI(openAPI)
|
||||||
|
.config(codegen); //Using JavaJAXRSSpecServerCodegen
|
||||||
|
|
||||||
|
final DefaultGenerator generator = new DefaultGenerator();
|
||||||
|
final List<File> files = generator.opts(input).generate(); //When generating files
|
||||||
|
|
||||||
|
//Then the java files are compilable
|
||||||
|
validateJavaSourceFiles(files);
|
||||||
|
|
||||||
|
//And the generated interface contains CompletionStage<Response>
|
||||||
|
TestUtils.ensureContainsFile(files, output, "src/gen/java/org/openapitools/api/PingApi.java");
|
||||||
|
assertFileContains(output.toPath().resolve( "src/gen/java/org/openapitools/api/PingApi.java"),
|
||||||
|
"\nimport java.util.concurrent.CompletionStage;\n",
|
||||||
|
"\nCompletionStage<Response> pingGet();\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void generatePetstoreAPIWithAsyncSupport() throws Exception {
|
||||||
|
final File output = Files.createTempDirectory("test").toFile().getCanonicalFile();
|
||||||
|
output.deleteOnExit();
|
||||||
|
|
||||||
|
final OpenAPI openAPI = new OpenAPIParser()
|
||||||
|
.readLocation("src/test/resources/3_0/petstore.yaml", null, new ParseOptions()).getOpenAPI();
|
||||||
|
|
||||||
|
codegen.setOutputDir(output.getAbsolutePath());
|
||||||
|
codegen.additionalProperties().put(SUPPORT_ASYNC, true); //Given support async is enabled
|
||||||
|
codegen.additionalProperties().put(INTERFACE_ONLY, true); //And only interfaces are generated
|
||||||
|
|
||||||
|
final ClientOptInput input = new ClientOptInput()
|
||||||
|
.openAPI(openAPI)
|
||||||
|
.config(codegen); //using JavaJAXRSSpecServerCodegen
|
||||||
|
|
||||||
|
final DefaultGenerator generator = new DefaultGenerator();
|
||||||
|
final List<File> files = generator.opts(input).generate(); //When generating files
|
||||||
|
|
||||||
|
//Then the java files are compilable
|
||||||
|
validateJavaSourceFiles(files);
|
||||||
|
|
||||||
|
//And the generated interfaces contains CompletionStage
|
||||||
|
TestUtils.ensureContainsFile(files, output, "src/gen/java/org/openapitools/api/PetApi.java");
|
||||||
|
assertFileContains(output.toPath().resolve("src/gen/java/org/openapitools/api/PetApi.java"),
|
||||||
|
"\nimport java.util.concurrent.CompletionStage;\n",
|
||||||
|
"CompletionStage<Void> deletePet", //Support empty response
|
||||||
|
"CompletionStage<List<Pet>> findPetsByStatus", //Support type of arrays response
|
||||||
|
"CompletionStage<Pet> getPetById" //Support single type response
|
||||||
|
);
|
||||||
|
|
||||||
|
TestUtils.ensureContainsFile(files, output, "src/gen/java/org/openapitools/api/StoreApi.java");
|
||||||
|
assertFileContains(output.toPath().resolve("src/gen/java/org/openapitools/api/StoreApi.java"),
|
||||||
|
"\nimport java.util.concurrent.CompletionStage;\n",
|
||||||
|
"CompletionStage<Map<String, Integer>>" //Support map response
|
||||||
|
);
|
||||||
|
|
||||||
|
TestUtils.ensureContainsFile(files, output, "src/gen/java/org/openapitools/api/UserApi.java");
|
||||||
|
assertFileContains(output.toPath().resolve("src/gen/java/org/openapitools/api/UserApi.java"),
|
||||||
|
"\nimport java.util.concurrent.CompletionStage;\n",
|
||||||
|
"CompletionStage<String>" //Support simple types
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void generatePingWithAsyncSupportPrimitiveType() throws Exception {
|
||||||
|
final File output = Files.createTempDirectory("test").toFile().getCanonicalFile();
|
||||||
|
output.deleteOnExit();
|
||||||
|
|
||||||
|
final OpenAPI openAPI = new OpenAPIParser()
|
||||||
|
.readLocation("src/test/resources/3_0/issue_4832.yaml", null, new ParseOptions()).getOpenAPI();
|
||||||
|
|
||||||
|
codegen.setOutputDir(output.getAbsolutePath());
|
||||||
|
codegen.additionalProperties().put(SUPPORT_ASYNC, true); //Given support async is enabled
|
||||||
|
codegen.additionalProperties().put(INTERFACE_ONLY, true); //And only interfaces are generated
|
||||||
|
codegen.additionalProperties().put(USE_TAGS, true); //And use tags to generate everything in PingApi.java
|
||||||
|
|
||||||
|
final ClientOptInput input = new ClientOptInput()
|
||||||
|
.openAPI(openAPI)
|
||||||
|
.config(codegen); //using JavaJAXRSSpecServerCodegen
|
||||||
|
|
||||||
|
final DefaultGenerator generator = new DefaultGenerator();
|
||||||
|
final List<File> files = generator.opts(input).generate(); //When generating files
|
||||||
|
|
||||||
|
//Then the java files are compilable
|
||||||
|
validateJavaSourceFiles(files);
|
||||||
|
|
||||||
|
//And the generated interfaces contains CompletionStage with proper classes instead of primitive types
|
||||||
|
TestUtils.ensureContainsFile(files, output, "src/gen/java/org/openapitools/api/PingApi.java");
|
||||||
|
TestUtils.assertFileContains(output.toPath().resolve("src/gen/java/org/openapitools/api/PingApi.java"),
|
||||||
|
"CompletionStage<Boolean> pingGetBoolean", //Support primitive types response
|
||||||
|
"CompletionStage<Integer> pingGetInteger" //Support primitive types response
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
/*
|
||||||
package org.openapitools.codegen.markdown;
|
package org.openapitools.codegen.markdown;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
@@ -51,3 +52,4 @@ public class MarkdownSampleGeneratorTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|||||||
@@ -0,0 +1,100 @@
|
|||||||
|
package org.openapitools.codegen.scala;
|
||||||
|
|
||||||
|
import com.google.common.collect.ImmutableList;
|
||||||
|
|
||||||
|
import org.openapitools.codegen.ClientOptInput;
|
||||||
|
import org.openapitools.codegen.CodegenConstants;
|
||||||
|
import org.openapitools.codegen.CodegenModel;
|
||||||
|
import org.openapitools.codegen.CodegenType;
|
||||||
|
import org.openapitools.codegen.DefaultGenerator;
|
||||||
|
import org.openapitools.codegen.TestUtils;
|
||||||
|
import org.openapitools.codegen.config.CodegenConfigurator;
|
||||||
|
import org.openapitools.codegen.languages.ScalaGatlingCodegen;
|
||||||
|
import static org.testng.Assert.assertEquals;
|
||||||
|
|
||||||
|
import org.testng.annotations.Test;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.nio.file.Files;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.models.OpenAPI;
|
||||||
|
import io.swagger.v3.oas.models.media.DateTimeSchema;
|
||||||
|
import io.swagger.v3.oas.models.media.IntegerSchema;
|
||||||
|
import io.swagger.v3.oas.models.media.Schema;
|
||||||
|
import io.swagger.v3.oas.models.media.StringSchema;
|
||||||
|
import io.swagger.v3.parser.util.SchemaTypeUtil;
|
||||||
|
|
||||||
|
public class ScalaGatlingCodegenTest {
|
||||||
|
|
||||||
|
private final ScalaGatlingCodegen codegen = new ScalaGatlingCodegen();
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void happyPath() throws IOException {
|
||||||
|
assertEquals(codegen.getName(), "scala-gatling");
|
||||||
|
assertEquals(codegen.getTag(), CodegenType.CLIENT);
|
||||||
|
|
||||||
|
final List<String> filenames = codegen.supportingFiles().stream()
|
||||||
|
.map(supportingFile -> supportingFile.getDestinationFilename())
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
assertEquals(filenames, ImmutableList.of(
|
||||||
|
"build.gradle",
|
||||||
|
"logback.xml",
|
||||||
|
"default.conf",
|
||||||
|
"CI.conf",
|
||||||
|
"CD.conf",
|
||||||
|
"stress.conf",
|
||||||
|
"baseline.conf",
|
||||||
|
"longevity.conf"));
|
||||||
|
|
||||||
|
final Schema model = new Schema()
|
||||||
|
.description("a sample model")
|
||||||
|
.addProperties("id", new IntegerSchema().format(SchemaTypeUtil.INTEGER64_FORMAT))
|
||||||
|
.addProperties("name", new StringSchema())
|
||||||
|
.addProperties("createdAt", new DateTimeSchema())
|
||||||
|
.addRequiredItem("id")
|
||||||
|
.addRequiredItem("name");
|
||||||
|
final OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", model);
|
||||||
|
|
||||||
|
codegen.setOpenAPI(openAPI);
|
||||||
|
final CodegenModel cm = codegen.fromModel("sample", model);
|
||||||
|
|
||||||
|
assertEquals(cm.name, "sample");
|
||||||
|
assertEquals(cm.classname, "Sample");
|
||||||
|
assertEquals(cm.description, "a sample model");
|
||||||
|
assertEquals(cm.vars.size(), 3);
|
||||||
|
|
||||||
|
File output = Files.createTempDirectory("test").toFile();
|
||||||
|
output.deleteOnExit();
|
||||||
|
|
||||||
|
final CodegenConfigurator configurator = new CodegenConfigurator()
|
||||||
|
.setGeneratorName(codegen.getName())
|
||||||
|
.setInputSpec("src/test/resources/3_0/scala_reserved_words.yaml")
|
||||||
|
.setOutputDir(output.getAbsolutePath().replace("\\", "/"));
|
||||||
|
|
||||||
|
final ClientOptInput clientOptInput = configurator.toClientOptInput();
|
||||||
|
DefaultGenerator generator = new DefaultGenerator();
|
||||||
|
|
||||||
|
generator.setGenerateMetadata(false);
|
||||||
|
|
||||||
|
generator.setGeneratorPropertyDefault(CodegenConstants.MODELS, "true");
|
||||||
|
generator.setGeneratorPropertyDefault(CodegenConstants.MODEL_TESTS, "false");
|
||||||
|
generator.setGeneratorPropertyDefault(CodegenConstants.MODEL_DOCS, "false");
|
||||||
|
generator.setGeneratorPropertyDefault(CodegenConstants.APIS, "false");
|
||||||
|
generator.setGeneratorPropertyDefault(CodegenConstants.SUPPORTING_FILES, "true");
|
||||||
|
|
||||||
|
List<File> files = generator.opts(clientOptInput).generate();
|
||||||
|
|
||||||
|
assertEquals(files.size(), 9);
|
||||||
|
|
||||||
|
TestUtils.ensureContainsFile(files, output, "src/gatling/scala/org/openapitools/client/model/SomeObj.scala");
|
||||||
|
TestUtils.ensureContainsFile(files, output, "build.gradle");
|
||||||
|
TestUtils.ensureContainsFile(files, output, "src/gatling/resources/conf/logback.xml");
|
||||||
|
TestUtils.ensureContainsFile(files, output, "src/gatling/resources/conf/baseline.conf");
|
||||||
|
TestUtils.ensureContainsFile(files, output, "src/gatling/resources/conf/stress.conf");
|
||||||
|
TestUtils.ensureContainsFile(files, output, "src/gatling/resources/conf/longevity.conf");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,254 @@
|
|||||||
|
swagger: '2.0'
|
||||||
|
info:
|
||||||
|
description: 'This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.'
|
||||||
|
version: 1.0.0
|
||||||
|
title: OpenAPI Petstore
|
||||||
|
license:
|
||||||
|
name: Apache-2.0
|
||||||
|
url: 'https://www.apache.org/licenses/LICENSE-2.0.html'
|
||||||
|
host: petstore.swagger.io
|
||||||
|
basePath: /v2
|
||||||
|
tags:
|
||||||
|
- name: pet
|
||||||
|
description: Everything about your Pets
|
||||||
|
- name: store
|
||||||
|
description: Access to Petstore orders
|
||||||
|
- name: user
|
||||||
|
description: Operations about user
|
||||||
|
schemes:
|
||||||
|
- http
|
||||||
|
paths:
|
||||||
|
/pet:
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- pet
|
||||||
|
summary: Add a new pet to the store
|
||||||
|
description: ''
|
||||||
|
operationId: addPet
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
- application/xml
|
||||||
|
produces:
|
||||||
|
- application/xml
|
||||||
|
- application/json
|
||||||
|
parameters:
|
||||||
|
- in: body
|
||||||
|
name: body
|
||||||
|
description: Pet object that needs to be added to the store
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/Pet'
|
||||||
|
responses:
|
||||||
|
'405':
|
||||||
|
description: Invalid input
|
||||||
|
security:
|
||||||
|
- petstore_token: [base]
|
||||||
|
put:
|
||||||
|
tags:
|
||||||
|
- pet
|
||||||
|
summary: Update an existing pet
|
||||||
|
description: ''
|
||||||
|
operationId: updatePet
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
- application/xml
|
||||||
|
produces:
|
||||||
|
- application/xml
|
||||||
|
- application/json
|
||||||
|
parameters:
|
||||||
|
- in: body
|
||||||
|
name: body
|
||||||
|
description: Pet object that needs to be added to the store
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/Pet'
|
||||||
|
responses:
|
||||||
|
'400':
|
||||||
|
description: Invalid ID supplied
|
||||||
|
'404':
|
||||||
|
description: Pet not found
|
||||||
|
'405':
|
||||||
|
description: Validation exception
|
||||||
|
security:
|
||||||
|
- petstore_auth:
|
||||||
|
- 'write:pets'
|
||||||
|
- 'read:pets'
|
||||||
|
/pet/findByStatus:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- pet
|
||||||
|
summary: Finds Pets by status
|
||||||
|
description: Multiple status values can be provided with comma separated strings
|
||||||
|
operationId: findPetsByStatus
|
||||||
|
produces:
|
||||||
|
- application/xml
|
||||||
|
- application/json
|
||||||
|
parameters:
|
||||||
|
- name: status
|
||||||
|
in: query
|
||||||
|
description: Status values that need to be considered for filter
|
||||||
|
required: true
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
enum:
|
||||||
|
- available
|
||||||
|
- pending
|
||||||
|
- sold
|
||||||
|
default: available
|
||||||
|
collectionFormat: csv
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: successful operation
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/definitions/Pet'
|
||||||
|
'400':
|
||||||
|
description: Invalid status value
|
||||||
|
securityDefinitions:
|
||||||
|
petstore_token:
|
||||||
|
type: oauth2
|
||||||
|
description: security definition for using keycloak authentification with control site.
|
||||||
|
authorizationUrl: https://keycloak-dev.business.stingray.com/auth/realms/CSLocal/protocol/openid-connect/auth
|
||||||
|
tokenUrl: https://keycloak-dev.business.stingray.com/auth/realms/CSLocal/protocol/openid-connect/token
|
||||||
|
x-jwksUrl: https://keycloak-dev.business.stingray.com/auth/realms/CSLocal/protocol/openid-connect/certs
|
||||||
|
x-tokenIntrospectUrl: https://keycloak-dev.business.stingray.com/auth/realms/CSLocal/protocol/openid-connect/token/introspect
|
||||||
|
flow: accessCode
|
||||||
|
scopes:
|
||||||
|
base: not sure if we will be using scopes, at least in the beginning, but since we need to specify one....
|
||||||
|
api_key:
|
||||||
|
type: apiKey
|
||||||
|
name: api_key
|
||||||
|
in: header
|
||||||
|
definitions:
|
||||||
|
Order:
|
||||||
|
title: Pet Order
|
||||||
|
description: An order for a pets from the pet store
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: integer
|
||||||
|
format: int64
|
||||||
|
petId:
|
||||||
|
type: integer
|
||||||
|
format: int64
|
||||||
|
quantity:
|
||||||
|
type: integer
|
||||||
|
format: int32
|
||||||
|
shipDate:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
status:
|
||||||
|
type: string
|
||||||
|
description: Order Status
|
||||||
|
enum:
|
||||||
|
- placed
|
||||||
|
- approved
|
||||||
|
- delivered
|
||||||
|
complete:
|
||||||
|
type: boolean
|
||||||
|
default: false
|
||||||
|
xml:
|
||||||
|
name: Order
|
||||||
|
Category:
|
||||||
|
title: Pet category
|
||||||
|
description: A category for a pet
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: integer
|
||||||
|
format: int64
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
xml:
|
||||||
|
name: Category
|
||||||
|
User:
|
||||||
|
title: a User
|
||||||
|
description: A User who is purchasing from the pet store
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: integer
|
||||||
|
format: int64
|
||||||
|
username:
|
||||||
|
type: string
|
||||||
|
firstName:
|
||||||
|
type: string
|
||||||
|
lastName:
|
||||||
|
type: string
|
||||||
|
email:
|
||||||
|
type: string
|
||||||
|
password:
|
||||||
|
type: string
|
||||||
|
phone:
|
||||||
|
type: string
|
||||||
|
userStatus:
|
||||||
|
type: integer
|
||||||
|
format: int32
|
||||||
|
description: User Status
|
||||||
|
xml:
|
||||||
|
name: User
|
||||||
|
Tag:
|
||||||
|
title: Pet Tag
|
||||||
|
description: A tag for a pet
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: integer
|
||||||
|
format: int64
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
xml:
|
||||||
|
name: Tag
|
||||||
|
Pet:
|
||||||
|
title: a Pet
|
||||||
|
description: A pet for sale in the pet store
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- name
|
||||||
|
- photoUrls
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: integer
|
||||||
|
format: int64
|
||||||
|
category:
|
||||||
|
$ref: '#/definitions/Category'
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
example: doggie
|
||||||
|
photoUrls:
|
||||||
|
type: array
|
||||||
|
xml:
|
||||||
|
name: photoUrl
|
||||||
|
wrapped: true
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
tags:
|
||||||
|
type: array
|
||||||
|
xml:
|
||||||
|
name: tag
|
||||||
|
wrapped: true
|
||||||
|
items:
|
||||||
|
$ref: '#/definitions/Tag'
|
||||||
|
status:
|
||||||
|
type: string
|
||||||
|
description: pet status in the store
|
||||||
|
enum:
|
||||||
|
- available
|
||||||
|
- pending
|
||||||
|
- sold
|
||||||
|
xml:
|
||||||
|
name: Pet
|
||||||
|
ApiResponse:
|
||||||
|
title: An uploaded response
|
||||||
|
description: Describes the result of uploading an image resource
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
code:
|
||||||
|
type: integer
|
||||||
|
format: int32
|
||||||
|
type:
|
||||||
|
type: string
|
||||||
|
message:
|
||||||
|
type: string
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
openapi: 3.0.1
|
||||||
|
info:
|
||||||
|
title: ping that return primitive types
|
||||||
|
version: '1.0'
|
||||||
|
servers:
|
||||||
|
- url: 'http://localhost:8082/'
|
||||||
|
paths:
|
||||||
|
/pingBoolean:
|
||||||
|
get:
|
||||||
|
operationId: pingGetBoolean
|
||||||
|
tags: [Ping]
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
'application/json':
|
||||||
|
schema:
|
||||||
|
type: boolean
|
||||||
|
/pingInteger:
|
||||||
|
get:
|
||||||
|
operationId: pingGetInteger
|
||||||
|
tags: [Ping]
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
'application/json':
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
format: int32
|
||||||
|
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
openapi: 3.0.3
|
||||||
|
info:
|
||||||
|
title: Api Documentation
|
||||||
|
description: 'Demo Spring Mvc @DateTimeFormat across the different openapi parameter types'
|
||||||
|
version: '1.0'
|
||||||
|
paths:
|
||||||
|
/thingy/{date}:
|
||||||
|
post:
|
||||||
|
description: 'update with form data'
|
||||||
|
operationId: updatePetWithForm
|
||||||
|
parameters:
|
||||||
|
- name: date
|
||||||
|
in: path
|
||||||
|
description: 'A date path parameter'
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
format: date
|
||||||
|
example: '2021-01-01'
|
||||||
|
responses:
|
||||||
|
'405':
|
||||||
|
description: Invalid input
|
||||||
|
requestBody:
|
||||||
|
content:
|
||||||
|
application/x-www-form-urlencoded:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
visitDate:
|
||||||
|
description: Updated last vist timestamp
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
get:
|
||||||
|
operationId: get
|
||||||
|
parameters:
|
||||||
|
- name: date
|
||||||
|
in: path
|
||||||
|
description: 'A date path parameter'
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
format: date
|
||||||
|
example: '2021-01-01'
|
||||||
|
- name: dateTime
|
||||||
|
description: 'A date-time query parameter'
|
||||||
|
in: query
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
example: '1996-12-19T16:39:57-08:00'
|
||||||
|
- name: X-Order-Date
|
||||||
|
in: header
|
||||||
|
description: 'A date header parameter'
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
format: date
|
||||||
|
example: '2021-01-01'
|
||||||
|
- name: loginDate
|
||||||
|
in: cookie
|
||||||
|
description: 'A date cookie parameter'
|
||||||
|
required: false
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
format: date
|
||||||
|
example: '2021-01-01'
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
46
pom.xml
46
pom.xml
@@ -3,6 +3,7 @@
|
|||||||
<groupId>org.sonatype.oss</groupId>
|
<groupId>org.sonatype.oss</groupId>
|
||||||
<artifactId>oss-parent</artifactId>
|
<artifactId>oss-parent</artifactId>
|
||||||
<version>5</version>
|
<version>5</version>
|
||||||
|
<relativePath/><!-- lookup parent from repository -->
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>org.openapitools</groupId>
|
<groupId>org.openapitools</groupId>
|
||||||
@@ -1208,15 +1209,21 @@
|
|||||||
<module>samples/server/petstore/jaxrs-resteasy/joda</module>
|
<module>samples/server/petstore/jaxrs-resteasy/joda</module>
|
||||||
<module>samples/server/petstore/jaxrs-resteasy/default-value</module>
|
<module>samples/server/petstore/jaxrs-resteasy/default-value</module>
|
||||||
<!--<module>samples/server/petstore/kotlin-server/ktor</module>-->
|
<!--<module>samples/server/petstore/kotlin-server/ktor</module>-->
|
||||||
<!-- move to other CI as the following fails often in CircleCI
|
|
||||||
<module>samples/server/petstore/spring-mvc</module>
|
|
||||||
<module>samples/server/petstore/spring-mvc-j8-async</module>
|
|
||||||
<module>samples/server/petstore/spring-mvc-j8-localdatetime</module>-->
|
|
||||||
<module>samples/client/petstore/spring-cloud</module>
|
<module>samples/client/petstore/spring-cloud</module>
|
||||||
|
<module>samples/openapi3/client/petstore/spring-cloud</module>
|
||||||
|
<module>samples/client/petstore/spring-cloud-date-time</module>
|
||||||
|
<module>samples/openapi3/client/petstore/spring-cloud-date-time</module>
|
||||||
<module>samples/server/petstore/springboot</module>
|
<module>samples/server/petstore/springboot</module>
|
||||||
|
<module>samples/openapi3/server/petstore/springboot</module>
|
||||||
<module>samples/server/petstore/springboot-beanvalidation</module>
|
<module>samples/server/petstore/springboot-beanvalidation</module>
|
||||||
<module>samples/server/petstore/springboot-useoptional</module>
|
<module>samples/server/petstore/springboot-useoptional</module>
|
||||||
|
<module>samples/openapi3/server/petstore/springboot-useoptional</module>
|
||||||
<module>samples/server/petstore/springboot-reactive</module>
|
<module>samples/server/petstore/springboot-reactive</module>
|
||||||
|
<module>samples/openapi3/server/petstore/springboot-reactive</module>
|
||||||
|
<module>samples/server/petstore/springboot-implicitHeaders</module>
|
||||||
|
<module>samples/openapi3/server/petstore/springboot-implicitHeaders</module>
|
||||||
|
<module>samples/server/petstore/springboot-delegate</module>
|
||||||
|
<module>samples/openapi3/server/petstore/springboot-delegate</module>
|
||||||
<module>samples/server/petstore/jaxrs-cxf</module>
|
<module>samples/server/petstore/jaxrs-cxf</module>
|
||||||
<module>samples/server/petstore/jaxrs-cxf-annotated-base-path</module>
|
<module>samples/server/petstore/jaxrs-cxf-annotated-base-path</module>
|
||||||
<module>samples/server/petstore/jaxrs-cxf-cdi</module>
|
<module>samples/server/petstore/jaxrs-cxf-cdi</module>
|
||||||
@@ -1230,6 +1237,37 @@
|
|||||||
<module>samples/server/petstore/scala-finch</module>
|
<module>samples/server/petstore/scala-finch</module>
|
||||||
</modules>
|
</modules>
|
||||||
</profile>
|
</profile>
|
||||||
|
<profile>
|
||||||
|
<id>samples.circleci.spring</id>
|
||||||
|
<activation>
|
||||||
|
<property>
|
||||||
|
<name>env</name>
|
||||||
|
<value>samples.circleci.spring</value>
|
||||||
|
</property>
|
||||||
|
</activation>
|
||||||
|
<modules>
|
||||||
|
<module>samples/server/petstore/spring-mvc</module>
|
||||||
|
<module>samples/server/petstore/spring-mvc-default-value</module>
|
||||||
|
<module>samples/server/petstore/spring-mvc-j8-async</module>
|
||||||
|
<module>samples/server/petstore/spring-mvc-j8-localdatetime</module>
|
||||||
|
<!-- servers -->
|
||||||
|
<module>samples/client/petstore/spring-cloud</module>
|
||||||
|
<module>samples/openapi3/client/petstore/spring-cloud</module>
|
||||||
|
<module>samples/client/petstore/spring-cloud-date-time</module>
|
||||||
|
<module>samples/openapi3/client/petstore/spring-cloud-date-time</module>
|
||||||
|
<module>samples/server/petstore/springboot</module>
|
||||||
|
<module>samples/openapi3/server/petstore/springboot</module>
|
||||||
|
<module>samples/server/petstore/springboot-beanvalidation</module>
|
||||||
|
<module>samples/server/petstore/springboot-useoptional</module>
|
||||||
|
<module>samples/openapi3/server/petstore/springboot-useoptional</module>
|
||||||
|
<module>samples/server/petstore/springboot-reactive</module>
|
||||||
|
<module>samples/openapi3/server/petstore/springboot-reactive</module>
|
||||||
|
<module>samples/server/petstore/springboot-implicitHeaders</module>
|
||||||
|
<module>samples/openapi3/server/petstore/springboot-implicitHeaders</module>
|
||||||
|
<module>samples/server/petstore/springboot-delegate</module>
|
||||||
|
<module>samples/openapi3/server/petstore/springboot-delegate</module>
|
||||||
|
</modules>
|
||||||
|
</profile>
|
||||||
<!-- node 3 tests in CircleCI -->
|
<!-- node 3 tests in CircleCI -->
|
||||||
<profile>
|
<profile>
|
||||||
<id>samples.circleci.node3</id>
|
<id>samples.circleci.node3</id>
|
||||||
|
|||||||
@@ -52,10 +52,6 @@ public class Pair {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (arg.trim().isEmpty()) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ public class PingApi {
|
|||||||
"application/json"
|
"application/json"
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -52,10 +52,6 @@ public class Pair {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (arg.trim().isEmpty()) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,10 +52,6 @@ public class Pair {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (arg.trim().isEmpty()) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,10 +52,6 @@ public class Pair {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (arg.trim().isEmpty()) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,10 +52,6 @@ public class Pair {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (arg.trim().isEmpty()) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,10 +52,6 @@ public class Pair {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (arg.trim().isEmpty()) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,10 +52,6 @@ public class Pair {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (arg.trim().isEmpty()) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,10 +52,6 @@ public class Pair {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (arg.trim().isEmpty()) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ public class AnotherFakeApi {
|
|||||||
"application/json"
|
"application/json"
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ public class FakeApi {
|
|||||||
"application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16"
|
"application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16"
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -272,7 +272,7 @@ public class FakeApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -402,7 +402,7 @@ public class FakeApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -532,7 +532,7 @@ public class FakeApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -662,7 +662,7 @@ public class FakeApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -792,7 +792,7 @@ public class FakeApi {
|
|||||||
"application/json"
|
"application/json"
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -925,7 +925,7 @@ public class FakeApi {
|
|||||||
"application/json"
|
"application/json"
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1064,7 +1064,7 @@ public class FakeApi {
|
|||||||
"application/json"
|
"application/json"
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1269,7 +1269,7 @@ public class FakeApi {
|
|||||||
"application/x-www-form-urlencoded"
|
"application/x-www-form-urlencoded"
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1479,7 +1479,7 @@ public class FakeApi {
|
|||||||
"application/x-www-form-urlencoded"
|
"application/x-www-form-urlencoded"
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1623,7 +1623,7 @@ public class FakeApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1844,7 +1844,7 @@ public class FakeApi {
|
|||||||
"application/json"
|
"application/json"
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1984,7 +1984,7 @@ public class FakeApi {
|
|||||||
"application/x-www-form-urlencoded"
|
"application/x-www-form-urlencoded"
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2132,7 +2132,7 @@ public class FakeApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ public class FakeClassnameTags123Api {
|
|||||||
"application/json"
|
"application/json"
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ public class PetApi {
|
|||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -275,7 +275,7 @@ public class PetApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -414,7 +414,7 @@ public class PetApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -556,7 +556,7 @@ public class PetApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -704,7 +704,7 @@ public class PetApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -848,7 +848,7 @@ public class PetApi {
|
|||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -999,7 +999,7 @@ public class PetApi {
|
|||||||
"application/x-www-form-urlencoded"
|
"application/x-www-form-urlencoded"
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1147,7 +1147,7 @@ public class PetApi {
|
|||||||
"multipart/form-data"
|
"multipart/form-data"
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1299,7 +1299,7 @@ public class PetApi {
|
|||||||
"multipart/form-data"
|
"multipart/form-data"
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ public class StoreApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -268,7 +268,7 @@ public class StoreApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -398,7 +398,7 @@ public class StoreApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -540,7 +540,7 @@ public class StoreApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ public class UserApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -265,7 +265,7 @@ public class UserApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -396,7 +396,7 @@ public class UserApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -529,7 +529,7 @@ public class UserApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -666,7 +666,7 @@ public class UserApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -811,7 +811,7 @@ public class UserApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -956,7 +956,7 @@ public class UserApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1082,7 +1082,7 @@ public class UserApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -52,10 +52,6 @@ public class Pair {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (arg.trim().isEmpty()) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ public class AnotherFakeApi {
|
|||||||
"application/json"
|
"application/json"
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ public class DefaultApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ public class FakeApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -209,7 +209,7 @@ public class FakeApi {
|
|||||||
"application/json"
|
"application/json"
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -323,7 +323,7 @@ public class FakeApi {
|
|||||||
"application/json"
|
"application/json"
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -437,7 +437,7 @@ public class FakeApi {
|
|||||||
"application/json"
|
"application/json"
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -551,7 +551,7 @@ public class FakeApi {
|
|||||||
"application/json"
|
"application/json"
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -664,7 +664,7 @@ public class FakeApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -780,7 +780,7 @@ public class FakeApi {
|
|||||||
"application/json"
|
"application/json"
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -897,7 +897,7 @@ public class FakeApi {
|
|||||||
"application/json"
|
"application/json"
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1086,7 +1086,7 @@ public class FakeApi {
|
|||||||
"application/x-www-form-urlencoded"
|
"application/x-www-form-urlencoded"
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1292,7 +1292,7 @@ public class FakeApi {
|
|||||||
"application/x-www-form-urlencoded"
|
"application/x-www-form-urlencoded"
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1432,7 +1432,7 @@ public class FakeApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1631,7 +1631,7 @@ public class FakeApi {
|
|||||||
"application/json"
|
"application/json"
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1749,7 +1749,7 @@ public class FakeApi {
|
|||||||
"application/x-www-form-urlencoded"
|
"application/x-www-form-urlencoded"
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1890,7 +1890,7 @@ public class FakeApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ public class FakeClassnameTags123Api {
|
|||||||
"application/json"
|
"application/json"
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ public class PetApi {
|
|||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -208,7 +208,7 @@ public class PetApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -325,7 +325,7 @@ public class PetApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -454,7 +454,7 @@ public class PetApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -586,7 +586,7 @@ public class PetApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -713,7 +713,7 @@ public class PetApi {
|
|||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -839,7 +839,7 @@ public class PetApi {
|
|||||||
"application/x-www-form-urlencoded"
|
"application/x-www-form-urlencoded"
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -965,7 +965,7 @@ public class PetApi {
|
|||||||
"multipart/form-data"
|
"multipart/form-data"
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1101,7 +1101,7 @@ public class PetApi {
|
|||||||
"multipart/form-data"
|
"multipart/form-data"
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ public class StoreApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -204,7 +204,7 @@ public class StoreApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -318,7 +318,7 @@ public class StoreApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -444,7 +444,7 @@ public class StoreApi {
|
|||||||
"application/json"
|
"application/json"
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ public class UserApi {
|
|||||||
"application/json"
|
"application/json"
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -201,7 +201,7 @@ public class UserApi {
|
|||||||
"application/json"
|
"application/json"
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -310,7 +310,7 @@ public class UserApi {
|
|||||||
"application/json"
|
"application/json"
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -421,7 +421,7 @@ public class UserApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -536,7 +536,7 @@ public class UserApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -671,7 +671,7 @@ public class UserApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -800,7 +800,7 @@ public class UserApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -904,7 +904,7 @@ public class UserApi {
|
|||||||
"application/json"
|
"application/json"
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -52,10 +52,6 @@ public class Pair {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (arg.trim().isEmpty()) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ public class AnotherFakeApi {
|
|||||||
"application/json"
|
"application/json"
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ public class FakeApi {
|
|||||||
"application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16"
|
"application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16"
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -253,7 +253,7 @@ public class FakeApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -375,7 +375,7 @@ public class FakeApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -497,7 +497,7 @@ public class FakeApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -619,7 +619,7 @@ public class FakeApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -741,7 +741,7 @@ public class FakeApi {
|
|||||||
"application/json"
|
"application/json"
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -869,7 +869,7 @@ public class FakeApi {
|
|||||||
"application/json"
|
"application/json"
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1000,7 +1000,7 @@ public class FakeApi {
|
|||||||
"application/json"
|
"application/json"
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1197,7 +1197,7 @@ public class FakeApi {
|
|||||||
"application/x-www-form-urlencoded"
|
"application/x-www-form-urlencoded"
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1417,7 +1417,7 @@ public class FakeApi {
|
|||||||
"application/x-www-form-urlencoded"
|
"application/x-www-form-urlencoded"
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1571,7 +1571,7 @@ public class FakeApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1784,7 +1784,7 @@ public class FakeApi {
|
|||||||
"application/json"
|
"application/json"
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1916,7 +1916,7 @@ public class FakeApi {
|
|||||||
"application/x-www-form-urlencoded"
|
"application/x-www-form-urlencoded"
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2071,7 +2071,7 @@ public class FakeApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ public class FakeClassnameTags123Api {
|
|||||||
"application/json"
|
"application/json"
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ public class PetApi {
|
|||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -259,7 +259,7 @@ public class PetApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -393,7 +393,7 @@ public class PetApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -530,7 +530,7 @@ public class PetApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -670,7 +670,7 @@ public class PetApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -806,7 +806,7 @@ public class PetApi {
|
|||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -949,7 +949,7 @@ public class PetApi {
|
|||||||
"application/x-www-form-urlencoded"
|
"application/x-www-form-urlencoded"
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1089,7 +1089,7 @@ public class PetApi {
|
|||||||
"multipart/form-data"
|
"multipart/form-data"
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1233,7 +1233,7 @@ public class PetApi {
|
|||||||
"multipart/form-data"
|
"multipart/form-data"
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ public class StoreApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -249,7 +249,7 @@ public class StoreApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -371,7 +371,7 @@ public class StoreApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -505,7 +505,7 @@ public class StoreApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ public class UserApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -246,7 +246,7 @@ public class UserApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -369,7 +369,7 @@ public class UserApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -494,7 +494,7 @@ public class UserApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -623,7 +623,7 @@ public class UserApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -766,7 +766,7 @@ public class UserApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -903,7 +903,7 @@ public class UserApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1021,7 +1021,7 @@ public class UserApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -52,10 +52,6 @@ public class Pair {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (arg.trim().isEmpty()) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ public class AnotherFakeApi {
|
|||||||
"application/json"
|
"application/json"
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ public class FakeApi {
|
|||||||
"application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16"
|
"application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16"
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -253,7 +253,7 @@ public class FakeApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -375,7 +375,7 @@ public class FakeApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -497,7 +497,7 @@ public class FakeApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -619,7 +619,7 @@ public class FakeApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -741,7 +741,7 @@ public class FakeApi {
|
|||||||
"application/json"
|
"application/json"
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -869,7 +869,7 @@ public class FakeApi {
|
|||||||
"application/json"
|
"application/json"
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1000,7 +1000,7 @@ public class FakeApi {
|
|||||||
"application/json"
|
"application/json"
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1197,7 +1197,7 @@ public class FakeApi {
|
|||||||
"application/x-www-form-urlencoded"
|
"application/x-www-form-urlencoded"
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1417,7 +1417,7 @@ public class FakeApi {
|
|||||||
"application/x-www-form-urlencoded"
|
"application/x-www-form-urlencoded"
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1571,7 +1571,7 @@ public class FakeApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1784,7 +1784,7 @@ public class FakeApi {
|
|||||||
"application/json"
|
"application/json"
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1916,7 +1916,7 @@ public class FakeApi {
|
|||||||
"application/x-www-form-urlencoded"
|
"application/x-www-form-urlencoded"
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2071,7 +2071,7 @@ public class FakeApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ public class FakeClassnameTags123Api {
|
|||||||
"application/json"
|
"application/json"
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ public class PetApi {
|
|||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -259,7 +259,7 @@ public class PetApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -393,7 +393,7 @@ public class PetApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -530,7 +530,7 @@ public class PetApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -670,7 +670,7 @@ public class PetApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -806,7 +806,7 @@ public class PetApi {
|
|||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -949,7 +949,7 @@ public class PetApi {
|
|||||||
"application/x-www-form-urlencoded"
|
"application/x-www-form-urlencoded"
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1089,7 +1089,7 @@ public class PetApi {
|
|||||||
"multipart/form-data"
|
"multipart/form-data"
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1233,7 +1233,7 @@ public class PetApi {
|
|||||||
"multipart/form-data"
|
"multipart/form-data"
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ public class StoreApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -249,7 +249,7 @@ public class StoreApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -371,7 +371,7 @@ public class StoreApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -505,7 +505,7 @@ public class StoreApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ public class UserApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -246,7 +246,7 @@ public class UserApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -369,7 +369,7 @@ public class UserApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -494,7 +494,7 @@ public class UserApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -623,7 +623,7 @@ public class UserApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -766,7 +766,7 @@ public class UserApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -903,7 +903,7 @@ public class UserApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1021,7 +1021,7 @@ public class UserApi {
|
|||||||
|
|
||||||
};
|
};
|
||||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
if (localVarHeaderParams != null) {
|
if (localVarHeaderParams != null && localVarContentTypes != null) {
|
||||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -52,10 +52,6 @@ public class Pair {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (arg.trim().isEmpty()) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,10 +52,6 @@ public class Pair {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (arg.trim().isEmpty()) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user