You are not logged in.
Pages: 1
How to respond as default with Enumname instead of the Enumindex?
I've found the option TTextWriterOption.twoEnumSetsAsTextInRecord but i don't know how to set this option as default.
Offline
Interface-Based-Service, out-Records containing Enums.
Offline
This is not handled yet at SOA level.
You can have a workaround and use RawJSON as SOA parameter type, and manually serialize your record as JSON, with the proper options to have enumerations as text.
BTW, why do you want enumerations as text?
Offline
We have javascript clients reading and writing enum-names as text.
With current trunk, enum-names, as well as enum-index, as request-paramter are still working, but in the response is the enum-index.
With mORMot-version "mORMot_and_Open_Source_friends_2014-07-02_074115_da7141e88e", Default was enum-name. Using Delphi 2010.
We use the swagger-api to develop the client against. With RawJSON as parameter type we will lose the type-info.
Offline
Pages: 1