| Modifier and Type | Field and Description |
|---|---|
static String |
ISO_8601_DATE_FORMAT |
static String |
ISO_8601_DATETIME_FORMAT |
static String |
ISO_8601_TIME_FORMAT |
| Modifier | Constructor and Description |
|---|---|
protected |
FormatRule(RuleFactory ruleFactory) |
| Modifier and Type | Method and Description |
|---|---|
com.sun.codemodel.JType |
apply(String nodeName,
com.fasterxml.jackson.databind.JsonNode node,
com.sun.codemodel.JType baseType,
Schema schema)
Applies this schema rule to take the required code generation steps.
|
public static String ISO_8601_DATE_FORMAT
public static String ISO_8601_TIME_FORMAT
public static String ISO_8601_DATETIME_FORMAT
protected FormatRule(RuleFactory ruleFactory)
public com.sun.codemodel.JType apply(String nodeName, com.fasterxml.jackson.databind.JsonNode node, com.sun.codemodel.JType baseType, Schema schema)
This rule maps format values to Java types:
Date or DateTime (if config useJodaDates is set)
String or LocalDate (if config useJodaLocalDates is set)
String or LocalTime (if config useJodaLocalTimes is set)
long
Pattern
String
String
String
URI
String
String
String
String
UUID
apply in interface Rule<com.sun.codemodel.JType,com.sun.codemodel.JType>nodeName - the name of the node to which this format is appliednode - the format nodebaseType - the type which which is being formatted e.g. for
{ "type" : "string", "format" : "uri" } the
baseType would be java.lang.Stringschema - the schema to which this schema rule (and the given node)
belongs.Copyright © 2017. All rights reserved.