Problem sending enums from nodejs

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

Use the enum that’s generated from your ServiceStack Server. Whether the server expects enums as strings or ints will determine what type of enum is generated and what you should send. If you change your configuration you will have to regenerate your DTOs.

[JsonConverter] is not a ServiceStack construct and doesn’t do anything to any of its serializers.