-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Codestart customized package and class and more
Fixes #11154
- Loading branch information
Showing
70 changed files
with
979 additions
and
510 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
7 changes: 5 additions & 2 deletions
7
...example/commandmode-example/codestart.yml → ...ts/code/commandmode-example/codestart.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
...commandmode-example/java/src/main/java/{package-name.dir}/{main.class-name}.tpl.qute.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package {package-name}; | ||
|
||
import javax.enterprise.context.control.ActivateRequestContext; | ||
import javax.inject.Inject; | ||
|
||
import io.quarkus.runtime.Quarkus; | ||
import io.quarkus.runtime.QuarkusApplication; | ||
import io.quarkus.runtime.annotations.QuarkusMain; | ||
|
||
@QuarkusMain | ||
public class {main.class-name} implements QuarkusApplication { | ||
|
||
@Override | ||
public int run(String... args) throws Exception { | ||
final String name = args.length > 0 ? String.join(" ", args) : "{greeting.default-name}"; | ||
System.out.println("{greeting.message} " + name); | ||
return 0; | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
...mmandmode-example/kotlin/src/main/kotlin/{package-name.dir}/{main.class-name}.tpl.qute.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package {package-name} | ||
|
||
import javax.inject.Inject | ||
|
||
import io.quarkus.runtime.QuarkusApplication | ||
import io.quarkus.runtime.annotations.QuarkusMain | ||
|
||
@QuarkusMain | ||
class {main.class-name}: QuarkusApplication { | ||
|
||
override fun run(vararg args: String?): Int { | ||
val name = if (args.isNotEmpty()) args.joinToString(",") else "{greeting.default-name}" | ||
println(name) | ||
return 0 | ||
} | ||
|
||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 7 additions & 2 deletions
9
...codestarts/resteasy-example/codestart.yml → ...tarts/code/resteasy-example/codestart.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,16 @@ | ||
name: resteasy-example | ||
ref: resteasy | ||
type: example | ||
type: code | ||
tags: example | ||
language: | ||
base: | ||
data: | ||
rest: | ||
resource: | ||
class-name: ExampleResource | ||
path: "/resteasy/hello" | ||
response: "hello" | ||
package-name: org.acme.resteasy | ||
dependencies: | ||
- io.quarkus:quarkus-resteasy | ||
test-dependencies: | ||
- io.rest-assured:rest-assured |
8 changes: 4 additions & 4 deletions
8
...me/resteasy/ExampleResource.tpl.qute.java → ....dir}/{resource.class-name}.tpl.qute.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
package org.acme.resteasy; | ||
package {package-name}; | ||
|
||
import javax.ws.rs.GET; | ||
import javax.ws.rs.Path; | ||
import javax.ws.rs.Produces; | ||
import javax.ws.rs.core.MediaType; | ||
|
||
@Path("{rest.path}") | ||
public class ExampleResource { | ||
@Path("{resource.path}") | ||
public class {resource.class-name} { | ||
|
||
@GET | ||
@Produces(MediaType.TEXT_PLAIN) | ||
public String hello() { | ||
return "{rest.response}"; | ||
return "{resource.response}"; | ||
} | ||
} |
4 changes: 2 additions & 2 deletions
4
...cme/resteasy/NativeExampleResourceIT.java → ...tive{resource.class-name}IT.tpl.qute.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
package org.acme.resteasy; | ||
package {package-name}; | ||
|
||
import io.quarkus.test.junit.NativeImageTest; | ||
|
||
@NativeImageTest | ||
public class NativeExampleResourceIT extends ExampleResourceTest { | ||
public class Native{resource.class-name}IT extends {resource.class-name}Test { | ||
|
||
// Execute the same tests but in native mode. | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
...acme/resteasy/ExampleResource.tpl.qute.kt → ...me.dir}/{resource.class-name}.tpl.qute.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
package org.acme.resteasy | ||
package {package-name} | ||
|
||
import javax.ws.rs.GET | ||
import javax.ws.rs.Path | ||
import javax.ws.rs.Produces | ||
import javax.ws.rs.core.MediaType | ||
|
||
@Path("{rest.path}") | ||
class ExampleResource { | ||
@Path("{resource.path}") | ||
class {resource.class-name} { | ||
|
||
@GET | ||
@Produces(MediaType.TEXT_PLAIN) | ||
fun hello() = "{rest.response}" | ||
fun hello() = "{resource.response}" | ||
} |
6 changes: 6 additions & 0 deletions
6
...otlin/src/native-test/kotlin/{package-name.dir}/Native{resource.class-name}IT.tpl.qute.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package {package-name} | ||
|
||
import io.quarkus.test.junit.NativeImageTest | ||
|
||
@NativeImageTest | ||
class Native{resource.class-name}IT : {resource.class-name}Test() |
8 changes: 4 additions & 4 deletions
8
.../resteasy/ExampleResourceTest.tpl.qute.kt → ...ir}/{resource.class-name}Test.tpl.qute.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
package org.acme.resteasy | ||
package {package-name} | ||
|
||
import io.quarkus.test.junit.QuarkusTest | ||
import io.restassured.RestAssured.given | ||
import org.hamcrest.CoreMatchers.`is` | ||
import org.junit.jupiter.api.Test | ||
|
||
@QuarkusTest | ||
class ExampleResourceTest { | ||
class {resource.class-name}Test { | ||
|
||
@Test | ||
fun testHelloEndpoint() { | ||
given() | ||
.`when`().get("{rest.path}") | ||
.`when`().get("{resource.path}") | ||
.then() | ||
.statusCode(200) | ||
.body(`is`("{rest.response}")) | ||
.body(`is`("{resource.response}")) | ||
} | ||
|
||
} |
8 changes: 4 additions & 4 deletions
8
...e/resteasy/ExampleResource.tpl.qute.scala → ...dir}/{resource.class-name}.tpl.qute.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
package org.acme.resteasy | ||
package {package-name} | ||
|
||
import javax.ws.rs.\{GET, Path, Produces} | ||
import javax.ws.rs.core.MediaType | ||
|
||
@Path("{rest.path}") | ||
class ExampleResource { | ||
@Path("{resource.path}") | ||
class {resource.class-name} { | ||
|
||
@GET | ||
@Produces(Array[String](MediaType.TEXT_PLAIN)) | ||
def hello() = "{rest.response}" | ||
def hello() = "{resource.response}" | ||
} |
6 changes: 6 additions & 0 deletions
6
...ala/src/native-test/scala/{package-name.dir}/Native{resource.class-name}IT.tpl.qute.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package {package-name} | ||
|
||
import io.quarkus.test.junit.NativeImageTest | ||
|
||
@NativeImageTest | ||
class Native{resource.class-name}IT extends {resource.class-name}Test |
8 changes: 4 additions & 4 deletions
8
...steasy/ExampleResourceTest.tpl.qute.scala → .../{resource.class-name}Test.tpl.qute.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
package org.acme.resteasy | ||
package {package-name} | ||
|
||
import io.quarkus.test.junit.QuarkusTest | ||
import io.restassured.RestAssured.given | ||
import org.hamcrest.CoreMatchers.`is` | ||
import org.junit.jupiter.api.Test | ||
|
||
@QuarkusTest | ||
class ExampleResourceTest { | ||
class {resource.class-name}Test { | ||
|
||
@Test | ||
def testHelloEndpoint() = { | ||
given() | ||
.`when`().get("{rest.path}") | ||
.`when`().get("{resource.path}") | ||
.then() | ||
.statusCode(200) | ||
.body(`is`("{rest.response}")) | ||
.body(`is`("{resource.response}")) | ||
} | ||
|
||
} |
27 changes: 0 additions & 27 deletions
27
...le/commandmode-example/java/src/main/java/org/acme/commandmode/GreetingMain.tpl.qute.java
This file was deleted.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
...commandmode-example/java/src/main/java/org/acme/commandmode/GreetingService.tpl.qute.java
This file was deleted.
Oops, something went wrong.
22 changes: 0 additions & 22 deletions
22
.../commandmode-example/kotlin/src/main/kotlin/org/acme/commandmode/GreetingMain.tpl.qute.kt
This file was deleted.
Oops, something went wrong.
8 changes: 0 additions & 8 deletions
8
...mmandmode-example/kotlin/src/main/kotlin/org/acme/commandmode/GreetingService.tpl.qute.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 4 additions & 2 deletions
6
...latform-descriptor-json/src/main/resources/codestarts/amazon-lambda-example/codestart.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.