Fix docgen for action types
[netconf.git] / restconf / sal-rest-docgen / src / test / java / org / opendaylight / controller / sal / rest / doc / impl / SwaggerObjectTest.java
index 889606d7e6fe1777ee149fef15f70c820a1f2e80..f37b8ee692698b7a5f694bca6be2ac3894216f2e 100644 (file)
@@ -40,6 +40,16 @@ public final class SwaggerObjectTest {
         Assert.assertNotNull(jsonObject);
     }
 
+    @Test
+    public void testActionTypes() throws Exception {
+        final Optional<? extends Module> module = context.findModule("action-types");
+        assertTrue("Desired module not found", module.isPresent());
+        final DefinitionGenerator generator = new DefinitionGenerator();
+        final ObjectNode jsonObject = generator.convertToJsonSchema(module.get(), context,
+                new DefinitionNames(), ApiDocServiceImpl.OAversion.V2_0, true);
+        Assert.assertNotNull(jsonObject);
+    }
+
     @Test
     public void testStringTypes() throws Exception {
         final Optional<? extends Module> module = context.findModule("string-types");