Skip to content

Commit

Permalink
[core][fix] Export property documentation for configs (#2245)
Browse files Browse the repository at this point in the history
  • Loading branch information
aquamatthias authored Oct 16, 2024
1 parent 8626219 commit 4381b4f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion fixcore/fixcore/core_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,7 @@ class EditableConfig(ConfigObject):

def config_model() -> List[Json]:
config_classes = {EditableConfig, CustomCommandsConfig}
return dataclasses_to_fixcore_model(config_classes)
return dataclasses_to_fixcore_model(config_classes, with_prop_description=True)


# Define rules to validate this config
Expand Down
2 changes: 1 addition & 1 deletion fixcore/fixcore/report/report_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,4 @@ def check_allowed(self, check_id: str) -> bool:

def config_model() -> List[Json]:
config_classes = {ReportCheckCollectionConfig, BenchmarkConfig, ReportConfig}
return dataclasses_to_fixcore_model(config_classes, use_optional_as_required=True)
return dataclasses_to_fixcore_model(config_classes, use_optional_as_required=True, with_prop_description=True)
2 changes: 1 addition & 1 deletion fixcore/fixcore/user/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,4 @@ async def users(self) -> Dict[Email, FixInventoryUser]:

def config_model() -> List[Json]:
config_classes: Set[Type[Any]] = {FixInventoryUsersConfig}
return dataclasses_to_fixcore_model(config_classes, use_optional_as_required=True)
return dataclasses_to_fixcore_model(config_classes, use_optional_as_required=True, with_prop_description=True)
2 changes: 1 addition & 1 deletion fixlib/fixlib/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ def __eq__(self, other: Any) -> bool:
def model(self) -> List[Json]:
"""Return the config dataclass model in fixcore format"""
classes = set(_config.classes.values())
return dataclasses_to_fixcore_model(classes, use_optional_as_required=True)
return dataclasses_to_fixcore_model(classes, use_optional_as_required=True, with_prop_description=True)

@staticmethod
def add_args(arg_parser: ArgumentParser) -> None:
Expand Down

0 comments on commit 4381b4f

Please sign in to comment.