A bit of a fiddle to support as swagger and the various frameworks deal with these differently, however for any custom functions this is important, another simple solution would be to define all data-types using regexs and use Odin fields to validate data.