Skip to content

Commit

Permalink
do not camelcase xcom entries (apache#42182) (apache#42187)
Browse files Browse the repository at this point in the history
(cherry picked from commit 70e9852)

Co-authored-by: Brent Bovenzi <[email protected]>
  • Loading branch information
jscheffl and bbovenzi authored Sep 11, 2024
1 parent 0d443e3 commit e36a64d
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions airflow/www/static/js/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,14 @@ axios.interceptors.request.use((config) => {
return config;
});

axios.interceptors.response.use((res: AxiosResponse) =>
res.data ? camelcaseKeys(res.data, { deep: true }) : res
);
// Do not camelCase xCom entry results
axios.interceptors.response.use((res: AxiosResponse) => {
const stopPaths = [];
if (res.config.url?.includes("/xcomEntries/")) {
stopPaths.push("value");
}
return res.data ? camelcaseKeys(res.data, { deep: true, stopPaths }) : res;
});

axios.defaults.headers.common.Accept = "application/json";

Expand Down

0 comments on commit e36a64d

Please sign in to comment.