@Controller
@ExecuteOn(value="io")
@Requires(beans={GitHubCreateService.class,GitHubRedirectService.class})
public class GitHubCreateController
extends java.lang.Object
implements GitHubCreateOperation
| Constructor and Description |
|---|
GitHubCreateController(GitHubCreateService gitHubCreateService,
GitHubRedirectService redirectService) |
| Modifier and Type | Method and Description |
|---|---|
io.micronaut.http.HttpResponse<GitHubCreateDTO> |
createApp(ApplicationType type,
@Pattern(regexp="[\\w\\d-_\\.]+") java.lang.String name,
java.util.List<java.lang.String> features,
BuildTool build,
TestFramework test,
Language lang,
JdkVersion javaVersion,
java.lang.String code,
java.lang.String state,
java.lang.String userAgent,
RequestInfo requestInfo)
Creates an application in GitHub repository, generating a json file as the response.
|
io.micronaut.http.HttpResponse<java.lang.String> |
handleCallback(java.lang.String error,
java.lang.String errorDescription)
Endpoint handles GitHub OAuth authorisation errors.
|
public GitHubCreateController(GitHubCreateService gitHubCreateService, GitHubRedirectService redirectService)
@Get(uri="/github/{type}/{name}{?features,lang,build,test,javaVersion,code,state}",
produces="application/json")
public io.micronaut.http.HttpResponse<GitHubCreateDTO> createApp(@NonNull
ApplicationType type,
@Pattern(regexp="[\\w\\d-_\\.]+")
@Pattern(regexp="[\\w\\d-_\\.]+") java.lang.String name,
@Nullable
java.util.List<java.lang.String> features,
@Nullable
BuildTool build,
@Nullable
TestFramework test,
@Nullable
Language lang,
@Nullable
JdkVersion javaVersion,
@Nullable
java.lang.String code,
@Nullable
java.lang.String state,
@Nullable @Header(value="User-Agent")
java.lang.String userAgent,
@NonNull
RequestInfo requestInfo)
createApp in interface GitHubCreateOperationtype - The application type The application typename - The name of the application The name of the applicationfeatures - The features The chosen featuresbuild - 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 versioncode - The github code@Get(uri="/github{?error,error_description}",
produces="application/json")
public io.micronaut.http.HttpResponse<java.lang.String> handleCallback(@Nullable
java.lang.String error,
@Nullable @QueryValue(value="error_description")
java.lang.String errorDescription)
error - error codeerrorDescription - description