I have an enumeration class that has a method in the class body, how do I represent this in a UML class diagram? Is the following a valid way? (It seems reasonable but I couldn't find anyone doing this online.)
In UML an enumeration is a classifier, so it can have operations.
As strange as it feels, the compartment with the litterals should be below the compartment with the operations (see UML 2.5 specifications, section 10.2.4, emphasis added by me):
The name of the Enumeration is placed in the upper compartment with the keyword «enumeration» above or before the name. A list of EnumerationLiterals may be placed, one to a line, in a compartment named “literals” below the operations compartment. The attributes and operations compartments may be suppressed, and typically are suppressed and empty.