File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
modules/swagger-core/src/test/java/io/swagger/v3/core/serialization Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -121,10 +121,13 @@ public void serializeArrayModel() throws IOException {
121
121
122
122
@ Test (description = "it should deserialize an array model" )
123
123
public void deserializeArrayModel () throws IOException {
124
- final String json = "{\" type\" :\" array\" ,\" items\" :{\" $ref\" :\" #/definitions/Pet\" }}" ;
125
- final Schema p = m .readValue (json , Schema .class );
124
+ final String json1 = "{\" type\" :\" array\" ,\" items\" :{\" $ref\" :\" #/definitions/Pet\" }}" ;
125
+ final Schema p = m .readValue (json1 , Schema .class );
126
+ String json2 = m .writeValueAsString (p );
127
+ JSONObject jsonObj1 = new JSONObject (json1 );
128
+ JSONObject jsonObj2 = new JSONObject (json2 );
126
129
assertTrue (p instanceof ArraySchema );
127
- assertEquals (m . writeValueAsString ( p ), json );
130
+ JSONAssert . assertEquals (jsonObj1 , jsonObj2 , true );
128
131
}
129
132
130
133
@ Test (description = "it should not create an xml object for $ref" )
You can’t perform that action at this time.
0 commit comments