Search in sources :

Example 1 with DocumentationLink

use of io.micronaut.starter.feature.function.DocumentationLink in project micronaut-starter by micronaut-projects.

the class AwsLambda method apply.

@Override
public void apply(GeneratorContext generatorContext) {
    Project project = generatorContext.getProject();
    if (shouldGenerateSources(generatorContext)) {
        addBook(generatorContext, project);
        addBookSaved(generatorContext, project);
        ApplicationType applicationType = generatorContext.getApplicationType();
        if (applicationType == DEFAULT || applicationType == FUNCTION) {
            if (applicationType == DEFAULT) {
                addBookController(generatorContext, project);
                addBookControllerTest(generatorContext, project);
            } else {
                addRequestHandler(generatorContext, project);
                addTest(generatorContext, project);
            }
            DocumentationLink link = new DocumentationLink(LINK_TITLE, LINK_URL);
            generatorContext.addHelpTemplate(new RockerWritable(readmeRockerModel(this, generatorContext, link)));
        }
    }
}
Also used : Project(io.micronaut.starter.application.Project) ApplicationType(io.micronaut.starter.application.ApplicationType) RockerWritable(io.micronaut.starter.template.RockerWritable) DocumentationLink(io.micronaut.starter.feature.function.DocumentationLink)

Aggregations

ApplicationType (io.micronaut.starter.application.ApplicationType)1 Project (io.micronaut.starter.application.Project)1 DocumentationLink (io.micronaut.starter.feature.function.DocumentationLink)1 RockerWritable (io.micronaut.starter.template.RockerWritable)1