Skip to content

Post Proxy Camel Casing #226

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion src/baseClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,15 @@ export abstract class ApiClient {
};

if (method !== 'get' && body !== undefined) {
req.body = JSON.stringify(parseBody(body));
/* eslint-disable-next-line no-console */
console.warn(
'WARNING: Starting from the next minor version, request bodies will no longer be automatically converted to snake_case. Please ensure the correct format of the request body to avoid any breaking changes.'
);
const reqBody = {
...body,
...parseBody(body),
};
req.body = JSON.stringify(reqBody);
}
return { req: req, url: url.toString() };
}
Expand Down