Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,10 @@ public String toVarName(String name) {
// sanitize name
name = sanitizeName(name); // FIXME: a parameter should not be assigned. Also declare the methods parameters as 'final'.

if ("class".equals(name.toLowerCase())) {
return "PropertyClass";
}

if("_".equals(name)) {
name = "_u";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -834,6 +834,8 @@ definitions:
name:
type: integer
format: int32
class:
type: string
xml:
name: Name
Dog:
Expand Down
6 changes: 6 additions & 0 deletions samples/client/petstore/java/default/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,9 @@

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

# build files
**/target
target
.gradle
build
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# Thsi matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux

# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **Integer** | | [optional]
**PropertyClass** | **String** | | [optional]



1 change: 0 additions & 1 deletion samples/client/petstore/java/default/hello.txt

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
public class Model200Response {

private Integer name = null;
private String PropertyClass = null;


/**
Expand All @@ -34,6 +35,23 @@ public void setName(Integer name) {
}


/**
**/
public Model200Response PropertyClass(String PropertyClass) {
this.PropertyClass = PropertyClass;
return this;
}

@ApiModelProperty(example = "null", value = "")
@JsonProperty("class")
public String getPropertyClass() {
return PropertyClass;
}
public void setPropertyClass(String PropertyClass) {
this.PropertyClass = PropertyClass;
}


@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
Expand All @@ -43,12 +61,13 @@ public boolean equals(java.lang.Object o) {
return false;
}
Model200Response _200Response = (Model200Response) o;
return Objects.equals(this.name, _200Response.name);
return Objects.equals(this.name, _200Response.name) &&
Objects.equals(this.PropertyClass, _200Response.PropertyClass);
}

@Override
public int hashCode() {
return Objects.hash(name);
return Objects.hash(name, PropertyClass);
}

@Override
Expand All @@ -57,6 +76,7 @@ public String toString() {
sb.append("class Model200Response {\n");

sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" PropertyClass: ").append(toIndentedString(PropertyClass)).append("\n");
sb.append("}");
return sb.toString();
}
Expand Down
6 changes: 6 additions & 0 deletions samples/client/petstore/java/feign/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,9 @@

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

# build files
**/target
target
.gradle
build
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ public ApiClient(String[] authNames) {
this();
for(String authName : authNames) {
RequestInterceptor auth;
if (authName == "petstore_auth") {
auth = new OAuth(OAuthFlow.implicit, "http://petstore.swagger.io/api/oauth/dialog", "", "write:pets, read:pets");
} else if (authName == "api_key") {
if (authName == "api_key") {
auth = new ApiKeyAuth("header", "api_key");
} else if (authName == "petstore_auth") {
auth = new OAuth(OAuthFlow.implicit, "http://petstore.swagger.io/api/oauth/dialog", "", "write:pets, read:pets");
} else {
throw new RuntimeException("auth name \"" + authName + "\" not found in available auth names");
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
/**
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/


package io.swagger.client;


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import io.swagger.client.ApiClient;

import org.joda.time.LocalDate;
import java.math.BigDecimal;
import org.joda.time.DateTime;
import java.math.BigDecimal;

import java.util.ArrayList;
import java.util.HashMap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import io.swagger.client.ApiClient;

import io.swagger.client.model.Pet;
import io.swagger.client.model.ModelApiResponse;
import java.io.File;
import io.swagger.client.model.ModelApiResponse;

import java.util.ArrayList;
import java.util.HashMap;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,30 @@
/**
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/


package io.swagger.client.auth;

public enum OAuthFlow {
accessCode, implicit, password, application
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
public class Model200Response {

private Integer name = null;
private String PropertyClass = null;


/**
Expand All @@ -34,6 +35,23 @@ public void setName(Integer name) {
}


/**
**/
public Model200Response PropertyClass(String PropertyClass) {
this.PropertyClass = PropertyClass;
return this;
}

@ApiModelProperty(example = "null", value = "")
@JsonProperty("class")
public String getPropertyClass() {
return PropertyClass;
}
public void setPropertyClass(String PropertyClass) {
this.PropertyClass = PropertyClass;
}


@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
Expand All @@ -43,12 +61,13 @@ public boolean equals(java.lang.Object o) {
return false;
}
Model200Response _200Response = (Model200Response) o;
return Objects.equals(this.name, _200Response.name);
return Objects.equals(this.name, _200Response.name) &&
Objects.equals(this.PropertyClass, _200Response.PropertyClass);
}

@Override
public int hashCode() {
return Objects.hash(name);
return Objects.hash(name, PropertyClass);
}

@Override
Expand All @@ -57,6 +76,7 @@ public String toString() {
sb.append("class Model200Response {\n");

sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" PropertyClass: ").append(toIndentedString(PropertyClass)).append("\n");
sb.append("}");
return sb.toString();
}
Expand Down
6 changes: 6 additions & 0 deletions samples/client/petstore/java/jersey2/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,9 @@

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

# build files
**/target
target
.gradle
build
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# Thsi matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux

# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
Expand Down
1 change: 0 additions & 1 deletion samples/client/petstore/java/jersey2/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ if(hasProperty('target') && target == 'android') {

apply plugin: 'java'
apply plugin: 'maven'

sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **Integer** | | [optional]
**PropertyClass** | **String** | | [optional]



21 changes: 0 additions & 21 deletions samples/client/petstore/java/jersey2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -104,27 +104,6 @@
<target>1.7</target>
</configuration>
</plugin>
<!-- For testing build.gradle -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<id>gradle-test</id>
<phase>integration-test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>gradle</executable>
<arguments>
<argument>check</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
public class Model200Response {

private Integer name = null;
private String PropertyClass = null;


/**
Expand All @@ -34,6 +35,23 @@ public void setName(Integer name) {
}


/**
**/
public Model200Response PropertyClass(String PropertyClass) {
this.PropertyClass = PropertyClass;
return this;
}

@ApiModelProperty(example = "null", value = "")
@JsonProperty("class")
public String getPropertyClass() {
return PropertyClass;
}
public void setPropertyClass(String PropertyClass) {
this.PropertyClass = PropertyClass;
}


@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
Expand All @@ -43,12 +61,13 @@ public boolean equals(java.lang.Object o) {
return false;
}
Model200Response _200Response = (Model200Response) o;
return Objects.equals(this.name, _200Response.name);
return Objects.equals(this.name, _200Response.name) &&
Objects.equals(this.PropertyClass, _200Response.PropertyClass);
}

@Override
public int hashCode() {
return Objects.hash(name);
return Objects.hash(name, PropertyClass);
}

@Override
Expand All @@ -57,6 +76,7 @@ public String toString() {
sb.append("class Model200Response {\n");

sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" PropertyClass: ").append(toIndentedString(PropertyClass)).append("\n");
sb.append("}");
return sb.toString();
}
Expand Down
6 changes: 6 additions & 0 deletions samples/client/petstore/java/okhttp-gson/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,9 @@

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

# build files
**/target
target
.gradle
build
Loading