Modifier and Type | Field and Description |
---|---|
static String |
NOT_REQUIRED_COMMENT_TEXT
Text added to JavaDoc to indicate that a field is not required
|
Modifier | Constructor and Description |
---|---|
protected |
NotRequiredRule(RuleFactory ruleFactory) |
Modifier and Type | Method and Description |
---|---|
com.sun.codemodel.JDocCommentable |
apply(String nodeName,
com.fasterxml.jackson.databind.JsonNode node,
com.fasterxml.jackson.databind.JsonNode parent,
com.sun.codemodel.JDocCommentable generatableType,
Schema schema)
Applies this schema rule to take the not required code generation steps.
|
public static final String NOT_REQUIRED_COMMENT_TEXT
protected NotRequiredRule(RuleFactory ruleFactory)
public com.sun.codemodel.JDocCommentable apply(String nodeName, com.fasterxml.jackson.databind.JsonNode node, com.fasterxml.jackson.databind.JsonNode parent, com.sun.codemodel.JDocCommentable generatableType, Schema schema)
The not required rule adds a Nullable annotation if JSR-305 annotations are desired.
apply
in interface Rule<com.sun.codemodel.JDocCommentable,com.sun.codemodel.JDocCommentable>
nodeName
- the name of the schema node for which this "required" rule has
been addednode
- the "not required" node, having a value false
or
no value
parent
- the parent nodegeneratableType
- the class or method which may be marked as "not required"schema
- the schema to which this schema rule (and the given node)
belongs.Copyright © 2022. All rights reserved.