Skip to content

createClient() accepts a querySerializer option to set a default serializer #1182

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

Closed
1 task done
psychedelicious opened this issue Jun 24, 2023 · 0 comments · Fixed by #1183
Closed
1 task done

createClient() accepts a querySerializer option to set a default serializer #1182

psychedelicious opened this issue Jun 24, 2023 · 0 comments · Fixed by #1183
Labels
enhancement New feature or request openapi-fetch Relevant to the openapi-fetch library PRs welcome PRs are welcome to solve this issue!

Comments

@psychedelicious
Copy link
Contributor

Description

It'd be nice for createClient() to accept a global querySerializer that is used as the default.

Proposal

  createClient<paths>({
    querySerializer: (q) => queryString.stringify(q, { arrayFormat: 'none' }),
  })

If an individual method provides a querySerializer, it should override the one set when calling createClient().

Checklist

@psychedelicious psychedelicious added enhancement New feature or request PRs welcome PRs are welcome to solve this issue! openapi-fetch Relevant to the openapi-fetch library labels Jun 24, 2023
psychedelicious added a commit to psychedelicious/openapi-typescript that referenced this issue Jun 24, 2023
psychedelicious added a commit to psychedelicious/openapi-typescript that referenced this issue Jun 24, 2023
psychedelicious added a commit to psychedelicious/openapi-typescript that referenced this issue Jun 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request openapi-fetch Relevant to the openapi-fetch library PRs welcome PRs are welcome to solve this issue!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant