public class SchemaFactory extends Object
Modifier and Type | Method and Description |
---|---|
static org.eclipse.microprofile.openapi.models.media.Schema |
enumToSchema(org.jboss.jandex.IndexView index,
org.jboss.jandex.Type enumType)
Convert a Jandex enum class type to a
Schema model. |
static org.eclipse.microprofile.openapi.models.media.Schema |
readSchema(org.jboss.jandex.IndexView index,
org.jboss.jandex.AnnotationInstance annotation)
Reads a Schema annotation into a model.
|
static org.eclipse.microprofile.openapi.models.media.Schema |
readSchema(org.jboss.jandex.IndexView index,
org.jboss.jandex.AnnotationValue value)
Reads a Schema annotation into a model.
|
static org.eclipse.microprofile.openapi.models.media.Schema |
readSchema(org.jboss.jandex.IndexView index,
org.eclipse.microprofile.openapi.models.media.Schema schema,
org.jboss.jandex.AnnotationInstance annotation,
org.jboss.jandex.ClassInfo clazz)
Populates the schema using the
@Schema
on the provided class. |
static org.eclipse.microprofile.openapi.models.media.Schema |
readSchema(org.jboss.jandex.IndexView index,
org.eclipse.microprofile.openapi.models.media.Schema schema,
org.jboss.jandex.AnnotationInstance annotation,
org.jboss.jandex.ClassInfo clazz,
Map<String,Object> defaults)
Populates the schema using the
@Schema
on the provided class. |
static org.eclipse.microprofile.openapi.models.media.Schema |
readSchema(org.jboss.jandex.IndexView index,
org.eclipse.microprofile.openapi.models.media.Schema schema,
org.jboss.jandex.AnnotationInstance annotation,
Map<String,Object> defaults) |
static org.eclipse.microprofile.openapi.models.media.Schema |
typeToSchema(org.jboss.jandex.IndexView index,
org.jboss.jandex.Type type,
List<AnnotationScannerExtension> extensions)
Converts a Jandex type to a
Schema model. |
public static org.eclipse.microprofile.openapi.models.media.Schema readSchema(org.jboss.jandex.IndexView index, org.jboss.jandex.AnnotationValue value)
index
- value
- public static org.eclipse.microprofile.openapi.models.media.Schema readSchema(org.jboss.jandex.IndexView index, org.jboss.jandex.AnnotationInstance annotation)
index
- annotation
- public static org.eclipse.microprofile.openapi.models.media.Schema readSchema(org.jboss.jandex.IndexView index, org.eclipse.microprofile.openapi.models.media.Schema schema, org.jboss.jandex.AnnotationInstance annotation, org.jboss.jandex.ClassInfo clazz)
@Schema
on the provided class. If the schema has already been registered (in components), the existing
registration will be replaced.index
- application class indexschema
- schema model to populateannotation
- schema annotation to readclazz
- the class annotated with @Schema
implementation
has been specified in the annotationpublic static org.eclipse.microprofile.openapi.models.media.Schema readSchema(org.jboss.jandex.IndexView index, org.eclipse.microprofile.openapi.models.media.Schema schema, org.jboss.jandex.AnnotationInstance annotation, org.jboss.jandex.ClassInfo clazz, Map<String,Object> defaults)
@Schema
on the provided class. If the schema has already been registered (in components), the existing
registration will be replaced.index
- application class indexschema
- schema model to populateannotation
- schema annotation to readclazz
- the class annotated with @Schema
defaults
- default values to be set on the schema when not present in the annotationimplementation
has been specified in the annotationpublic static org.eclipse.microprofile.openapi.models.media.Schema readSchema(org.jboss.jandex.IndexView index, org.eclipse.microprofile.openapi.models.media.Schema schema, org.jboss.jandex.AnnotationInstance annotation, Map<String,Object> defaults)
public static org.eclipse.microprofile.openapi.models.media.Schema typeToSchema(org.jboss.jandex.IndexView index, org.jboss.jandex.Type type, List<AnnotationScannerExtension> extensions)
Schema
model.index
- the index of classes being scannedtype
- the implementation type of the item to scanextensions
- public static org.eclipse.microprofile.openapi.models.media.Schema enumToSchema(org.jboss.jandex.IndexView index, org.jboss.jandex.Type enumType)
Schema
model.
Adds each enum constant name to the list of the given schema's
enumeration list. The given type must be found in the index.index
- Jandex index containing the ClassInfo for the given enum typeenumType
- type containing Java Enum constantsField.isEnumConstant()
Copyright © 2018–2020. All rights reserved.