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

Filtering resources does not work with multiple wildcards #47

Open
cwdt opened this issue Mar 24, 2020 · 1 comment
Open

Filtering resources does not work with multiple wildcards #47

cwdt opened this issue Mar 24, 2020 · 1 comment

Comments

@cwdt
Copy link

cwdt commented Mar 24, 2020

Hi,
I'm experimenting with Vulcain and I'm stuck on the following situation.
I have three calls, simplified:

GET /customers
Response:

[
  {
    "id": 1,
    "name": "Foo",
    "settings": "/customer/1/settings"
  }
]

GET /customer/{id}/settings
Response:

{
  "allowed": false,
  "addresses": "/customer/{id}/settings/addresses"
}

GET /customer/{id}/settings/addresses
Response:

[
    {
      "address": "Street 1",
      "city": "Example city"
    }
  ]

When I try to filter the address resource because I want it to only return the city property, the following is not working:
Fields: /*/settings/addresses/*/city.

When I specify the exact address key (i.e. 0) it does work (Fields: /*/settings/addresses/0/city).

Am I missing something?

@dunglas
Copy link
Owner

dunglas commented Apr 3, 2020

It should work, we even have tests for that. Could you try to provide a reproducer (the best would be to add a failing test in this repo, but anything else such as a repo with a Docker Compose config should do the trick)?

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