Class JsonSchemaGenerator
- java.lang.Object
-
- org.codehaus.plexus.logging.AbstractLogEnabled
-
- org.codehaus.modello.plugin.AbstractModelloGenerator
-
- org.codehaus.modello.plugin.java.AbstractJavaModelloGenerator
-
- org.codehaus.modello.plugins.xml.AbstractXmlJavaGenerator
-
- org.codehaus.modello.plugin.jsonschema.JsonSchemaGenerator
-
- All Implemented Interfaces:
ModelloGenerator
,org.codehaus.plexus.logging.LogEnabled
,org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable
public final class JsonSchemaGenerator extends AbstractXmlJavaGenerator
- Since:
- 1.8
-
-
Field Summary
-
Fields inherited from class org.codehaus.modello.plugins.xml.AbstractXmlJavaGenerator
strictXmlAttributes
-
Fields inherited from class org.codehaus.modello.plugin.java.AbstractJavaModelloGenerator
DEFAULT_DATE_FORMAT, domAsXpp3, useJava5
-
-
Constructor Summary
Constructors Constructor Description JsonSchemaGenerator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
generate(Model model, java.util.Properties parameters)
private void
generateJsonSchema(java.util.Properties parameters)
private void
writeClassDocumentation(com.fasterxml.jackson.core.JsonGenerator generator, ModelClass modelClass, boolean isRoot)
private static void
writeDescriptionField(com.fasterxml.jackson.core.JsonGenerator generator, java.lang.String description)
private void
writeTypeField(com.fasterxml.jackson.core.JsonGenerator generator, java.lang.String type)
-
Methods inherited from class org.codehaus.modello.plugins.xml.AbstractXmlJavaGenerator
getContentField, getFieldsForXml, getFileName, getValue, initialize, resolveTagName, resolveTagName, resolveTagName, writeDateParsingHelper
-
Methods inherited from class org.codehaus.modello.plugin.java.AbstractJavaModelloGenerator
addModelImport, addModelImports, getClasses, getDefaultValue, getJavaDefaultValue, getPrefix, getValueChecker, initHeader, initHeader, isJavaEnabled, isRelevant, isTrackingSupport, newJSourceWriter, suppressAllWarnings
-
Methods inherited from class org.codehaus.modello.plugin.AbstractModelloGenerator
capitalise, contextualize, getBuildContext, getEncoding, getFieldsForClass, getGeneratedVersion, getHeader, getModel, getOutputDirectory, getParameter, getParameter, getParameter, isClassInModel, isCollection, isEmpty, isInnerAssociation, isMap, isPackageWithVersion, singular, uncapitalise
-
-
-
-
Method Detail
-
generate
public void generate(Model model, java.util.Properties parameters) throws ModelloException
- Throws:
ModelloException
-
generateJsonSchema
private void generateJsonSchema(java.util.Properties parameters) throws java.io.IOException, ModelloException
- Throws:
java.io.IOException
ModelloException
-
writeClassDocumentation
private void writeClassDocumentation(com.fasterxml.jackson.core.JsonGenerator generator, ModelClass modelClass, boolean isRoot) throws java.io.IOException
- Throws:
java.io.IOException
-
writeDescriptionField
private static void writeDescriptionField(com.fasterxml.jackson.core.JsonGenerator generator, java.lang.String description) throws java.io.IOException
- Throws:
java.io.IOException
-
writeTypeField
private void writeTypeField(com.fasterxml.jackson.core.JsonGenerator generator, java.lang.String type) throws java.io.IOException
- Throws:
java.io.IOException
-
-