Package io.micronaut.starter.api.diff
Class DiffController
java.lang.Object
io.micronaut.starter.api.diff.DiffController
- All Implemented Interfaces:
DiffOperations
A controller for performing Diffs.
- Since:
- 1.0.0
- Author:
- graemerocher
-
Constructor Summary
ConstructorDescriptionDiffController
(ProjectGenerator projectGenerator, FeatureDiffer featureDiffer) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptiondiffApp
(ApplicationType type, @Pattern(regexp="[\\w\\d-_\\.]+") String name, @Nullable List<String> features, @Nullable BuildTool build, @Nullable TestFramework test, @Nullable Language lang, @Nullable JdkVersion javaVersion, RequestInfo requestInfo) Diffs the whole application for all selected features.diffFeature
(@NotNull ApplicationType type, @Nullable String name, @NonNull @NotBlank String feature, @Nullable BuildTool build, @Nullable TestFramework test, @Nullable Language lang, @Nullable JdkVersion javaVersion, RequestInfo requestInfo) Returns a diff for the given application type and feature.
-
Constructor Details
-
DiffController
Default constructor.- Parameters:
projectGenerator
- The project generatorfeatureDiffer
- The feature differ
-
-
Method Details
-
diffFeature
@Get(uri="/{type}/feature/{feature}{?lang,build,test,javaVersion,name}", produces="text/plain") public String diffFeature(@NotNull @NotNull ApplicationType type, @Nullable @Nullable String name, @NonNull @NotBlank @NonNull @NotBlank String feature, @Nullable @Nullable BuildTool build, @Nullable @Nullable TestFramework test, @Nullable @Nullable Language lang, @Nullable @Nullable JdkVersion javaVersion, RequestInfo requestInfo) Returns a diff for the given application type and feature.- Specified by:
diffFeature
in interfaceDiffOperations
- Parameters:
type
- The application typefeature
- The featurebuild
- The build tooltest
- The test frameworklang
- The langjavaVersion
- The java versionrequestInfo
- The request infoname
- The project name- Returns:
- A string representing the difference
-
diffApp
@Get(uri="/{type}/{name}{?features,lang,build,test,javaVersion}", produces="text/plain") public String diffApp(ApplicationType type, @Pattern(regexp="[\\w\\d-_\\.]+") @Pattern(regexp="[\\w\\d-_\\.]+") String name, @Nullable @Nullable List<String> features, @Nullable @Nullable BuildTool build, @Nullable @Nullable TestFramework test, @Nullable @Nullable Language lang, @Nullable @Nullable JdkVersion javaVersion, RequestInfo requestInfo) throws IOException Diffs the whole application for all selected features.- Specified by:
diffApp
in interfaceDiffOperations
- Parameters:
type
- The application typename
- The name of the applicationfeatures
- The featuresbuild
- The build tooltest
- The test frameworklang
- The langrequestInfo
- The request info- Returns:
- An HTTP response that emits a writable
- Throws:
IOException
-