Skip to content

support weighted enums #130

@tommyers-elastic

Description

@tommyers-elastic

there are a few cases where we want enums with particular weights, and the only way to achieve this currently is by using repetition. (e.g. https://github.com/elastic/integrations/pull/8442/files#r1389790022)

e.g.

["50", "50", "50", "50", "50", "30", "30", "30", "20", "20"] 

a possible notation for this would be a weighting config field, which would be an ordered list with the same length as the enum, where the sum of the values is 1.

e.g.

name: number
    enum: ["50", "30", "20"]
    weights: [0.5, 0.3, 0.2]

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions