Skip to content
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

Question (Bug?): Query multi values #1788

Closed
florianbepunkt opened this issue Mar 6, 2025 · 2 comments
Closed

Question (Bug?): Query multi values #1788

florianbepunkt opened this issue Mar 6, 2025 · 2 comments

Comments

@florianbepunkt
Copy link

We're generating a client from an eBay OpenAPI spec (https://developer.ebay.com/api-docs/master/sell/finances/openapi/3/sell_finances_v1_oas3.json).

This gives us the desired method:

getTransactions({
            baseUrl: "https://apiz.ebay.com/sell/finances/v1",
            fetch: signedFetch,
            query: {
              filter: `transactionDate:[${period.start.toISOString()}..${period.end.toISOString()}]`,
              limit: `${limit}`,
              offset: `${offset}`,
            },
          })

However the eBay API allows for multiple filters to be set.

So in a GET URL this would be DOMAIN.com?filter=filterA&filter=filterB.

But these multi query params do not translate to the generated client. I can't specify an array for filter, so unsure what to do.

@mrlubos
Copy link
Member

mrlubos commented Mar 6, 2025

@florianbepunkt looking at the filter query parameter in the provided spec, they define it as a string, so the generated code matches that. If you know that's not right, you'd currently need to pass an array and ignore any compiler errors. Long-term, we might want to allow people to patch specs, but that's not currently possible, the responsibility is on the provider to correctly describe their API

@florianbepunkt
Copy link
Author

Understood, thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants