Source:
<code>public void testIssue799() throws Exception { Swagger swagger = converter.read("src/test/resources/specs/v1_2/issue799.json"); Assert.assertEquals( swagger.getPaths().get("/api/v1beta3/namespaces/{namespaces}/bindings").getPost().getResponses().get("200").getResponseSchema().getReference(), "#/definitions/v1beta3.Binding"); <START> Json.prettyPrint(swagger); <END> }</code><technical_language>add assertions Json.prettyPrint(swagger) line: java Parameter bodyParameter = swagger.getPaths().get("/api/v1beta3/namespaces/{namespaces}/bindings").getPost().getParameters().get(1); Assert.assertEquals( bodyParameter.getName(), "body"); Assert.assertTrue( bodyParameter instanceof BodyParameter); Assert.assertEquals( ((BodyParameter)bodyParameter).getSchema().getReference(), "#/definitions/v1beta3.Binding"); Assert.assertEquals( swagger.getPaths().get("/api/v1beta3/namespaces/{namespaces}/componentstatuses/{name}").getGet().getResponses().get("200").getResponseSchema().getReference(), "#/definitions/v1beta3.ComponentStatus"); Assert.assertEquals( swagger.getPaths().get("/api/v1beta3/namespaces/{namespaces}/componentstatuses").getGet().getResponses().get("200").getResponseSchema().getReference(), "#/definitions/v1beta3.ComponentStatusList"); Property conditionsProperty = swagger.getDefinitions().get("v1beta3.ComponentStatus").getProperties().get("conditions"); Assert.assertTrue( conditionsProperty instanceof ArrayProperty); Property items = ((ArrayProperty)conditionsProperty).getItems(); Assert.assertTrue( items instanceof RefProperty); Assert.assertEquals( ((RefProperty)items).get$ref(), "#/definitions/v1beta3.ObjectReference"); Property metadataProperty = swagger.getDefinitions().get("v1beta3.ComponentStatus").getProperties().get("metadata"); Assert.assertTrue( metadataProperty instanceof RefProperty); Assert.assertEquals( ((RefProperty)metadataProperty).get$ref(), "#/definitions/v1beta3.ObjectMeta");</technical_language>

Target:
public void testIssue799() throws Exception { Swagger swagger = converter.read("src/test/resources/specs/v1_2/issue799.json"); Assert.assertEquals( swagger.getPaths().get("/api/v1beta3/namespaces/{namespaces}/bindings").getPost().getResponses().get("200").getResponseSchema().getReference(), "#/definitions/v1beta3.Binding"); Parameter bodyParameter = swagger.getPaths().get("/api/v1beta3/namespaces/{namespaces}/bindings").getPost().getParameters().get(1); Assert.assertEquals( bodyParameter.getName(), "body"); Assert.assertTrue( bodyParameter instanceof BodyParameter); Assert.assertEquals( ((BodyParameter)bodyParameter).getSchema().getReference(), "#/definitions/v1beta3.Binding"); Assert.assertEquals( swagger.getPaths().get("/api/v1beta3/namespaces/{namespaces}/componentstatuses/{name}").getGet().getResponses().get("200").getResponseSchema().getReference(), "#/definitions/v1beta3.ComponentStatus"); Assert.assertEquals( swagger.getPaths().get("/api/v1beta3/namespaces/{namespaces}/componentstatuses").getGet().getResponses().get("200").getResponseSchema().getReference(), "#/definitions/v1beta3.ComponentStatusList"); Property conditionsProperty = swagger.getDefinitions().get("v1beta3.ComponentStatus").getProperties().get("conditions"); Assert.assertTrue( conditionsProperty instanceof ArrayProperty); Property items = ((ArrayProperty)conditionsProperty).getItems(); Assert.assertTrue( items instanceof RefProperty); Assert.assertEquals( ((RefProperty)items).get$ref(), "#/definitions/v1beta3.ObjectReference"); Property metadataProperty = swagger.getDefinitions().get("v1beta3.ComponentStatus").getProperties().get("metadata"); Assert.assertTrue( metadataProperty instanceof RefProperty); Assert.assertEquals( ((RefProperty)metadataProperty).get$ref(), "#/definitions/v1beta3.ObjectMeta"); }