Class GitHubCreateController

java.lang.Object
io.micronaut.starter.api.create.github.GitHubCreateController
All Implemented Interfaces:
GitHubCreateOperation

@Controller @ExecuteOn("blocking") @Requires(beans={GitHubCreateService.class,GitHubRedirectService.class}) public class GitHubCreateController extends Object implements GitHubCreateOperation
GitHub create controller.
Since:
2.2
Author:
Pavol Gressa
  • Constructor Details

  • Method Details

    • createApp

      @Get(uri="/github/{type}/{name}{?features,lang,build,test,javaVersion,code,state}", produces="application/json") public io.micronaut.http.HttpResponse<GitHubCreateDTO> createApp(@NonNull @NonNull 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, @Nullable @Nullable String code, @Nullable @Nullable String state, @Nullable @Header("User-Agent") @Nullable String userAgent, @NonNull @NonNull RequestInfo requestInfo)
      Creates an application in GitHub repository, generating a json file as the response.
      Specified by:
      createApp in interface GitHubCreateOperation
      Parameters:
      type - The application type The application type
      name - The name of the application The name of the application
      features - The features The chosen features
      build - The build type (optional, defaults to Gradle)
      test - The test framework (optional, defaults to JUnit)
      lang - The language (optional, defaults to Java)
      javaVersion - The java version
      code - The github code
      Returns:
      A json containing the generated application details.
    • handleCallback

      @Get(uri="/github{?error,error_description}", produces="application/json") public io.micronaut.http.HttpResponse<String> handleCallback(@Nullable @Nullable String error, @Nullable @QueryValue("error_description") @Nullable String errorDescription)
      Endpoint handles GitHub OAuth authorisation errors.
      Parameters:
      error - error code
      errorDescription - description
      Returns:
      Http redirects
      See Also: