Skip to content

Commit

Permalink
Attempt to handle generic types
Browse files Browse the repository at this point in the history
  • Loading branch information
bruno-f-cruz committed Jun 12, 2024
1 parent 5c9a44e commit 4b69d34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/DataSchemas/aind_behavior_services/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def enum_schema(self, schema: core_schema.EnumSchema) -> JsonSchemaValue:
result["type"] = "array"

_type = result.get("type", None)
if (self.render_x_enum_names) and (_type != "string") and (_type is not None):
if (self.render_x_enum_names) and (_type != "string"):
result["x-enumNames"] = [screaming_snake_case_to_pascal_case(v.name) for v in schema["members"]]

return result
Expand Down

0 comments on commit 4b69d34

Please sign in to comment.