Skip to content

Commit

Permalink
do not camelcase xcom entries (#42182)
Browse files Browse the repository at this point in the history
  • Loading branch information
bbovenzi authored Sep 11, 2024
1 parent 0d4b00a commit 70e9852
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 70e9852

Please sign in to comment.