Skip to content
New issue

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

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

Already on GitHub? # to your account

fix: [DOCSPLAT-2058] Allow params serializer - for arrays #1433

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

lopenchi
Copy link

@lopenchi lopenchi commented Mar 21, 2025

Fixes

  • Allows seralization for query params. Info taken for this forum

Before fix:
/v3/marketing/integrations?ids[]=id1&ids[]=id2

After:
/v3/marketing/integrations?ids=id1&ids=id2

--

Doing this change because it was failing when testing SDK with prism, not sure if it failing when calling API.

For reference this is the code sample used:

const client = require("@sendgrid/client");
client.setApiKey(process.env.SENDGRID_API_KEY);

const queryParams = { ids: ["id1", "id2"] };

const request = {
  url: `/v3/marketing/integrations`,
  method: "DELETE",
  qs: queryParams,
};

client
  .request(request)
  .then(([response, body]) => {
    console.log(response.statusCode);
    console.log(response.body);
  })
  .catch((error) => {
    console.error(error);
  });

Checklist

  • I acknowledge that all my contributions will be made under the project's license
  • I have made a material change to the repo (functionality, testing, spelling, grammar)
  • I have read the Contribution Guidelines and my PR follows them
  • I have titled the PR appropriately
  • I have updated my branch with the main branch
  • I have added tests that prove my fix is effective or that my feature works
  • I have added the necessary documentation about the functionality in the appropriate .md file
  • I have added inline documentation to the code I modified

If you have questions, please file a support ticket.

@lopenchi lopenchi changed the title [DOCSPLAT-1058] Allow params serializer - for arrays [DOCSPLAT-2058] Allow params serializer - for arrays Mar 21, 2025
@lopenchi lopenchi changed the title [DOCSPLAT-2058] Allow params serializer - for arrays fix: [DOCSPLAT-2058] Allow params serializer - for arrays Mar 21, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants