{"action":"created","issue":{"url":"https://api.github.com/repos/Sylius/SyliusShopApiPlugin/issues/255","repository_url":"https://api.github.com/repos/Sylius/SyliusShopApiPlugin","labels_url":"https://api.github.com/repos/Sylius/SyliusShopApiPlugin/issues/255/labels{/name}","comments_url":"https://api.github.com/repos/Sylius/SyliusShopApiPlugin/issues/255/comments","events_url":"https://api.github.com/repos/Sylius/SyliusShopApiPlugin/issues/255/events","html_url":"https://github.com/Sylius/SyliusShopApiPlugin/issues/255","id":296656353,"number":255,"title":"Add Product filtering","user":{"login":"GregoireHebert","id":878701,"avatar_url":"https://avatars1.githubusercontent.com/u/878701?v=4","gravatar_id":"","url":"https://api.github.com/users/GregoireHebert","html_url":"https://github.com/GregoireHebert","followers_url":"https://api.github.com/users/GregoireHebert/followers","following_url":"https://api.github.com/users/GregoireHebert/following{/other_user}","gists_url":"https://api.github.com/users/GregoireHebert/gists{/gist_id}","starred_url":"https://api.github.com/users/GregoireHebert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GregoireHebert/subscriptions","organizations_url":"https://api.github.com/users/GregoireHebert/orgs","repos_url":"https://api.github.com/users/GregoireHebert/repos","events_url":"https://api.github.com/users/GregoireHebert/events{/privacy}","received_events_url":"https://api.github.com/users/GregoireHebert/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-02-13T08:50:52Z","updated_at":"2018-02-14T08:26:59Z","closed_at":null,"author_association":"NONE","body":"Sometimes you don't need to get a full collection of products contained in a taxon.\r\nAs an Shop-API user you might need to filter upon the resource attributes.\r\n\r\nI propose to let the user filter directly through it's queries.\r\nThe format would be `?filters[{filterType}][{attribute}]={value}`\r\n\r\nFor any attribute or a custom one:\r\n`GET /shop-api/taxon-products/FRUITS?channel=WEB_FR&filters[boolean][customAttribute]=true`\r\n\r\nIt should be possible to filter onto nested properties\r\n`GET /shop-api/taxon-products/FRUITS?channel=WEB_FR&filters[boolean][variants.shippingRequired]=false`\r\n\r\nI propose to start with a first filter (work done at 80% just a few unit tests to go):\r\n* boolean\r\n\r\nAnd if you like this addition, complete the system by these:\r\n* text\r\n* date\r\n* numeric\r\n* range\r\n* exists\r\n* order\r\n\r\nI propose firstly to implement this for `ShowProductCatalogByTaxonCodeAction` and `ShowProductCatalogByTaxonSlugAction`\r\n\r\nI am currently working on a PR for this.\r\nThe filtering system I am implementing here comes from the work done on [api-platform/core](https://github.com/api-platform/core/tree/master/src/Bridge/Doctrine/Orm/Filter)\r\n\r\nI'll update this when the PR is ready."},"comment":{"url":"https://api.github.com/repos/Sylius/SyliusShopApiPlugin/issues/comments/365530278","html_url":"https://github.com/Sylius/SyliusShopApiPlugin/issues/255#issuecomment-365530278","issue_url":"https://api.github.com/repos/Sylius/SyliusShopApiPlugin/issues/255","id":365530278,"user":{"login":"GregoireHebert","id":878701,"avatar_url":"https://avatars1.githubusercontent.com/u/878701?v=4","gravatar_id":"","url":"https://api.github.com/users/GregoireHebert","html_url":"https://github.com/GregoireHebert","followers_url":"https://api.github.com/users/GregoireHebert/followers","following_url":"https://api.github.com/users/GregoireHebert/following{/other_user}","gists_url":"https://api.github.com/users/GregoireHebert/gists{/gist_id}","starred_url":"https://api.github.com/users/GregoireHebert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GregoireHebert/subscriptions","organizations_url":"https://api.github.com/users/GregoireHebert/orgs","repos_url":"https://api.github.com/users/GregoireHebert/repos","events_url":"https://api.github.com/users/GregoireHebert/events{/privacy}","received_events_url":"https://api.github.com/users/GregoireHebert/received_events","type":"User","site_admin":false},"created_at":"2018-02-14T08:26:59Z","updated_at":"2018-02-14T08:26:59Z","author_association":"NONE","body":"Alright then :)\r\nI'll continue to improve this PR and hopefully change your mind the 26th ;) "}}
{"actor":{"display_login":"GregoireHebert"}}