use of org.jboss.jandex.Type in project wildfly-swarm by wildfly-swarm.
the class ExpectationTests method testNestedGenerics.
@Test
public void testNestedGenerics() throws IOException, JSONException {
String name = GenericTypeTestContainer.class.getName();
Type pType = getFieldFromKlazz(name, "nesting").type();
OpenApiDataObjectScanner scanner = new OpenApiDataObjectScanner(index, pType);
Schema result = scanner.process();
printToConsole(name, result);
assertJsonEquals(name, "generic.nested.expected.json", result);
}
use of org.jboss.jandex.Type in project wildfly-swarm by wildfly-swarm.
the class ExpectationTests method testComplexInheritanceGenerics.
@Test
public void testComplexInheritanceGenerics() throws IOException, JSONException {
String name = GenericTypeTestContainer.class.getName();
Type pType = getFieldFromKlazz(name, "complexInheritance").type();
OpenApiDataObjectScanner scanner = new OpenApiDataObjectScanner(index, pType);
Schema result = scanner.process();
printToConsole(name, result);
assertJsonEquals(name, "generic.complexInheritance.expected.json", result);
}
use of org.jboss.jandex.Type in project wildfly-swarm by wildfly-swarm.
the class ExpectationTests method testComplexNestedGenerics.
@Test
public void testComplexNestedGenerics() throws IOException, JSONException {
String name = GenericTypeTestContainer.class.getName();
Type pType = getFieldFromKlazz(name, "complexNesting").type();
OpenApiDataObjectScanner scanner = new OpenApiDataObjectScanner(index, pType);
Schema result = scanner.process();
printToConsole(name, result);
assertJsonEquals(name, "generic.complexNesting.expected.json", result);
}
use of org.jboss.jandex.Type in project wildfly-swarm by wildfly-swarm.
the class KitchenSinkTest method testTopLevelParameterisedType.
/**
* Test parameterised type as a top-level entity (i.e. not just a bare class).
*
* @see org.jboss.jandex.ParameterizedType
*/
@Test
public void testTopLevelParameterisedType() throws IOException {
// Look up the kitchen sink and get the field named "simpleParameterizedType"
Type pType = getFieldFromKlazz(KitchenSink.class.getName(), "simpleParameterizedType").type();
LOG.debugv("Scanning top-level entity: {0}", pType);
OpenApiDataObjectScanner scanner = new OpenApiDataObjectScanner(index, pType);
printToConsole("KustomPair", scanner.process());
}
use of org.jboss.jandex.Type in project wildfly-swarm by wildfly-swarm.
the class SpecialCaseTests method testCollection_Wildcard.
@Test
public void testCollection_Wildcard() throws IOException, JSONException {
String name = SpecialCaseTestContainer.class.getName();
Type pType = getFieldFromKlazz(name, "listOfAnything").type();
OpenApiDataObjectScanner scanner = new OpenApiDataObjectScanner(index, pType);
Schema result = scanner.process();
printToConsole(name, result);
assertJsonEquals(name, "special.wildcard.expected.json", result);
}
Aggregations