public final class OASFactory
extends java.lang.Object
OASFactory.createObject(OpenAPI.class)
.setExternalDocs(OASFactory.createObject(ExternalDocumentation.class).url("http://myDoc"));
Modifier and Type | Method and Description |
---|---|
static <T extends Constructible> |
createObject(java.lang.Class<T> clazz)
This method creates a new instance of a constructible element from the OpenAPI model tree.
|
public static <T extends Constructible> T createObject(java.lang.Class<T> clazz)
OASFactory.createObject(Info.class).title("Airlines").description("Airlines APIs").version("1.0.0");
T
- describes the type parameterclazz
- represents a model which extends the Constructible
interfacejava.lang.NullPointerException
- if the specified class is nulljava.lang.IllegalArgumentException
- if an instance could not be created, most likely, due to an illegal or inappropriate class