aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2020-12-07 18:32:27 +0300
committerGravatar Vitaly Takmazov2020-12-07 18:33:10 +0300
commit8e9b670b272b8f030a1035cb7918e9fc0fea89a5 (patch)
tree79326bdfb119728a3dea37316c555ea2ca638a73 /src/main
parent75b985391dc47d11edc87fee099a85dc30edd386 (diff)
springfox -> springdoc
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/com/juick/www/api/Index.java4
-rw-r--r--src/main/java/com/juick/www/api/Notifications.java10
-rw-r--r--src/main/java/com/juick/www/api/Service.java6
-rw-r--r--src/main/java/com/juick/www/api/webhooks/TelegramWebhook.java4
4 files changed, 12 insertions, 12 deletions
diff --git a/src/main/java/com/juick/www/api/Index.java b/src/main/java/com/juick/www/api/Index.java
index 13807aaa..bafb6758 100644
--- a/src/main/java/com/juick/www/api/Index.java
+++ b/src/main/java/com/juick/www/api/Index.java
@@ -17,13 +17,13 @@
package com.juick.www.api;
+import io.swagger.v3.oas.annotations.Hidden;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.support.ServletUriComponentsBuilder;
-import springfox.documentation.annotations.ApiIgnore;
import java.net.URI;
@@ -33,7 +33,7 @@ import java.net.URI;
@RestController
public class Index {
- @ApiIgnore
+ @Hidden
@RequestMapping(value = { "/api/", "/ws/" }, method = RequestMethod.GET)
public ResponseEntity<Void> description() {
URI redirectUri = ServletUriComponentsBuilder.fromCurrentRequestUri().path("/swagger-ui.html").build().toUri();
diff --git a/src/main/java/com/juick/www/api/Notifications.java b/src/main/java/com/juick/www/api/Notifications.java
index e0326225..76bb4380 100644
--- a/src/main/java/com/juick/www/api/Notifications.java
+++ b/src/main/java/com/juick/www/api/Notifications.java
@@ -29,6 +29,7 @@ import com.juick.service.SubscriptionService;
import com.juick.service.TelegramService;
import com.juick.service.UserService;
import com.juick.service.security.annotation.Visitor;
+import io.swagger.v3.oas.annotations.Hidden;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
@@ -38,7 +39,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
-import springfox.documentation.annotations.ApiIgnore;
import javax.inject.Inject;
import java.util.Collections;
@@ -82,7 +82,7 @@ public class Notifications {
return user;
}
- @ApiIgnore
+ @Hidden
@RequestMapping(value = "/api/notifications", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<List<User>> doGet(
@Visitor User visitor,
@@ -117,7 +117,7 @@ public class Notifications {
}
}
- @ApiIgnore
+ @Hidden
@RequestMapping(value = "/api/notifications", method = RequestMethod.DELETE, produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<Status> doDelete(
@Visitor User visitor,
@@ -143,7 +143,7 @@ public class Notifications {
return ResponseEntity.ok(Status.OK);
}
- @ApiIgnore
+ @Hidden
@RequestMapping(value = "/api/notifications/delete", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<Status> doDeleteTokens(
@Visitor User visitor,
@@ -170,7 +170,7 @@ public class Notifications {
return ResponseEntity.ok(Status.OK);
}
- @ApiIgnore
+ @Hidden
@RequestMapping(value = "/api/notifications", method = RequestMethod.PUT, produces = MediaType.APPLICATION_JSON_VALUE)
public Status doPut(
@Visitor User visitor,
diff --git a/src/main/java/com/juick/www/api/Service.java b/src/main/java/com/juick/www/api/Service.java
index 67e2fd01..8b18b125 100644
--- a/src/main/java/com/juick/www/api/Service.java
+++ b/src/main/java/com/juick/www/api/Service.java
@@ -30,6 +30,7 @@ import com.juick.service.MessagesService;
import com.juick.service.UserService;
import com.juick.service.component.AccountVerificationEvent;
import com.juick.service.security.annotation.Visitor;
+import io.swagger.v3.oas.annotations.Hidden;
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.RandomStringUtils;
@@ -47,7 +48,6 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.context.request.async.AsyncRequestTimeoutException;
import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;
-import springfox.documentation.annotations.ApiIgnore;
import javax.inject.Inject;
import javax.mail.Session;
@@ -85,7 +85,7 @@ public class Service {
private final Session session = Session.getDefaultInstance(new Properties());
- @ApiIgnore
+ @Hidden
@PostMapping("/api/mail")
@ResponseStatus(value = HttpStatus.OK)
public void processMail(@Visitor User current, InputStream data) throws Exception {
@@ -178,7 +178,7 @@ public class Service {
throw new HttpForbiddenException();
}
}
- @ApiIgnore
+ @Hidden
@PostMapping("/api/mail/unsubscribe")
@ResponseStatus(value = HttpStatus.OK)
public void processMailUnsubscribe(@Visitor User current, InputStream data) throws Exception {
diff --git a/src/main/java/com/juick/www/api/webhooks/TelegramWebhook.java b/src/main/java/com/juick/www/api/webhooks/TelegramWebhook.java
index 590db060..a3cc2791 100644
--- a/src/main/java/com/juick/www/api/webhooks/TelegramWebhook.java
+++ b/src/main/java/com/juick/www/api/webhooks/TelegramWebhook.java
@@ -20,6 +20,7 @@ package com.juick.www.api.webhooks;
import com.juick.TelegramBotManager;
import com.pengrad.telegrambot.BotUtils;
import com.pengrad.telegrambot.model.Update;
+import io.swagger.v3.oas.annotations.Hidden;
import org.apache.commons.io.IOUtils;
import org.apache.commons.text.StringEscapeUtils;
import org.slf4j.Logger;
@@ -30,7 +31,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
-import springfox.documentation.annotations.ApiIgnore;
import javax.inject.Inject;
import java.io.InputStream;
@@ -39,7 +39,7 @@ import java.nio.charset.StandardCharsets;
/**
* Created by vt on 24/11/2016.
*/
-@ApiIgnore
+@Hidden
@RestController
@ConditionalOnProperty({"telegram_token"})
public class TelegramWebhook {