forked from swagger-api/swagger-codegen
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue swagger-api#2449 SubClass annotations are missing from the base…
… class (swagger-api#4085) * petstore up to latest * Issue swagger-api#2449 SubClass annotations are missing from the base class * include child in all its super types
- Loading branch information
1 parent
2c10cb9
commit 67b229f
Showing
10 changed files
with
81 additions
and
5 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
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
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
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
5 changes: 5 additions & 0 deletions
5
modules/swagger-codegen/src/main/resources/Java/typeInfoAnnotation.mustache
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,5 @@ | ||
{{#jackson}} | ||
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "{{discriminator}}" ) | ||
@JsonSubTypes({ | ||
{{#children}}@JsonSubTypes.Type(value = {{name}}.class, name = "{{name}}"),{{/children}} | ||
}){{/jackson}} |
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
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
32 changes: 32 additions & 0 deletions
32
...client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/RFC3339DateFormat.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,32 @@ | ||
/* | ||
* 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; | ||
|
||
import com.fasterxml.jackson.databind.util.ISO8601DateFormat; | ||
import com.fasterxml.jackson.databind.util.ISO8601Utils; | ||
|
||
import java.text.FieldPosition; | ||
import java.util.Date; | ||
|
||
|
||
public class RFC3339DateFormat extends ISO8601DateFormat { | ||
|
||
// Same as ISO8601DateFormat but serializing milliseconds. | ||
@Override | ||
public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) { | ||
String value = ISO8601Utils.format(date, true); | ||
toAppendTo.append(value); | ||
return toAppendTo; | ||
} | ||
|
||
} |
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
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