Because of the for loop following code line is error prone and caused a panic on one of my files:
https://github.com/deepmap/oapi-codegen/blob/master/pkg/codegen/schema.go#L258
I would suggest to check if the type assertions was successful like:
for i, enumValue := range schema.Enum {
if s, ok := enumValue.(string); ok {
enumValues[i] = s
}
}