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

Fields list escaped with %5B and %5D [] #57

Open
clabnet opened this issue May 28, 2024 · 0 comments
Open

Fields list escaped with %5B and %5D [] #57

clabnet opened this issue May 28, 2024 · 0 comments

Comments

@clabnet
Copy link

clabnet commented May 28, 2024

Hi, I still using your package to call Platformatic API to extract only a fields list.

The urls correct are as is:

https://xxxxxxxxxxxxxx/api/gemini/boms/?fields=id&fields=tag&where.plantId.eq=00000008-0000-0000-0000-000000000000&limit=10
https://xxxxxxxxxxxxxx/api/gemini/boms/?limit=10&fields=description&fields=id

The wrong URL are :

https://xxxxxxxxxxxxxx/api/gemini/boms/?fields%5B%5D=id&fields%5B%5D=tag&where.plantId.eq=00000008-0000-0000-0000-000000000000&limit=10
https://xxxxxxxxxxxxxx/api/gemini/boms/?fields%5B%5D=id&fields%5B%5D=item&fields%5B%5D=parent&fields%5B%5D=level&fields%5B%5D=tN&fields%5B%5D=description&fields%5B%5D=descriptionEn&fields%5B%5D=quantity&fields%5B%5D=type&fields%5B%5D=revision&fields%5B%5D=uuid&fields%5B%5D=path&fields%5B%5D=tag&where.plantId.eq=00000008-0000-0000-0000-000000000000&limit=10

The generated client is :

export interface GetQueryParams {
  fields?:
    | 'createdAt'
    | 'description'
    | 'id'
    | 'item'
...

How to remove %5B%5D unused chars from CURL ?

Thanks for your support, regards

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

1 participant