Generate a slice of "valid" values for an enum

Author: jamietannaCreated Aug 11, 2024Updated Sep 7, 2026
Labelsenhancementarea:enums

As a common pattern seen across codebases

Note that we need to make sure the slice is new each time, to make sure it can be modified by a caller.

Source: oapi-codegen/oapi-codegen