Skip to content

Commit

Permalink
[DUOS-1845][risk=no] Deprecate Unused APIs (#1594)
Browse files Browse the repository at this point in the history
* deprecate unused APIs
  • Loading branch information
rushtong authored Jun 3, 2022
1 parent cccef4f commit d86757e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import org.broadinstitute.consent.http.service.ApprovalExpirationTimeService;
import org.broadinstitute.consent.http.service.UserService;

@Deprecated
@Path("api/approvalExpirationTime")
public class ApprovalExpirationTimeResource extends Resource {

Expand All @@ -36,6 +37,7 @@ public ApprovalExpirationTimeResource(ApprovalExpirationTimeService approvalExpi
this.userService = userService;
}

@Deprecated
@POST
@Consumes("application/json")
@Produces("application/json")
Expand All @@ -56,6 +58,7 @@ public Response createdApprovalExpirationTime(
}
}

@Deprecated
@GET
@Produces("application/json")
@RolesAllowed(ADMIN)
Expand All @@ -67,6 +70,7 @@ public Response describeApprovalExpirationTime() {
}
}

@Deprecated
@GET
@Path("/{id}")
@Produces("application/json")
Expand All @@ -81,6 +85,7 @@ public Response describe(@PathParam("id") Integer id) {
}
}

@Deprecated
@PUT
@Path("/{id}")
@Consumes("application/json")
Expand All @@ -102,6 +107,7 @@ public Response update(
}
}

@Deprecated
@DELETE
@Produces(MediaType.APPLICATION_JSON)
@Path("/{id}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ public Response describeElectionByVoteId(@PathParam("voteId") Integer id) {
}
}

@Deprecated
@GET
@Consumes("application/json")
@Produces("application/json")
Expand Down
5 changes: 5 additions & 0 deletions src/main/resources/assets/api-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ security:
paths:
/api/approvalExpirationTime:
get:
deprecated: true
summary: Get the approval expiration time
description: |
Get the approval expiration time. If no existing time exists, a
Expand All @@ -41,6 +42,7 @@ paths:
schema:
$ref: '#/components/schemas/ApprovalExpirationTime'
post:
deprecated: true
summary: Create approval expiration time
description: Create approval expiration time
tags:
Expand All @@ -59,6 +61,7 @@ paths:
description: Bad Request
/api/approvalExpirationTime/{id}:
get:
deprecated: true
summary: Get the approval expiration time
description: Get the approval expiration time
tags:
Expand All @@ -80,6 +83,7 @@ paths:
400:
description: ApprovalExpirationTime not found
put:
deprecated: true
summary: Update approval expiration time
description: Update approval expiration time
tags:
Expand All @@ -104,6 +108,7 @@ paths:
400:
description: Bad Request
delete:
deprecated: true
summary: Delete approval expiration time
description: Delete approval expiration time
tags:
Expand Down

0 comments on commit d86757e

Please sign in to comment.