Package org.jsonschema2pojo.rules
Class MediaRule
java.lang.Object
org.jsonschema2pojo.rules.MediaRule
- All Implemented Interfaces:
Rule<com.sun.codemodel.JType,com.sun.codemodel.JType>
public class MediaRule
extends Object
implements Rule<com.sun.codemodel.JType,com.sun.codemodel.JType>
Applies the "media" hyper schema rule.
- Since:
- 0.4.2
- Author:
- Christian Trimble
- See Also:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
MediaRule
protected MediaRule()Constructs a new media rule.
- Since:
- 0.4.2
-
-
Method Details
-
apply
public com.sun.codemodel.JType apply(String nodeName, com.fasterxml.jackson.databind.JsonNode mediaNode, com.fasterxml.jackson.databind.JsonNode parent, com.sun.codemodel.JType baseType, Schema schema) Applies this schema rule.
- Specified by:
applyin interfaceRule<com.sun.codemodel.JType,com.sun.codemodel.JType> - Parameters:
nodeName- the name of the property.mediaNode- the media nodeparent- the parent nodebaseType- the type with the media node. This must be java.lang.String.schema- the schema containing the property.- Returns:
- byte[] when a binary encoding is specified, baseType otherwise.
- Since:
- 0.4.2
-