From ad14b83446020b75c66dd139aaa9de89215b25d8 Mon Sep 17 00:00:00 2001 From: cp-at-mit Date: Fri, 25 Oct 2024 13:15:29 -0400 Subject: [PATCH] url fix - openAPI github check (#163) * test fix against github action * test * generate spec * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- openapi/specs/v0.yaml | 11 ++++++++++- payments/views/v0/urls.py | 11 +++++++---- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/openapi/specs/v0.yaml b/openapi/specs/v0.yaml index 8f72a675..e69d5f50 100644 --- a/openapi/specs/v0.yaml +++ b/openapi/specs/v0.yaml @@ -349,10 +349,16 @@ paths: schema: $ref: '#/components/schemas/BasketWithProduct' description: '' - /api/v0/payments/baskets/clear/: + /api/v0/payments/baskets/clear/{system_slug}/: delete: operationId: payments_baskets_clear_destroy description: Clears the basket for the current user. + parameters: + - in: path + name: system_slug + schema: + type: string + required: true tags: - payments responses: @@ -553,9 +559,12 @@ components: readOnly: true user: type: integer + integrated_system: + type: integer required: - created_on - id + - integrated_system - updated_on - user OrderHistory: diff --git a/payments/views/v0/urls.py b/payments/views/v0/urls.py index 1755ee4f..acedcc84 100644 --- a/payments/views/v0/urls.py +++ b/payments/views/v0/urls.py @@ -19,9 +19,7 @@ router.register(r"orders/history", OrderHistoryViewSet, basename="orderhistory_api") -router.register( - r"checkout/r''", CheckoutApiViewSet, basename="checkout" -) +router.register(r"checkout", CheckoutApiViewSet, basename="checkout") urlpatterns = [ path( @@ -39,7 +37,12 @@ BackofficeCallbackView.as_view(), name="checkout-callback", ), - re_path("^", include(router.urls)), + re_path( + r"^", + include( + router.urls, + ), + ), path( "checkout/result/", CheckoutCallbackView.as_view(),