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 4f233f3 commit b858c80Copy full SHA for b858c80
fastapi_sio/asyncapi.py
@@ -34,6 +34,14 @@ def get_asyncapi(
34
handler.model for handler in handlers if handler.model is not None
35
] + [emitter.model for emitter in emitters if emitter.model is not None]
36
37
+ # Check for duplicates in models
38
+ model_names = [model.__name__ for model in used_models]
39
+ duplicates = {name for name in model_names if model_names.count(name) > 1}
40
+ if duplicates:
41
+ raise ValueError(
42
+ f"Cannot generate AsyncAPI documentation due to duplicate models: {', '.join(duplicates)}"
43
+ )
44
+
45
return AsyncAPI(
46
id=AsyncAPIIdentifier(id),
47
info=AsyncAPIInfo(
0 commit comments