Class JsonSchemaGenerator
java.lang.Object
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
- Since:
- 1.8
-
Field Summary
Fields inherited from class org.codehaus.modello.plugins.xml.AbstractXmlJavaGenerator
strictXmlAttributesFields inherited from class org.codehaus.modello.plugin.java.AbstractJavaModelloGenerator
DEFAULT_DATE_FORMAT, domAsXpp3 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprivate voidgenerateJsonSchema(Map<String, Object> parameters) private voidwriteClassDocumentation(com.fasterxml.jackson.core.JsonGenerator generator, ModelClass modelClass, boolean isRoot) private static voidwriteDescriptionField(com.fasterxml.jackson.core.JsonGenerator generator, String description) private voidwriteTypeField(com.fasterxml.jackson.core.JsonGenerator generator, String type) Methods inherited from class org.codehaus.modello.plugins.xml.AbstractXmlJavaGenerator
getContentField, getFieldsForXml, getFileName, getValue, initialize, resolveTagName, resolveTagName, resolveTagName, writeDateParsingHelperMethods inherited from class org.codehaus.modello.plugin.java.AbstractJavaModelloGenerator
addModelImport, addModelImports, getClasses, getDefaultValue, getJavaDefaultValue, getPrefix, getValueChecker, initHeader, initHeader, isJavaEnabled, isRelevant, isTrackingSupport, newJSourceWriter, suppressAllWarningsMethods inherited from class org.codehaus.modello.plugin.AbstractModelloGenerator
capitalise, getBuildContext, getEncoding, getFieldsForClass, getGeneratedHeader, getGeneratedVersion, getHeader, getLicenseHeader, getLogger, getModel, getOutputDirectory, getParameter, isClassInModel, isCollection, isEmpty, isInnerAssociation, isMap, isPackageWithVersion, newWriter, newWriter, requireParameter, singular, uncapitalise
-
Constructor Details
-
JsonSchemaGenerator
public JsonSchemaGenerator()
-
-
Method Details
-
generate
- Throws:
ModelloException
-
generateJsonSchema
- Throws:
IOExceptionModelloException
-
writeClassDocumentation
private void writeClassDocumentation(com.fasterxml.jackson.core.JsonGenerator generator, ModelClass modelClass, boolean isRoot) throws IOException - Throws:
IOException
-
writeDescriptionField
private static void writeDescriptionField(com.fasterxml.jackson.core.JsonGenerator generator, String description) throws IOException - Throws:
IOException
-
writeTypeField
private void writeTypeField(com.fasterxml.jackson.core.JsonGenerator generator, String type) throws IOException - Throws:
IOException
-