File tree Expand file tree Collapse file tree 3 files changed +4
-29
lines changed
models-library/src/models_library/api_schemas_webserver
service-library/src/servicelib/rabbitmq/rpc_interfaces/webserver
services/web/server/src/simcore_service_webserver/products/_controller Expand file tree Collapse file tree 3 files changed +4
-29
lines changed Original file line number Diff line number Diff line change @@ -89,28 +89,6 @@ def _update_json_schema_extra(schema: JsonDict) -> None:
8989 )
9090
9191
92- class ProductBaseUrlRpcGet (BaseModel ):
93- product_name : ProductName
94- base_url : str
95-
96- @staticmethod
97- def _update_json_schema_extra (schema : JsonDict ) -> None :
98- schema .update (
99- {
100- "examples" : [
101- {
102- "product_name" : "osparc" ,
103- "base_url" : "https://osparc.io" ,
104- },
105- ]
106- }
107- )
108-
109- model_config = ConfigDict (
110- json_schema_extra = _update_json_schema_extra ,
111- )
112-
113-
11492class ProductTemplateGet (OutputSchema ):
11593 id_ : Annotated [IDStr , Field (alias = "id" )]
11694 content : str
Original file line number Diff line number Diff line change 11import logging
22
33from models_library .api_schemas_webserver import WEBSERVER_RPC_NAMESPACE
4- from models_library .api_schemas_webserver .products import ProductBaseUrlRpcGet
54from models_library .products import ProductName
65from models_library .rabbitmq_basic_types import RPCMethodName
76from pydantic import TypeAdapter
@@ -25,5 +24,5 @@ async def get_product_base_url(
2524 product_name = product_name ,
2625 )
2726 assert resp # nosec
28- assert isinstance (resp , ProductBaseUrlRpcGet ) # nosec
29- return resp . base_url
27+ assert isinstance (resp , str ) # nosec
28+ return resp
Original file line number Diff line number Diff line change 44from models_library .api_schemas_webserver import WEBSERVER_RPC_NAMESPACE
55from models_library .api_schemas_webserver .products import (
66 CreditResultRpcGet ,
7- ProductBaseUrlRpcGet ,
87)
98from models_library .products import ProductName
109from servicelib .rabbitmq import RPCRouter
@@ -35,9 +34,8 @@ async def get_product_base_url(
3534 app : web .Application ,
3635 * ,
3736 product_name : ProductName ,
38- ) -> ProductBaseUrlRpcGet :
39- base_url : str = await _service .get_product_base_url (app , product_name = product_name )
40- return ProductBaseUrlRpcGet (product_name = product_name , base_url = base_url )
37+ ) -> str :
38+ return await _service .get_product_base_url (app , product_name = product_name )
4139
4240
4341async def _register_rpc_routes_on_startup (app : web .Application ):
You can’t perform that action at this time.
0 commit comments