in grails-forge-api/src/main/java/org/grails/forge/api/diff/DiffController.java [93:128]
public Publisher<String> diffFeature(
@NotNull ApplicationType type,
@Nullable String name,
@NonNull @NotBlank String feature,
@Nullable BuildTool build,
@Nullable TestFramework test,
@Nullable GormImpl gorm,
@Nullable ServletImpl servlet,
@Nullable JdkVersion javaVersion,
@Parameter(hidden = true) RequestInfo requestInfo) {
ProjectGenerator projectGenerator;
GeneratorContext generatorContext;
try {
Project project = name != null ? NameUtils.parse(name) : this.project;
Options options = new Options(
test != null ? test : TestFramework.DEFAULT_OPTION,
gorm != null ? gorm : GormImpl.DEFAULT_OPTION,
servlet != null ? servlet : ServletImpl.DEFAULT_OPTION,
javaVersion != null ? javaVersion : JdkVersion.DEFAULT_OPTION
);
projectGenerator = this.projectGenerator;
generatorContext = projectGenerator.createGeneratorContext(
type,
project,
options,
UserAgentParser.getOperatingSystem(requestInfo.getUserAgent()),
Collections.singletonList(feature),
ConsoleOutput.NOOP
);
} catch (IllegalArgumentException e) {
throw new HttpStatusException(HttpStatus.BAD_REQUEST, e.getMessage());
}
return diffFlowable(projectGenerator, generatorContext);
}