Hi
I’m sending an enum from nodejs using service stack lib to service stack server.
The enum appears to come as default (first one) and not the actual value.
this doesn’t help:
JsConfig.TreatEnumAsInteger = false / true;
this also doesnt helps…
[JsonConverter(typeof(JsonStringEnumConverter))]
the basic code is:
public enum WebProfile
{
UNKNOWN = 0,
GOOGLE = 1
}
public class UploadFileDirectRequest : BaseRequest, IReturnVoid
{
public WebProfile WebProfile { get; set; }
}
//the d.tos code
export class UploadFileDirectRequest
{
public webProfile:WebProfile;
}
export enum WebProfile
{
UNKNOWN = 'UNKNOWN',
GOOGLE = 'GOOGLE',
}
How can I pass the enum correctly to SS server?
Thanks