Skip to content

Commit

Permalink
Merge branch 'master' into issues/534
Browse files Browse the repository at this point in the history
  • Loading branch information
frantuma committed Dec 12, 2019
2 parents c54805c + a12d675 commit b81b5b2
Show file tree
Hide file tree
Showing 73 changed files with 2,568 additions and 110 deletions.
8 changes: 0 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,6 @@
# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

Expand Down
10 changes: 5 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<groupId>io.swagger.codegen.v3</groupId>
<artifactId>swagger-codegen-generators</artifactId>
<version>1.0.14-SNAPSHOT</version>
<version>1.0.15-SNAPSHOT</version>
<packaging>jar</packaging>

<build>
Expand Down Expand Up @@ -246,10 +246,10 @@
</dependency>
</dependencies>
<properties>
<swagger-codegen-version>3.0.14-SNAPSHOT</swagger-codegen-version>
<swagger-parser-version>2.0.16-SNAPSHOT</swagger-parser-version>
<swagger-core-version>2.0.10</swagger-core-version>
<jackson-version>2.9.10</jackson-version>
<swagger-codegen-version>3.0.15-SNAPSHOT</swagger-codegen-version>
<swagger-parser-version>2.0.17-SNAPSHOT</swagger-parser-version>
<swagger-core-version>2.1.1-SNAPSHOT</swagger-core-version>
<jackson-version>2.10.1</jackson-version>
<scala-version>2.11.1</scala-version>
<felix-version>3.3.0</felix-version>
<commons-io-version>2.4</commons-io-version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1324,7 +1324,7 @@ else if (schema instanceof ComposedSchema) {
if(composed.getAllOf() != null) {
for (Schema innerModel : composed.getAllOf()) {
if (codegenModel.discriminator == null) {
codegenModel.discriminator = schema
codegenModel.discriminator = innerModel
.getDiscriminator();
}
if (innerModel.getXml() != null) {
Expand Down Expand Up @@ -1387,9 +1387,11 @@ else if (schema instanceof ComposedSchema) {
}
}
if (oneOf != null && !oneOf.isEmpty()) {
codegenModel.dataType = getSchemaType(composed);
this.schemaHandler.configureOneOfModel(codegenModel, oneOf);
}
if (anyOf != null && !anyOf.isEmpty()) {
codegenModel.dataType = getSchemaType(composed);
this.schemaHandler.configureAnyOfModel(codegenModel, anyOf);
}
if (parent != null) {
Expand Down Expand Up @@ -2223,7 +2225,7 @@ public int compare(CodegenParameter one, CodegenParameter another) {
codegenOperation.pathParams = addHasMore(pathParams);
codegenOperation.queryParams = addHasMore(queryParams);
codegenOperation.headerParams = addHasMore(headerParams);
// op.cookieParams = cookieParams;
codegenOperation.cookieParams = addHasMore(cookieParams);
codegenOperation.formParams = addHasMore(formParams);
codegenOperation.requiredParams = addHasMore(requiredParams);
codegenOperation.externalDocs = operation.getExternalDocs();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import io.swagger.codegen.v3.CodegenProperty;
import io.swagger.codegen.v3.generators.util.OpenAPIUtil;
import io.swagger.v3.oas.models.media.ComposedSchema;
import io.swagger.v3.oas.models.media.ObjectSchema;
import io.swagger.v3.oas.models.media.Schema;
import org.apache.commons.lang3.StringUtils;

Expand All @@ -15,7 +14,7 @@

public class SchemaHandler {

private DefaultCodegenConfig codegenConfig;
protected DefaultCodegenConfig codegenConfig;

public SchemaHandler(DefaultCodegenConfig codegenConfig) {
this.codegenConfig = codegenConfig;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ public void processOpts() {
@Override
public void preprocessOpenAPI(OpenAPI openAPI) {
//this.openAPIUtil = new OpenAPIUtil(openAPI);
this.openAPI = openAPI;
if (!this.additionalProperties.containsKey("serverPort")) {
final URL urlInfo = URLPathUtil.getServerURL(openAPI);
String port = "8080"; // Default value for a JEE Server
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ public JavaClientCodegen() {
cliOptions.add(CliOption.newBoolean(USE_GZIP_FEATURE, "Send gzip-encoded requests"));
cliOptions.add(CliOption.newBoolean(USE_RUNTIME_EXCEPTION, "Use RuntimeException instead of Exception"));

supportedLibraries.put("jersey1", "HTTP client: Jersey client 1.19.4. JSON processing: Jackson 2.9.10. Enable Java6 support using '-DsupportJava6=true'. Enable gzip request encoding using '-DuseGzipFeature=true'.");
supportedLibraries.put("feign", "HTTP client: OpenFeign 9.4.0. JSON processing: Jackson 2.9.10");
supportedLibraries.put("jersey2", "HTTP client: Jersey client 2.25.1. JSON processing: Jackson 2.9.10");
supportedLibraries.put("jersey1", "HTTP client: Jersey client 1.19.4. JSON processing: Jackson 2.10.1. Enable Java6 support using '-DsupportJava6=true'. Enable gzip request encoding using '-DuseGzipFeature=true'.");
supportedLibraries.put("feign", "HTTP client: OpenFeign 9.4.0. JSON processing: Jackson 2.10.1");
supportedLibraries.put("jersey2", "HTTP client: Jersey client 2.26. JSON processing: Jackson 2.10.1");
supportedLibraries.put("okhttp-gson", "HTTP client: OkHttp 2.7.5. JSON processing: Gson 2.8.1. Enable Parcelable models on Android using '-DparcelableModel=true'. Enable gzip request encoding using '-DuseGzipFeature=true'.");
supportedLibraries.put(RETROFIT_1, "HTTP client: OkHttp 2.7.5. JSON processing: Gson 2.3.1 (Retrofit 1.9.0). IMPORTANT NOTE: retrofit1.x is no longer actively maintained so please upgrade to 'retrofit2' instead.");
supportedLibraries.put(RETROFIT_2, "HTTP client: OkHttp 3.8.0. JSON processing: Gson 2.6.1 (Retrofit 2.3.0). Enable the RxJava adapter using '-DuseRxJava[2]=true'. (RxJava 1.x or 2.x)");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public void setOutputFile(String outputFile) {

@Override
public void preprocessOpenAPI(OpenAPI openAPI) {
super.preprocessOpenAPI(openAPI);
this.openAPI = openAPI;
try {
final String outputString;
if (flattenSpec) {
Expand Down
Loading

0 comments on commit b81b5b2

Please sign in to comment.