- private static final String NAMESPACE = "urn:opendaylight:groupbasedpolicy:opflex";
- private static final String STRING_DATE = "2014-05-28";
- private static final Date REVISION = Date.valueOf(STRING_DATE);
- private DocGenTestHelper helper;
- private SchemaContext schemaContext;
-
- @Before
- public void setUp() throws Exception {
- this.helper = new DocGenTestHelper();
- this.helper.setUp();
- this.schemaContext = this.helper.getSchemaContext();
+public final class SwaggerObjectTest extends AbstractApiDocTest {
+ @Test
+ public void testConvertToJsonSchema() throws IOException {
+ final var module = CONTEXT.findModule("opflex", Revision.of("2014-05-28")).orElseThrow();
+ final DefinitionGenerator generator = new DefinitionGenerator();
+ final ObjectNode jsonObject = generator.convertToJsonSchema(module, CONTEXT, new DefinitionNames(),
+ ApiDocServiceImpl.OAversion.V2_0, true);
+ assertNotNull(jsonObject);