mapbox / mapbox/mapbox-gl-js

Should validator accept same values for an array-enum property?

Open
#8,370 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

api :memo: bug :lady_beetle:
Dominant language
TypeScript
Stars
12.4k
Forks
2.4k
PR merge metrics
No merged PRs in 30d

Description

**mapbox-gl-js version**: 0.54.0

### Question

👋 I'm working on supporting `text-variable-anchor` in Studio, and I noticed that this passed the validator.

![Screen Shot 2019-06-19 at 7 08 36 PM](https://user-images.githubusercontent.com/1590802/59813246-ad95d080-92c5-11e9-885d-a0e42613ec3c.png)

Should the style validator accept same values in an array-enum property? Asking because this feels like a bug, but I also don't know how much leeway is built into the validator for what I would consider low-priority things like this.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the style validator's handling of array-enum properties, the only component identified in the issue. Confirm whether duplicate values should be accepted or rejected, then document the decision and verify that validation behavior matches it.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.