File tree Expand file tree Collapse file tree
openapi-generator-for-spring-test/src/test
java/de/qaware/openapigeneratorforspring/test/app99 Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ package de .qaware .openapigeneratorforspring .test .app99 ;
2+
3+ import io .swagger .v3 .oas .annotations .OpenAPIDefinition ;
4+ import io .swagger .v3 .oas .annotations .info .Info ;
5+ import org .springframework .boot .SpringApplication ;
6+ import org .springframework .boot .autoconfigure .SpringBootApplication ;
7+
8+ @ SpringBootApplication
9+ @ OpenAPIDefinition (
10+ info = @ Info (title = "My own title" )
11+ )
12+ public class App99 {
13+ public static void main (String [] args ) {
14+ SpringApplication .run (App99 .class , args );
15+ }
16+ }
Original file line number Diff line number Diff line change 1+ package de .qaware .openapigeneratorforspring .test .app99 ;
2+
3+ import org .springframework .web .bind .annotation .GetMapping ;
4+ import org .springframework .web .bind .annotation .RestController ;
5+
6+ import java .time .Instant ;
7+
8+ @ RestController
9+ public class App99Controller {
10+
11+ @ GetMapping ("mapping1" )
12+ public Instant mapping1 () {
13+ return null ;
14+ }
15+
16+ @ GetMapping ("mapping2" )
17+ public Instant mapping2 () {
18+ return null ;
19+ }
20+ }
Original file line number Diff line number Diff line change 1+ package de .qaware .openapigeneratorforspring .test .app99 ;
2+
3+ import de .qaware .openapigeneratorforspring .test .AbstractOpenApiGeneratorWebMvcIntTest ;
4+
5+ class App99Test extends AbstractOpenApiGeneratorWebMvcIntTest {
6+
7+ }
Original file line number Diff line number Diff line change 1+ {
2+ "openapi" : " 3.0.1" ,
3+ "info" : {
4+ "title" : " My own title" ,
5+ "version" : " unknown"
6+ },
7+ "paths" : {
8+ "/mapping1" : {
9+ "get" : {
10+ "operationId" : " mapping1" ,
11+ "responses" : {
12+ "200" : {
13+ "$ref" : " #/components/responses/200"
14+ }
15+ }
16+ }
17+ },
18+ "/mapping2" : {
19+ "get" : {
20+ "operationId" : " mapping2" ,
21+ "responses" : {
22+ "200" : {
23+ "$ref" : " #/components/responses/200"
24+ }
25+ }
26+ }
27+ }
28+ },
29+ "components" : {
30+ "responses" : {
31+ "200" : {
32+ "description" : " Default response" ,
33+ "content" : {
34+ "*/*" : {
35+ "schema" : {
36+ "$ref" : " #/components/schemas/string_date-time"
37+ }
38+ }
39+ }
40+ }
41+ },
42+ "schemas" : {
43+ "string_date-time" : {
44+ "type" : " string" ,
45+ "format" : " date-time"
46+ }
47+ }
48+ }
49+ }
You can’t perform that action at this time.
0 commit comments