Class DiffController

java.lang.Object
io.micronaut.starter.api.diff.DiffController
All Implemented Interfaces:
DiffOperations

@Controller("/diff") public class DiffController extends Object implements DiffOperations
A controller for performing Diffs.
Since:
1.0.0
Author:
graemerocher
  • Constructor Details

    • DiffController

      public DiffController(ProjectGenerator projectGenerator, FeatureDiffer featureDiffer)
      Default constructor.
      Parameters:
      projectGenerator - The project generator
      featureDiffer - The feature differ
  • Method Details

    • diffFeature

      @Get(uri="/{type}/feature/{feature}{?lang,build,test,javaVersion,name}", produces="text/plain") public org.reactivestreams.Publisher<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 interface DiffOperations
      Parameters:
      type - The application type
      feature - The feature
      build - The build tool
      test - The test framework
      lang - The lang
      javaVersion - The java version
      requestInfo - The request info
      name - The project name
      Returns:
      A string representing the difference
    • diffApp

      @Get(uri="/{type}/{name}{?features,lang,build,test,javaVersion}", produces="text/plain") public org.reactivestreams.Publisher<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 interface DiffOperations
      Parameters:
      type - The application type
      name - The name of the application
      features - The features
      build - The build tool
      test - The test framework
      lang - The lang
      requestInfo - The request info
      Returns:
      An HTTP response that emits a writable
      Throws:
      IOException