-
Notifications
You must be signed in to change notification settings - Fork 33
Closed
Description
When I try to pass a list of properties in my configuration:
TABLE_CONFIG__public_mytable__PROPERTIES=["name","type","status"]I get the following error from Pydantic:
table_config.public_mytable.properties
Input should be a valid list [type=list_type, input_value='["name","type","status"]', input_type=str]I believe this is because Pydantic settings only parses JSON in the top-level (as stated in the docs):
JSON is only parsed in top-level fields, if you need to parse JSON in sub-models, you will need to implement validators on those models.
In this case, the values are nested and validated with a TypedDict (see the code). For this to work, the code may need to be refactored to be BaseSettings with a custom validator to handle the parsing...
Metadata
Metadata
Assignees
Labels
No labels