From b018825dc40e2b0a2d0e242bcf88ed4d6253a488 Mon Sep 17 00:00:00 2001 From: Umang Budhwar Date: Tue, 26 Jan 2021 20:36:04 +0530 Subject: [PATCH] BAEL-4710 - Hiding endpoints using @Hidden (#10431) * Added code for checking if a class is abstract or not. * Renamed test name as per review comments. * BAEL-4695 - Added code to evaluate math expressions. * BAEL-4695 - Added test case for math function. * BAEL-4695 Added consistent examples and entry in parent pom. * BAEL-4695 - Added more examples * BAEL-4710 - Hiding endpoints using @Hidden --- .../controller/RegularRestController.java | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 spring-boot-modules/spring-boot-springdoc/src/main/java/com/baeldung/springdoc/controller/RegularRestController.java diff --git a/spring-boot-modules/spring-boot-springdoc/src/main/java/com/baeldung/springdoc/controller/RegularRestController.java b/spring-boot-modules/spring-boot-springdoc/src/main/java/com/baeldung/springdoc/controller/RegularRestController.java new file mode 100644 index 0000000000..f3135229d6 --- /dev/null +++ b/spring-boot-modules/spring-boot-springdoc/src/main/java/com/baeldung/springdoc/controller/RegularRestController.java @@ -0,0 +1,31 @@ +package com.baeldung.springdoc.controller; + +import java.time.LocalDate; +import java.time.LocalTime; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +import io.swagger.v3.oas.annotations.Hidden; + +@Hidden +@RestController +public class RegularRestController { + + @Hidden + @GetMapping("/getAuthor") + public String getAuthor() { + return "Umang Budhwar"; + } + + @GetMapping("/getDate") + public LocalDate getDate() { + return LocalDate.now(); + } + + @GetMapping("/getTime") + public LocalTime getTime() { + return LocalTime.now(); + } + +}