We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1e1a8d9 commit 4de6e4eCopy full SHA for 4de6e4e
src/iop/_utils.py
@@ -8,7 +8,7 @@
8
import importlib
9
import json
10
from iop._message import _Message, _PydanticMessage
11
-from dc_schema import get_schema
+from pydantic import TypeAdapter
12
13
class _Utils():
14
@staticmethod
@@ -46,7 +46,8 @@ def register_message_schema(cls):
46
if issubclass(cls,_PydanticMessage):
47
schema = cls.model_json_schema()
48
elif issubclass(cls,_Message):
49
- schema = get_schema(cls)
+ type_adapter = TypeAdapter(cls)
50
+ schema = type_adapter.json_schema()
51
else:
52
raise ValueError("The class must be a subclass of _Message or _PydanticMessage")
53
schema_name = cls.__module__ + '.' + cls.__name__
0 commit comments