File tree Expand file tree Collapse file tree 3 files changed +8
-5
lines changed
packages/common-library/src/common_library
services/payments/src/simcore_service_payments Expand file tree Collapse file tree 3 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 11from typing import Annotated , TypeAlias
22
3- from pydantic import AfterValidator , AnyHttpUrl
3+ from pydantic import AfterValidator , AnyHttpUrl , HttpUrl
44
55
66def _strip_last_slash (url : str ) -> str :
@@ -10,3 +10,6 @@ def _strip_last_slash(url: str) -> str:
1010AnyHttpUrlLegacy : TypeAlias = Annotated [
1111 str , AnyHttpUrl , AfterValidator (_strip_last_slash )
1212]
13+
14+
15+ HttpUrlLegacy : TypeAlias = Annotated [str , HttpUrl , AfterValidator (_strip_last_slash )]
Original file line number Diff line number Diff line change 11from functools import cached_property
22
3+ from common_library .pydantic_networks_extension import HttpUrlLegacy
34from models_library .basic_types import NonNegativeDecimal
45from pydantic import (
56 AliasChoices ,
67 EmailStr ,
78 Field ,
8- HttpUrl ,
99 PositiveFloat ,
1010 SecretStr ,
1111 TypeAdapter ,
@@ -65,7 +65,7 @@ class ApplicationSettings(_BaseApplicationSettings):
6565 These settings includes extra configuration for the http-API
6666 """
6767
68- PAYMENTS_GATEWAY_URL : HttpUrl = Field (
68+ PAYMENTS_GATEWAY_URL : HttpUrlLegacy = Field (
6969 ..., description = "Base url to the payment gateway"
7070 )
7171
@@ -125,7 +125,7 @@ class ApplicationSettings(_BaseApplicationSettings):
125125 json_schema_extra = {"auto_default_from_env" : True },
126126 )
127127
128- PAYMENTS_STRIPE_URL : HttpUrl = Field (
128+ PAYMENTS_STRIPE_URL : HttpUrlLegacy = Field (
129129 ..., description = "Base url to the payment Stripe"
130130 )
131131 PAYMENTS_STRIPE_API_SECRET : SecretStr = Field (
Original file line number Diff line number Diff line change 1212from contextlib import suppress
1313
1414import httpx
15+ from common_library .errors_classes import OsparcErrorMixin
1516from fastapi import FastAPI
1617from fastapi .encoders import jsonable_encoder
1718from httpx import URL , HTTPStatusError
1819from models_library .api_schemas_webserver .wallets import PaymentID , PaymentMethodID
19- from models_library .error_classes import OsparcErrorMixin
2020from pydantic import TypeAdapter , ValidationError
2121from servicelib .fastapi .app_state import SingletonInAppStateMixin
2222from servicelib .fastapi .http_client import (
You can’t perform that action at this time.
0 commit comments