Skip to content

Commit

Permalink
fix: forward module config type for union types in json export
Browse files Browse the repository at this point in the history
  • Loading branch information
makkus committed Dec 19, 2023
1 parent fd1bab0 commit a4c1d57
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/kiara/interfaces/python_api/models/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -740,9 +740,13 @@ def from_config_class(
config_values = {}
for field_name, details in fields.items():

type_str = "-- n/a --"
type_str = "unknown"
if "type" in details.keys():
type_str = details["type"]
elif "anyOf" in details.keys():
type_str = f"anyOf: {details['anyOf']}"
elif "allOf" in details.keys():
type_str = f"allOf: {details['allOf']}"

desc = details.get("description", DEFAULT_NO_DESC_VALUE)
default = config_cls.model_fields[field_name].default
Expand Down

0 comments on commit a4c1d57

Please sign in to comment.