We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a5de5c8 commit b3236ceCopy full SHA for b3236ce
1 file changed
app/core/viewset/json_schema_viewset.py
@@ -46,6 +46,12 @@ def get_json_schema(self) -> dict:
46
"translation_fields": set(),
47
}
48
49
+ for schema_field in result["schema"]["properties"].values():
50
+ if "pattern" in schema_field:
51
+ # Remove the pattern as python regex is not well compatible with javaScript regex.
52
+ # TODO: FIXME: Add a compatibility layer for regex patterns.
53
+ schema_field.pop("pattern", None)
54
+
55
if hasattr(serializer_class.Meta, "model") and "properties" in result["schema"]:
56
model_fields = serializer_class.Meta.model._meta.fields
57
model_m2m_fields = serializer_class.Meta.model._meta.many_to_many
0 commit comments