org.jsonschema2pojo.Annotator Java Examples
The following examples show how to use
org.jsonschema2pojo.Annotator.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SpringMvcEndpointGeneratorMojo.java From springmvc-raml-plugin with Apache License 2.0 | 6 votes |
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); } }
Example #2
Source File: OpenApi2JaxRs.java From apicurio-studio with Apache License 2.0 | 4 votes |
/** * Constructor. */ public JaxRsRuleFactory(GenerationConfig generationConfig, Annotator annotator, SchemaStore schemaStore) { super(generationConfig, annotator, schemaStore); }
Example #3
Source File: StreamsPojoGenerationConfig.java From streams with Apache License 2.0 | 4 votes |
@Override public Class<? extends Annotator> getCustomAnnotator() { return JuneauPojoAnnotator.class; }
Example #4
Source File: ApiBodyMetadata.java From springmvc-raml-plugin with Apache License 2.0 | 3 votes |
/** * 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); } }