| Modifier and Type | Field and Description |
|---|---|
static String |
REQUIRED_COMMENT_TEXT
Text added to JavaDoc to indicate that a field is required
|
| Modifier | Constructor and Description |
|---|---|
protected |
RequiredRule(RuleFactory ruleFactory) |
| Modifier and Type | Method and Description |
|---|---|
com.sun.codemodel.JDocComment |
apply(String nodeName,
com.fasterxml.jackson.databind.JsonNode node,
com.sun.codemodel.JDocCommentable generatableType,
Schema schema)
Applies this schema rule to take the required code generation steps.
|
public static final String REQUIRED_COMMENT_TEXT
protected RequiredRule(RuleFactory ruleFactory)
public com.sun.codemodel.JDocComment apply(String nodeName, com.fasterxml.jackson.databind.JsonNode node, com.sun.codemodel.JDocCommentable generatableType, Schema schema)
The required rule simply adds a note to the JavaDoc comment to mark a property as required.
apply in interface Rule<com.sun.codemodel.JDocCommentable,com.sun.codemodel.JDocComment>nodeName - the name of the schema node for which this "required" rule has
been addednode - the "required" node, having a value true or
falsegeneratableType - the class or method which may be marked as "required"schema - the schema to which this schema rule (and the given node)
belongs.Copyright © 2015. All rights reserved.