-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'big-andy-coates-interface_support'
- Loading branch information
Showing
5 changed files
with
103 additions
and
2 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
36 changes: 36 additions & 0 deletions
36
src/test/scala/com/kjetland/jackson/jsonSchema/testData/polymorphism6/Child61.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,36 @@ | ||
package com.kjetland.jackson.jsonSchema.testData.polymorphism6; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
import java.util.Objects; | ||
|
||
public class Child61 implements Parent6 { | ||
|
||
public String child1String; | ||
|
||
@JsonProperty("_child1String2") | ||
public String child1String2; | ||
|
||
@JsonProperty(value = "_child1String3", required = true) | ||
public String child1String3; | ||
|
||
public String parentString; | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) return true; | ||
if (!(o instanceof Child61)) return false; | ||
|
||
Child61 child1 = (Child61) o; | ||
|
||
return Objects.equals(child1String, child1.child1String) | ||
&& Objects.equals(child1String2, child1.child1String2) | ||
&& Objects.equals(child1String3, child1.child1String3) | ||
&& Objects.equals(parentString, child1.parentString); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(child1String, child1String2, child1String3, parentString); | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
src/test/scala/com/kjetland/jackson/jsonSchema/testData/polymorphism6/Child62.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,26 @@ | ||
package com.kjetland.jackson.jsonSchema.testData.polymorphism6; | ||
|
||
import java.util.Objects; | ||
|
||
public class Child62 implements Parent6 { | ||
|
||
public Integer child2int; | ||
|
||
public String parentString; | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) return true; | ||
if (!(o instanceof Child62)) return false; | ||
|
||
Child62 child2 = (Child62) o; | ||
|
||
return Objects.equals(child2int, child2.child2int) | ||
&& Objects.equals(parentString, child2.parentString); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(child2int, parentString); | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
src/test/scala/com/kjetland/jackson/jsonSchema/testData/polymorphism6/Parent6.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,11 @@ | ||
package com.kjetland.jackson.jsonSchema.testData.polymorphism6; | ||
|
||
import com.fasterxml.jackson.annotation.JsonTypeInfo; | ||
|
||
@JsonTypeInfo( | ||
use = JsonTypeInfo.Id.MINIMAL_CLASS, | ||
include = JsonTypeInfo.As.PROPERTY, | ||
property = "clazz") | ||
public interface Parent6 { | ||
|
||
} |