diff --git a/src/main/resources/swagger/api-docs.yaml b/src/main/resources/swagger/api-docs.yaml index 3abb7f5d4..651040aaa 100755 --- a/src/main/resources/swagger/api-docs.yaml +++ b/src/main/resources/swagger/api-docs.yaml @@ -11,7 +11,6 @@ info: servers: - url: / tags: - - name: Billing - name: BillingV2 - name: CromIAM Engine (for Job Manager) - name: CromIAM Workflows (for Admin) @@ -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: @@ -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: @@ -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: @@ -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: diff --git a/src/test/scala/org/broadinstitute/dsde/firecloud/webservice/UserApiServiceSpec.scala b/src/test/scala/org/broadinstitute/dsde/firecloud/webservice/UserApiServiceSpec.scala index f6a0a62dc..8417cea62 100644 --- a/src/test/scala/org/broadinstitute/dsde/firecloud/webservice/UserApiServiceSpec.scala +++ b/src/test/scala/org/broadinstitute/dsde/firecloud/webservice/UserApiServiceSpec.scala @@ -178,8 +178,8 @@ 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) } } @@ -187,12 +187,29 @@ class UserApiServiceSpec extends BaseServiceSpec with SamMockserverUtils "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 {