Skip to content

Commit c8121ca

Browse files
committed
starting with E2E
1 parent 63053ce commit c8121ca

2 files changed

Lines changed: 48 additions & 0 deletions

File tree

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
package com.foo.rest.examples.spring.openapi.v3.namedexample
2+
3+
import org.springframework.boot.SpringApplication
4+
import org.springframework.boot.autoconfigure.SpringBootApplication
5+
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration
6+
import org.springframework.http.ResponseEntity
7+
import org.springframework.web.bind.annotation.GetMapping
8+
import org.springframework.web.bind.annotation.RequestBody
9+
import org.springframework.web.bind.annotation.RequestMapping
10+
import org.springframework.web.bind.annotation.RequestParam
11+
import org.springframework.web.bind.annotation.RestController
12+
import javax.ws.rs.QueryParam
13+
14+
@SpringBootApplication(exclude = [SecurityAutoConfiguration::class])
15+
@RequestMapping(path = ["/api/namedexample"])
16+
@RestController
17+
open class NamedExampleApplication {
18+
19+
20+
companion object {
21+
@JvmStatic
22+
fun main(args: Array<String>) {
23+
SpringApplication.run(NamedExampleApplication::class.java, *args)
24+
}
25+
}
26+
27+
28+
@GetMapping
29+
open fun get(
30+
@QueryParam("q0") q0: String?,
31+
@QueryParam("q1") q1: String?,
32+
@QueryParam("q2") q2: String?,
33+
@QueryParam("q3") q3: String?,
34+
@QueryParam("q4") q4: String?,
35+
@RequestBody dto: NamedExampleDto
36+
) : ResponseEntity<String> {
37+
38+
//on purpose do nothing with input... should still be selected in test suites due to BB coverage
39+
40+
return ResponseEntity.ok("Hello World!!!")
41+
}
42+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
package com.foo.rest.examples.spring.openapi.v3.namedexample
2+
3+
class NamedExampleDto {
4+
5+
var data : String? = null
6+
}

0 commit comments

Comments
 (0)