microsoft / microsoft/api-guidelines
Filters: "in" operator
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 23.3k
- Forks
- 2.7k
- PR merge metrics
- No merged PRs in 30d
Description
Frequently, there are filter expressions where the same attribute is compared with multiple values like -
$filter=categoryId eq 'cat1000' or categoryId eq 'cat1001' or categoryId eq 'cat1002'
It is very desirable to write the above as
$filter=categoryId in ['cat1000', 'cat1001', 'cat1002']
This is less verbose and much better for human readability and visual debugging, especially when combining multiple such filter conditions. Eg. $filter=categoryId in ['cat1000', 'cat1001', 'cat1002'] and productId not in ['201', '210'].
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the existing API Guidelines material for filter expressions and related operator conventions. Determine whether the requested in and not in syntax belongs in the guidelines and define the documentation or specification changes needed; done means the proposal has a settled scope and corresponding guidance.
Written by the indexing model from the issue text.
Assessment
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100