From 7f148ecdc6548b0f236ec78c9908b4014ba70438 Mon Sep 17 00:00:00 2001 From: Jan Cortiel Date: Thu, 12 Dec 2024 11:58:41 +0100 Subject: [PATCH] #418: Remove Calendar API V1 implementation and related endpoint Eliminated the CalendarApiV1Controller and its associated iCal endpoint from the OpenAPI specification. This marks the removal of deprecated functionality to streamline the codebase and API surface. --- .../controller/CalendarApiV1Controller.java | 28 ------------------- src/main/resources/openapi/ExternalAPI.yaml | 18 ------------ 2 files changed, 46 deletions(-) delete mode 100644 src/main/java/io/redlink/more/data/controller/CalendarApiV1Controller.java diff --git a/src/main/java/io/redlink/more/data/controller/CalendarApiV1Controller.java b/src/main/java/io/redlink/more/data/controller/CalendarApiV1Controller.java deleted file mode 100644 index 94c4820..0000000 --- a/src/main/java/io/redlink/more/data/controller/CalendarApiV1Controller.java +++ /dev/null @@ -1,28 +0,0 @@ -package io.redlink.more.data.controller; - -import io.redlink.more.data.api.app.v1.webservices.CalendarApi; -import io.redlink.more.data.service.CalendarService; -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -@Controller -@RestController -@RequestMapping(value = "/api/v1", produces = MediaType.APPLICATION_JSON_VALUE) -public class CalendarApiV1Controller implements CalendarApi { - - private final CalendarService calendarService; - - public CalendarApiV1Controller(CalendarService calendarService) { - this.calendarService = calendarService; - } - - @Override - public ResponseEntity getStudyCalendar(Long studyId) { - return ResponseEntity.of( - this.calendarService.getICalendarString(studyId) - ); - } -} diff --git a/src/main/resources/openapi/ExternalAPI.yaml b/src/main/resources/openapi/ExternalAPI.yaml index edd8049..b063dfa 100644 --- a/src/main/resources/openapi/ExternalAPI.yaml +++ b/src/main/resources/openapi/ExternalAPI.yaml @@ -97,24 +97,6 @@ paths: '401': $ref: '#/components/responses/UnauthorizedApiKey' - /calendar/studies/{studyId}/calendar.ics: - get: - tags: - - calendar - description: Get study calendar for study as iCal - operationId: getStudyCalendar - parameters: - - $ref: '#/components/parameters/StudyId' - responses: - '200': - description: Successfully returned study calendar - content: - text/calendar: - schema: - type: string - '404': - description: Not found - components: schemas: EndpointDataBulk: