This is almost certainly a bad idea. Certainly if the ordinal is de-facto persisted (e.g. because someone has bookmarked the URL) - it means that you must always preserve the enum
ordering in future, which may not be obvious to code maintainers down the line.
Why not encode the enum
using myEnumValue.name()
(and decode via ReportTypeEnum.valueOf(s)
) instead?