File tree 20 files changed +56
-49
lines changed
springdoc-openapi-starter-common/src
main/java/org/springdoc/core
test/java/org/springdoc/api
springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30
springdoc-openapi-actuator-webflux-tests/src/test/java/test/org/springdoc/api
springdoc-openapi-hateoas-tests/src/test/java/test/org/springdoc/api
20 files changed +56
-49
lines changed Original file line number Diff line number Diff line change 22
22
23
23
package org .springdoc .core .converters ;
24
24
25
+ import java .lang .reflect .ParameterizedType ;
26
+ import java .lang .reflect .Type ;
27
+ import java .util .Iterator ;
28
+
25
29
import com .fasterxml .jackson .databind .JavaType ;
26
30
import io .swagger .v3 .core .converter .AnnotatedType ;
27
31
import io .swagger .v3 .core .converter .ModelConverter ;
28
32
import io .swagger .v3 .core .converter .ModelConverterContext ;
29
33
import io .swagger .v3 .oas .models .media .Schema ;
30
34
import org .apache .commons .lang3 .StringUtils ;
31
35
import org .springdoc .core .providers .ObjectMapperProvider ;
36
+
32
37
import org .springframework .core .ResolvableType ;
33
38
import org .springframework .data .web .PagedModel ;
34
39
35
- import java .lang .reflect .ParameterizedType ;
36
- import java .lang .reflect .Type ;
37
- import java .util .Iterator ;
38
-
39
40
/**
40
41
* The Spring Data Page type model converter.
41
42
*
Original file line number Diff line number Diff line change 30
30
import java .util .LinkedHashMap ;
31
31
import java .util .Locale ;
32
32
import java .util .Map ;
33
+ import java .util .Set ;
34
+ import java .util .stream .Collectors ;
33
35
34
36
import com .fasterxml .jackson .annotation .JsonView ;
35
37
import io .swagger .v3 .oas .models .responses .ApiResponse ;
36
38
import io .swagger .v3 .oas .models .responses .ApiResponses ;
37
- import java .util .Set ;
38
- import java .util .stream .Collectors ;
39
39
import org .apache .commons .lang3 .ArrayUtils ;
40
40
import org .apache .commons .lang3 .StringUtils ;
41
-
42
41
import org .jetbrains .annotations .Nullable ;
42
+
43
43
import org .springframework .core .annotation .AnnotatedElementUtils ;
44
44
import org .springframework .web .bind .annotation .DeleteMapping ;
45
45
import org .springframework .web .bind .annotation .GetMapping ;
Original file line number Diff line number Diff line change 60
60
61
61
import org .springframework .beans .factory .ObjectFactory ;
62
62
import org .springframework .context .ApplicationContext ;
63
+ import org .springframework .mock .http .client .MockClientHttpRequest ;
63
64
import org .springframework .test .util .ReflectionTestUtils ;
64
65
import org .springframework .web .bind .annotation .RequestMethod ;
65
- import org .springframework .mock .http .client .MockClientHttpRequest ;
66
66
67
67
import static java .util .Arrays .asList ;
68
68
import static java .util .Collections .singletonList ;
Original file line number Diff line number Diff line change 20
20
21
21
import org .junit .jupiter .api .Test ;
22
22
import org .springdoc .core .customizers .SpecPropertiesCustomizer ;
23
- import org .springdoc .core .models .GroupedOpenApi ;
24
23
import org .springdoc .core .utils .Constants ;
25
24
import test .org .springdoc .api .v30 .AbstractSpringDocV30Test ;
26
25
27
26
import org .springframework .boot .autoconfigure .SpringBootApplication ;
28
27
import org .springframework .boot .test .context .SpringBootTest ;
29
- import org .springframework .context .annotation .Bean ;
30
28
import org .springframework .test .context .ActiveProfiles ;
31
29
32
30
import static org .hamcrest .Matchers .is ;
Original file line number Diff line number Diff line change 23
23
package test .org .springdoc .api .v30 .app218 ;
24
24
25
25
26
+ import java .net .URI ;
27
+
26
28
import io .swagger .v3 .oas .annotations .Operation ;
27
29
import io .swagger .v3 .oas .annotations .headers .Header ;
28
30
import io .swagger .v3 .oas .annotations .media .Schema ;
29
31
import io .swagger .v3 .oas .annotations .responses .ApiResponse ;
32
+
30
33
import org .springframework .http .HttpHeaders ;
31
34
import org .springframework .web .bind .annotation .GetMapping ;
32
35
import org .springframework .web .bind .annotation .RequestMapping ;
33
36
import org .springframework .web .bind .annotation .RestController ;
34
37
35
- import java .net .URI ;
36
-
37
38
38
39
@ RestController
39
40
@ RequestMapping ("/" )
Original file line number Diff line number Diff line change 19
19
package test .org .springdoc .api .v30 .app218 ;
20
20
21
21
import org .springdoc .core .customizers .SpecPropertiesCustomizer ;
22
+ import test .org .springdoc .api .v30 .AbstractSpringDocV30Test ;
23
+
22
24
import org .springframework .boot .autoconfigure .SpringBootApplication ;
23
25
import org .springframework .boot .test .context .SpringBootTest ;
24
- import test .org .springdoc .api .v30 .AbstractSpringDocV30Test ;
25
26
26
27
/**
27
28
* <p>
Original file line number Diff line number Diff line change 24
24
25
25
package test .org .springdoc .api .v30 .app219 ;
26
26
27
+ import test .org .springdoc .api .v30 .AbstractSpringDocV30Test ;
28
+
27
29
import org .springframework .boot .autoconfigure .SpringBootApplication ;
28
30
import org .springframework .test .context .ActiveProfiles ;
29
- import test .org .springdoc .api .v30 .AbstractSpringDocV30Test ;
30
31
31
32
@ ActiveProfiles ("219" )
32
33
public class SpringDocApp219Test extends AbstractSpringDocV30Test {
Original file line number Diff line number Diff line change 25
25
package test .org .springdoc .api ;
26
26
27
27
import jakarta .annotation .PostConstruct ;
28
- import org .springdoc .core .utils .Constants ;
29
28
30
29
import org .springframework .boot .test .web .server .LocalManagementPort ;
31
30
import org .springframework .test .context .TestPropertySource ;
32
- import org .springframework .test .web .reactive .server .EntityExchangeResult ;
33
31
import org .springframework .web .reactive .function .client .WebClient ;
34
32
35
33
import static org .skyscreamer .jsonassert .JSONAssert .assertEquals ;
Original file line number Diff line number Diff line change 24
24
25
25
import org .springframework .boot .autoconfigure .SpringBootApplication ;
26
26
import org .springframework .boot .test .context .SpringBootTest ;
27
- import org .springframework .test .web .reactive .server .EntityExchangeResult ;
28
-
29
- import static org .skyscreamer .jsonassert .JSONAssert .assertEquals ;
30
27
31
28
32
29
@ SpringBootTest (webEnvironment = SpringBootTest .WebEnvironment .RANDOM_PORT ,
Original file line number Diff line number Diff line change 30
30
31
31
import static org .junit .jupiter .api .Assertions .assertTrue ;
32
32
import static org .junit .jupiter .api .Assertions .fail ;
33
- import static org .skyscreamer .jsonassert .JSONAssert .assertEquals ;
34
33
35
34
36
35
@ SpringBootTest (webEnvironment = WebEnvironment .DEFINED_PORT ,
Original file line number Diff line number Diff line change 27
27
28
28
import org .junit .jupiter .api .Test ;
29
29
import org .springdoc .core .customizers .ActuatorOpenApiCustomizer ;
30
- import org .springdoc .core .customizers .OpenApiCustomizer ;
31
30
import org .springdoc .core .customizers .OperationCustomizer ;
32
31
import org .springdoc .core .models .GroupedOpenApi ;
33
32
import org .springdoc .core .utils .Constants ;
Original file line number Diff line number Diff line change 22
22
23
23
package test .org .springdoc .api .app10 ;
24
24
25
+ import java .util .List ;
26
+
25
27
import org .springframework .data .domain .Page ;
26
28
import org .springframework .data .domain .PageImpl ;
27
29
import org .springframework .data .web .PagedModel ;
28
30
import org .springframework .web .bind .annotation .GetMapping ;
29
31
import org .springframework .web .bind .annotation .RestController ;
30
32
31
- import java .util .List ;
32
-
33
33
@ SuppressWarnings ("rawtypes" )
34
34
@ RestController
35
35
public class HelloController {
Original file line number Diff line number Diff line change 24
24
25
25
import org .junit .jupiter .api .Test ;
26
26
import org .springdoc .core .utils .Constants ;
27
- import org .springframework .boot .SpringBootConfiguration ;
27
+ import test .org .springdoc .api .AbstractSpringDocTest ;
28
+
28
29
import org .springframework .boot .autoconfigure .SpringBootApplication ;
29
30
import org .springframework .data .web .config .EnableSpringDataWebSupport ;
30
- import test .org .springdoc .api .AbstractSpringDocTest ;
31
31
32
32
import static org .hamcrest .Matchers .is ;
33
33
import static org .springframework .test .web .servlet .request .MockMvcRequestBuilders .get ;
34
- import static org .springframework .test .web .servlet .result .MockMvcResultMatchers .*;
34
+ import static org .springframework .test .web .servlet .result .MockMvcResultMatchers .content ;
35
+ import static org .springframework .test .web .servlet .result .MockMvcResultMatchers .jsonPath ;
36
+ import static org .springframework .test .web .servlet .result .MockMvcResultMatchers .status ;
35
37
36
38
public class SpringDocApp10DirectTest extends AbstractSpringDocTest {
37
39
Original file line number Diff line number Diff line change 29
29
import org .junit .jupiter .api .BeforeAll ;
30
30
import org .junit .jupiter .api .Test ;
31
31
import org .springdoc .core .converters .PageOpenAPIConverter ;
32
- import org .springdoc .core .converters .SchemaPropertyDeprecatingConverter ;
33
32
import org .springdoc .core .utils .Constants ;
34
33
import test .org .springdoc .api .AbstractSpringDocTest ;
35
34
Original file line number Diff line number Diff line change 24
24
25
25
import org .junit .jupiter .api .Test ;
26
26
import org .springdoc .core .utils .Constants ;
27
- import org .springframework .boot .SpringBootConfiguration ;
27
+ import test .org .springdoc .api .AbstractSpringDocTest ;
28
+
28
29
import org .springframework .boot .autoconfigure .SpringBootApplication ;
29
- import org .springframework .boot .test .context .TestConfiguration ;
30
30
import org .springframework .data .web .config .EnableSpringDataWebSupport ;
31
- import test .org .springdoc .api .AbstractSpringDocTest ;
32
31
33
32
import static org .hamcrest .Matchers .is ;
34
33
import static org .springframework .test .web .servlet .request .MockMvcRequestBuilders .get ;
35
- import static org .springframework .test .web .servlet .result .MockMvcResultMatchers .*;
34
+ import static org .springframework .test .web .servlet .result .MockMvcResultMatchers .content ;
35
+ import static org .springframework .test .web .servlet .result .MockMvcResultMatchers .jsonPath ;
36
+ import static org .springframework .test .web .servlet .result .MockMvcResultMatchers .status ;
36
37
37
38
public class SpringDocApp10ViaDtoTest extends AbstractSpringDocTest {
38
39
Original file line number Diff line number Diff line change 1
1
package test .org .springdoc .api .app9 ;
2
2
3
+ import java .util .List ;
4
+
3
5
import io .swagger .v3 .oas .models .Components ;
4
6
import io .swagger .v3 .oas .models .OpenAPI ;
5
7
import io .swagger .v3 .oas .models .info .Contact ;
8
10
import io .swagger .v3 .oas .models .media .Schema ;
9
11
import io .swagger .v3 .oas .models .security .SecurityScheme ;
10
12
import io .swagger .v3 .oas .models .tags .Tag ;
11
- import org . springdoc . core . models . GroupedOpenApi ;
13
+
12
14
import org .springframework .context .annotation .Bean ;
13
15
import org .springframework .context .annotation .Configuration ;
14
16
15
- import java .util .List ;
16
-
17
17
@ Configuration
18
18
public class FooConfiguration {
19
19
@ Bean
Original file line number Diff line number Diff line change 18
18
19
19
package test .org .springdoc .api .app9 ;
20
20
21
- import org .springframework .boot .autoconfigure .SpringBootApplication ;
22
21
import test .org .springdoc .api .AbstractSpringDocTest ;
23
22
23
+ import org .springframework .boot .autoconfigure .SpringBootApplication ;
24
+
24
25
public class SpringDocApp9Test extends AbstractSpringDocTest {
25
26
26
27
@ SpringBootApplication
Original file line number Diff line number Diff line change 1
1
package test .org .springdoc .api .app9 .application ;
2
2
3
+ import java .util .List ;
4
+ import java .util .UUID ;
5
+
3
6
import io .swagger .v3 .oas .annotations .Operation ;
4
7
import io .swagger .v3 .oas .annotations .tags .Tag ;
5
8
import lombok .RequiredArgsConstructor ;
6
9
import lombok .extern .slf4j .Slf4j ;
7
- import org .springframework .http .HttpStatus ;
8
- import org .springframework .http .MediaType ;
9
- import org .springframework .web .bind .annotation .*;
10
- import test .org .springdoc .api .app9 .application .dto .ResponseData ;
11
10
import test .org .springdoc .api .app9 .application .dto .FeedResponse ;
11
+ import test .org .springdoc .api .app9 .application .dto .ResponseData ;
12
12
13
- import java .util .List ;
14
- import java .util .UUID ;
13
+ import org .springframework .http .HttpStatus ;
14
+ import org .springframework .http .MediaType ;
15
+ import org .springframework .web .bind .annotation .GetMapping ;
16
+ import org .springframework .web .bind .annotation .PathVariable ;
17
+ import org .springframework .web .bind .annotation .RequestMapping ;
18
+ import org .springframework .web .bind .annotation .ResponseStatus ;
19
+ import org .springframework .web .bind .annotation .RestController ;
15
20
@ Tag (name = "ResponseDataController" )
16
21
@ RestController
17
22
@ RequestMapping (value = "/some-route" , produces = MediaType .APPLICATION_JSON_VALUE )
Original file line number Diff line number Diff line change 1
1
package test .org .springdoc .api .app9 .application .dto ;
2
2
3
+ import java .util .List ;
4
+ import java .util .UUID ;
5
+
3
6
import com .fasterxml .jackson .annotation .JsonProperty ;
4
7
import jakarta .validation .constraints .NotNull ;
5
- import lombok .*;
8
+ import lombok .AccessLevel ;
9
+ import lombok .Builder ;
10
+ import lombok .EqualsAndHashCode ;
11
+ import lombok .Getter ;
6
12
import lombok .experimental .Accessors ;
7
- import org .springframework .hateoas .IanaLinkRelations ;
8
- import org .springframework .hateoas .RepresentationModel ;
9
13
import test .org .springdoc .api .app9 .application .FooController ;
10
14
11
- import java . util . List ;
12
- import java . util . UUID ;
15
+ import org . springframework . hateoas . IanaLinkRelations ;
16
+ import org . springframework . hateoas . RepresentationModel ;
13
17
14
18
import static org .springframework .hateoas .server .mvc .WebMvcLinkBuilder .linkTo ;
15
19
import static org .springframework .hateoas .server .mvc .WebMvcLinkBuilder .methodOn ;
Original file line number Diff line number Diff line change 1
1
package test .org .springdoc .api .app9 .application .dto ;
2
2
3
+ import java .time .LocalDate ;
4
+ import java .util .UUID ;
5
+
3
6
import com .fasterxml .jackson .annotation .JsonProperty ;
4
7
import io .swagger .v3 .oas .annotations .media .Schema ;
5
8
import jakarta .validation .constraints .NotNull ;
6
9
import lombok .Builder ;
7
10
8
- import java .time .LocalDate ;
9
- import java .util .UUID ;
10
-
11
11
@ Builder
12
12
public record ResponseData (
13
13
@ JsonProperty (value = "DATA_ID" , required = true )
You can’t perform that action at this time.
0 commit comments