Right now the generator will see the following and generate a Cowstr that isn't validated to be one of the possible closed values instead of a type safe enum.
"sortBy": {
"type": "string",
"enum": ["newest", "oldest", "top"],
"default": "newest"
}
It would be a major improvement to change this behaviour.
Looking deeper I see that an unreleased commit did some implementation for knownValues, however this does not seem to lead to an open enum generation on query types, and possibly procedures too. It also is still not quite ideal as it's an open enum instead of a closed one.