File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed
src/main/java/com/madadipouya/springkafkatest/controller Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change
1
+ package com .madadipouya .springkafkatest .controller ;
2
+
3
+ import io .swagger .v3 .oas .annotations .Hidden ;
4
+ import io .swagger .v3 .oas .annotations .media .Content ;
5
+ import io .swagger .v3 .oas .annotations .media .Schema ;
6
+ import io .swagger .v3 .oas .annotations .responses .ApiResponse ;
7
+ import io .swagger .v3 .oas .annotations .responses .ApiResponses ;
8
+ import java .util .Map ;
9
+ import org .springframework .http .HttpStatus ;
10
+ import org .springframework .http .ResponseEntity ;
11
+ import org .springframework .web .bind .annotation .GetMapping ;
12
+ import org .springframework .web .bind .annotation .RequestMapping ;
13
+ import org .springframework .web .bind .annotation .ResponseStatus ;
14
+ import org .springframework .web .bind .annotation .RestController ;
15
+
16
+ @ RestController
17
+ @ RequestMapping ("/v1/hidden" )
18
+ public class HiddenController {
19
+
20
+ @ GetMapping ("/test" )
21
+ @ ResponseStatus (HttpStatus .OK )
22
+ // Hide the entire endpoint
23
+ @ Hidden
24
+ // Just to hide the response object
25
+ @ ApiResponses (value = {@ ApiResponse (responseCode = "200" , content = @ Content (schema = @ Schema (hidden = true ))) })
26
+ public ResponseEntity <TestResponse > getTestResponse () {
27
+ return ResponseEntity .ok (new TestResponse (Map .of ("key1" , "value1" )));
28
+ }
29
+
30
+ public record TestResponse (Map <String , String > data ) {
31
+
32
+ }
33
+ }
You can’t perform that action at this time.
0 commit comments