OpenFactory Applications Schemas#
Pydantic schemas for validating OpenFactory Application definitions.
- class openfactory.schemas.apps.OpenFactoryApp(**data)[source]#
Bases:
BaseModelOpenFactory Application Schema.
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class openfactory.schemas.apps.OpenFactoryAppsConfig(**data)[source]#
Bases:
BaseModelOpenFactory Applications Configuration Schema.
-
apps:
Dict[str,OpenFactoryApp]#
- property apps_dict#
Dictionary with all configured OpenFactory applications.
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
apps:
- openfactory.schemas.apps.get_apps_from_config_file(apps_yaml_config_file, uns_schema)[source]#
Load, validate, and enrich OpenFactory application configurations from a YAML file using UNS metadata.
This function reads a YAML file containing OpenFactory application definitions, validates its content using the
OpenFactoryAppsConfigPydantic model, and augments each validated application entry with Unified Namespace (UNS) metadata derived from the provided schema.- Return type:
- Parameters:
- Returns:
Optional[Dict[str, OpenFactoryApp]] –
- A dictionary of validated and enriched application configurations,
or None if validation fails.
Note
In case of validation errors, user notifications will be triggered and None will be returned.