类org.jsonschema2pojo.Annotator源码实例Demo

下面列出了怎么用org.jsonschema2pojo.Annotator的API类实例代码及写法,或者点击链接到github查看源代码。

private void generateModelSources(JCodeModel codeModel, ApiBodyMetadata body, File rootDir) {
	boolean build = false;
	if (codeModel == null) {
		Annotator annotator = this.useJackson1xCompatibility ? new Jackson1Annotator(this.generationConfig) : null;
		this.getLog().info("Generating Model object for: " + body.getName());
		build = true;
		if (this.generationConfig == null && annotator == null) {
			codeModel = body.getCodeModel();
		} else {
			codeModel = body.getCodeModel(resolvedSchemaLocation, basePackage + NamingHelper.getDefaultModelPackage(), annotator);
		}
	}
	if (build && codeModel != null) {
		buildCodeModelToDisk(codeModel, body.getName(), rootDir);
	}
}
 
源代码2 项目: apicurio-studio   文件: OpenApi2JaxRs.java
/**
 * Constructor.
 */
public JaxRsRuleFactory(GenerationConfig generationConfig, Annotator annotator, SchemaStore schemaStore) {
    super(generationConfig, annotator, schemaStore);
}
 
源代码3 项目: streams   文件: StreamsPojoGenerationConfig.java
@Override
public Class<? extends Annotator> getCustomAnnotator() {
  return JuneauPojoAnnotator.class;
}
 
源代码4 项目: springmvc-raml-plugin   文件: ApiBodyMetadata.java
/**
 * Builds a JCodeModel for this body
 *
 * @param basePackage
 *            The package we will be using for the domain objects
 * @param schemaLocation
 *            The location of this schema, will be used to create absolute
 *            URIs for $ref tags eg "classpath:/"
 * @param annotator
 *            JsonSchema2Pojo annotator. if null a default annotator will be
 *            used
 * @return built JCodeModel
 */
public JCodeModel getCodeModel(String basePackage, String schemaLocation, Annotator annotator) {
	if (type != null) {
		return codeModel;
	} else {
		return SchemaHelper.buildBodyJCodeModel(schemaLocation, basePackage, name, schema, annotator);
	}
}