-
Notifications
You must be signed in to change notification settings - Fork 6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10333 from colorcodecanvas/9845
Wrong generation of @JacksonXmlElementWrapper annotation
- Loading branch information
Showing
5 changed files
with
115 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
samples/client/petstore/java/resttemplate-withXml/.swagger-codegen/VERSION
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
2.4.10-SNAPSHOT | ||
2.4.16-SNAPSHOT |
10 changes: 10 additions & 0 deletions
10
samples/client/petstore/java/resttemplate-withXml/docs/List.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
|
||
# List | ||
|
||
## Properties | ||
Name | Type | Description | Notes | ||
------------ | ------------- | ------------- | ------------- | ||
**_123List** | **String** | | [optional] | ||
|
||
|
||
|
98 changes: 98 additions & 0 deletions
98
...client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/List.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
/* | ||
* 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. | ||
*/ | ||
|
||
|
||
package io.swagger.client.model; | ||
|
||
import java.util.Objects; | ||
import java.util.Arrays; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.fasterxml.jackson.annotation.JsonCreator; | ||
import com.fasterxml.jackson.annotation.JsonValue; | ||
import io.swagger.annotations.ApiModel; | ||
import io.swagger.annotations.ApiModelProperty; | ||
import com.fasterxml.jackson.dataformat.xml.annotation.*; | ||
import javax.xml.bind.annotation.*; | ||
|
||
/** | ||
* List | ||
*/ | ||
|
||
@XmlRootElement(name = "List") | ||
@XmlAccessorType(XmlAccessType.FIELD) | ||
@JacksonXmlRootElement(localName = "List") | ||
public class List { | ||
@JsonProperty("123-list") | ||
@JacksonXmlProperty(localName = "123-list") | ||
@XmlElement(name = "123-list") | ||
private String _123List = null; | ||
|
||
public List _123List(String _123List) { | ||
this._123List = _123List; | ||
return this; | ||
} | ||
|
||
/** | ||
* Get _123List | ||
* @return _123List | ||
**/ | ||
@ApiModelProperty(value = "") | ||
public String get123List() { | ||
return _123List; | ||
} | ||
|
||
public void set123List(String _123List) { | ||
this._123List = _123List; | ||
} | ||
|
||
|
||
@Override | ||
public boolean equals(java.lang.Object o) { | ||
if (this == o) { | ||
return true; | ||
} | ||
if (o == null || getClass() != o.getClass()) { | ||
return false; | ||
} | ||
List list = (List) o; | ||
return Objects.equals(this._123List, list._123List); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(_123List); | ||
} | ||
|
||
|
||
@Override | ||
public String toString() { | ||
StringBuilder sb = new StringBuilder(); | ||
sb.append("class List {\n"); | ||
|
||
sb.append(" _123List: ").append(toIndentedString(_123List)).append("\n"); | ||
sb.append("}"); | ||
return sb.toString(); | ||
} | ||
|
||
/** | ||
* Convert the given object to string with each line indented by 4 spaces | ||
* (except the first line). | ||
*/ | ||
private String toIndentedString(java.lang.Object o) { | ||
if (o == null) { | ||
return "null"; | ||
} | ||
return o.toString().replace("\n", "\n "); | ||
} | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters