T - the concrete type of the generated JSON SchemaV - the concrete type of the validation rulepublic abstract class AbstractJsonSchema<T extends KubernetesJSONSchemaProps,V extends KubernetesValidationRule> extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractJsonSchema.AnnotationMetadata |
| Constructor and Description |
|---|
AbstractJsonSchema(ResolvingContext resolvingContext,
Class<?> def) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
addProperty(String name,
T objectSchema,
T schema)
Adds the specified property to the specified builder
|
protected abstract void |
addToValidationRules(T schema,
List<V> validationRules) |
protected abstract T |
arrayLikeProperty(T schema)
Builds the schema for array-like properties
|
protected abstract T |
enumProperty(com.fasterxml.jackson.databind.JsonNode... enumValues) |
Map<String,AbstractJsonSchema.AnnotationMetadata> |
getAllPaths(Class<PrinterColumn> clazz) |
Set<String> |
getDependentClasses() |
T |
getSchema() |
Optional<String> |
getSinglePath(Class<? extends Annotation> clazz) |
protected abstract T |
intOrString()
Builds the schema for specifically for intOrString properties
|
protected abstract T |
mapLikeProperty(T schema)
Builds the schema for map-like properties
|
protected abstract V |
newKubernetesValidationRule() |
protected abstract T |
raw() |
protected abstract T |
singleProperty(String typeName)
Builds the schema for standard, simple (e.g.
|
public AbstractJsonSchema(ResolvingContext resolvingContext, Class<?> def)
public T getSchema()
public Optional<String> getSinglePath(Class<? extends Annotation> clazz)
public Map<String,AbstractJsonSchema.AnnotationMetadata> getAllPaths(Class<PrinterColumn> clazz)
protected abstract V newKubernetesValidationRule()
protected abstract void addProperty(String name, T objectSchema, T schema)
name - the property to add to the currently being built schemaobjectSchema - the schema being builtschema - the built schema for the property being addedprotected abstract T intOrString()
protected abstract T arrayLikeProperty(T schema)
schema - the schema for the extracted element type for this array-like propertyprotected abstract T mapLikeProperty(T schema)
schema - the schema for the extracted element type for the values of this map-like propertyprotected abstract T singleProperty(String typeName)
typeName - the mapped name of the property typeprotected abstract T enumProperty(com.fasterxml.jackson.databind.JsonNode... enumValues)
protected abstract void addToValidationRules(T schema, List<V> validationRules)
protected abstract T raw()
Copyright © 2015–2024 Red Hat. All rights reserved.