public class Request extends Model {
public static enum Category {
First, Second, Third
}
public Category category;
}
I seem unable to properly create a Request with a Category in my YAML test fixtures / initial data. I've tried things like:
Request(areq):
category: Request.Category.Third
And several other variations. Nothing really works. The SnakeYAML page gives me some tantalizing hints but I don't see how to properly reference my app's packages. What is the right syntax for this?
Why don't you use just
...
category: Third
SnakeYAML should recognize type of category and convert Third string to Third value of Category enum during object construction.