Skip to content

Commit

Permalink
remove v1 billing endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
blakery committed Aug 17, 2023
1 parent 6577e87 commit 3229b0c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 222 deletions.
219 changes: 0 additions & 219 deletions src/main/resources/swagger/api-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ info:
servers:
- url: /
tags:
- name: Billing
- name: BillingV2
- name: CromIAM Engine (for Job Manager)
- name: CromIAM Workflows (for Admin)
Expand Down Expand Up @@ -45,38 +44,6 @@ security:
- email
- profile
paths:
/api/billing/{projectId}/members:
get:
tags:
- Billing
summary: List members of billing project the caller owns. Deprecated, use v2 version.
deprecated: true
operationId: listBillingProjectMembers
parameters:
- $ref: '#/components/parameters/billingProjectPathParam'
responses:
200:
description: Success
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/BillingProjectMember'
403:
description: You must be a project owner to view the members of a project
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorReport'
500:
description: FireCloud Internal Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorReport'
x-passthrough: true
x-passthrough-target: rawls
/api/billing/v2/{projectId}/spendReportConfiguration:
get:
tags:
Expand Down Expand Up @@ -183,101 +150,6 @@ paths:
$ref: '#/components/schemas/ErrorReport'
x-passthrough: true
x-passthrough-target: rawls
/api/billing/{projectId}/{workbenchRole}/{email}:
put:
tags:
- Billing
summary: Add user to billing project the caller owns. Deprecated, use v2 version.
deprecated: true
operationId: addUserToBillingProject
parameters:
- $ref: '#/components/parameters/billingProjectPathParam'
- name: workbenchRole
in: path
description: role of user for project
required: true
schema:
type: string
enum:
- user
- owner
- name: email
in: path
description: email of user or group to add
required: true
schema:
type: string
responses:
200:
description: Successfully Added User To Billing Project
content: {}
403:
description: You must be a project owner to add a user to a billing project
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorReport'
404:
description: User not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorReport'
500:
description: FireCloud Internal Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorReport'
x-passthrough: true
x-passthrough-target: rawls
delete:
tags:
- Billing
summary: Remove user from billing project the caller owns. Deprecated, use v2 version.
deprecated: true
operationId: removeUserFromBillingProject
parameters:
- $ref: '#/components/parameters/billingProjectPathParam'
- name: workbenchRole
in: path
description: role of user for project
required: true
schema:
type: string
enum:
- user
- owner
- name: email
in: path
description: email of user or group to remove
required: true
schema:
type: string
responses:
200:
description: Successfully Removed User From Billing Project
content: {}
403:
description: You must be a project owner to add a user to a billing project
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorReport'
404:
description: User not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorReport'
500:
description: FireCloud Internal Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorReport'
x-passthrough: true
x-passthrough-target: rawls
/api/billing/v2:
get:
tags:
Expand Down Expand Up @@ -575,43 +447,6 @@ paths:
'application/json':
schema:
$ref: '#/components/schemas/ErrorReport'
/api/user/billing/{projectName}:
delete:
tags:
- Billing
summary: Delete billing project. Deprecated, use v2 version.
deprecated: true
description: delete billing project
operationId: deleteBillingProjectV2
parameters:
- name: projectName
in: path
description: Name of the billing project
required: true
schema:
type: string
responses:
200:
description: Successfully delete billing project
content: {}
400:
description: Project cannot be deleted because it contains workspaces.
content:
'application/json':
schema:
$ref: '#/components/schemas/ErrorReport'
403:
description: You must be a project owner to delete billing project
content:
'application/json':
schema:
$ref: '#/components/schemas/ErrorReport'
500:
description: Rawls Internal Error
content:
'application/json':
schema:
$ref: '#/components/schemas/ErrorReport'
/api/configurations:
get:
tags:
Expand Down Expand Up @@ -2710,60 +2545,6 @@ paths:
$ref: '#/components/schemas/NotificationType'
x-passthrough: true
x-passthrough-target: rawls
/api/profile/billing:
get:
tags:
- Profile
summary: List billing projects for a user. Deprecated, use v2 billing API.
deprecated: true
operationId: billing
responses:
200:
description: OK
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/BillingProjectMembership'
404:
description: User Not Found
content: {}
500:
description: Internal Server Error
content: {}
x-passthrough: true
x-passthrough-target: rawls
/api/profile/billing/{projectName}:
get:
tags:
- Profile
summary: Billing project status. Deprecated, use v2 billing API.
deprecated: true
description: billing project status
operationId: billingProjectStatus
parameters:
- name: projectName
in: path
description: Name of the billing project
required: true
schema:
type: string
responses:
200:
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/BillingProjectStatus'
404:
description: Project Not Found
content: {}
500:
description: Internal Server Error
content: {}
x-passthrough: true
x-passthrough-target: rawls
/api/profile/billingAccounts:
get:
tags:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,21 +178,38 @@ class UserApiServiceSpec extends BaseServiceSpec with SamMockserverUtils

"when calling GET for user billing service" - {
"MethodNotAllowed response is not returned" in {
Get("/api/profile/billing") ~> dummyUserIdHeaders(uniqueId) ~> sealRoute(userServiceRoutes) ~> check {
log.debug("/api/profile/billing: " + status)
Get("/api/profile/billing/v2") ~> dummyUserIdHeaders(uniqueId) ~> sealRoute(userServiceRoutes) ~> check {
log.debug("/api/profile/billing/v2: " + status)
status shouldNot equal(MethodNotAllowed)
}
}
}

"When calling GET for a valid user billing project" - {
"MethodNotAllowed response is not returned" in {
Get("/api/profile/billing/random-project-name") ~> dummyUserIdHeaders(uniqueId) ~> sealRoute(userServiceRoutes) ~> check {
Get("/api/profile/billing/v2/random-project-name") ~> dummyUserIdHeaders(uniqueId) ~> sealRoute(userServiceRoutes) ~> check {
status shouldNot equal(MethodNotAllowed)
}
}
}

"when calling removed v1 GET in user billing service" - {
"MethodNotAllowed response is not returned" in {
Get("/api/profile/billing") ~> dummyUserIdHeaders(uniqueId) ~> sealRoute(userServiceRoutes) ~> check {
log.debug("/api/profile/billing: " + status)
status shouldEqual MethodNotAllowed
}
}
}

"When calling removed v1 GET for a valid user billing project" - {
"MethodNotAllowed response is not returned" in {
Get("/api/profile/billing/random-project-name") ~> dummyUserIdHeaders(uniqueId) ~> sealRoute(userServiceRoutes) ~> check {
status shouldEqual MethodNotAllowed
}
}
}

"when calling GET for user refresh token date service" - {
"MethodNotAllowed response is not returned" in {
Get("/api/profile/refreshTokenDate") ~> dummyUserIdHeaders(uniqueId) ~> sealRoute(userServiceRoutes) ~> check {
Expand Down

0 comments on commit 3229b0c

Please sign in to comment.