Currently helpers.py contains
_DEFAULT_PRESERVE_NESTED_KEYS = frozenset(
{
"properties",
"inputs",
"outputs",
"default_inputs",
"slider_values",
"distributions",
"output_var_selection",
"project_inputs",
"correlations",
"sobol",
"sobol_second_order",
"predictions",
"grid_data",
"optimization_results",
"metrics",
}
)
Instead, create a common Request / Response Model base which allows input variables (aka parameters) and output variables (aka responses) always getting allocated to the same field, and provide the tooling to NOT modify it; or rather than case being converted at all API points, the flaskapi could take the itis-sumo calls (always snake_case) and form a typed ResponseModel which is camelCase to be sent to the frontend - thus the transformation is explicit and intended. TBD.
Please also see comments in #652
Currently helpers.py contains
_DEFAULT_PRESERVE_NESTED_KEYS = frozenset(
{
"properties",
"inputs",
"outputs",
"default_inputs",
"slider_values",
"distributions",
"output_var_selection",
"project_inputs",
"correlations",
"sobol",
"sobol_second_order",
"predictions",
"grid_data",
"optimization_results",
"metrics",
}
)
Instead, create a common Request / Response Model base which allows input variables (aka parameters) and output variables (aka responses) always getting allocated to the same field, and provide the tooling to NOT modify it; or rather than case being converted at all API points, the flaskapi could take the itis-sumo calls (always snake_case) and form a typed ResponseModel which is camelCase to be sent to the frontend - thus the transformation is explicit and intended. TBD.
Please also see comments in #652