public final class OASFactory extends Object
OASFactory.createObject(OpenAPI.class)
.setExternalDocs(OASFactory.createObject(ExternalDocumentation.class).url("http://myDoc"));
Modifier and Type | Method and Description |
---|---|
static <T extends Constructible> |
createObject(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(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
interfaceNullPointerException
- if the specified class is nullIllegalArgumentException
- if an instance could not be created, most likely, due to an illegal or inappropriate classCopyright © 2017–2018 Eclipse MicroProfile. All rights reserved.