org.raml.parser.rule
Class ParamRule
java.lang.Object
org.raml.parser.rule.DefaultTupleRule<ScalarNode,MappingNode>
org.raml.parser.rule.PojoTupleRule
org.raml.parser.rule.ParamRule
- All Implemented Interfaces:
- NodeRule<MappingNode>, TupleRule<ScalarNode,MappingNode>
public class ParamRule
- extends PojoTupleRule
This Rule handles each parameter
#%RAML 0.2 --- title: Salesforce Chatter Communities REST API
version: v28.0 baseUri: https://{communityDomain}.force.com/{communityPath}
uriParameters: communityDomain: name: Community Domain type: string communityPath:
name: Community Path type: string pattern: ^[a-zA-Z0-9][-a-zA-Z0-9]*$
minimumLength: 1
A new ParamRule will be created for communityPath and communityDomain
- Author:
- seba
| Methods inherited from class org.raml.parser.rule.DefaultTupleRule |
getHandler, getKey, getMissingRuleMessage, getName, getNodeRuleFactory, getParentTupleRule, getRuleByFieldName, isRequired, setHandler, setNestedRules, setNodeRuleFactory, setParentTupleRule, setRequired, validateKey, validateValue |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ParamRule
public ParamRule(String fieldName,
NodeRuleFactory nodeRuleFactory)
addRulesFor
public void addRulesFor(Class<?> pojoClass)
- Overrides:
addRulesFor in class DefaultTupleRule<ScalarNode,MappingNode>
onRuleEnd
public List<ValidationResult> onRuleEnd()
- Description copied from interface:
NodeRule
- Called when the ruled was ended to verify all mandatory fields are present
- Specified by:
onRuleEnd in interface NodeRule<MappingNode>- Overrides:
onRuleEnd in class DefaultTupleRule<ScalarNode,MappingNode>
- Returns:
Copyright © 2013. All rights reserved.