Handle class fields
Closed this issue · 4 comments
amadare42 commented
Extension should handle fields conversions.
RafaelSalguero commented
Maybe we should put this optional with disabled by default. Do class fields are serialized by default by Newtonsoft.Json?
amadare42 commented
Yes: https://dotnetfiddle.net/T4le5X#
Therefore, I don't think it should be disabled by default because it is actually sent in DTO by default. Anyway, since extension generates invalid typescript code when there are any fields, it should be fixed to handle this case in one way or another.
For example from code
public class Foo {
public int Bar = 42;
public int Baz;
}
this will be generated:
export interface Foo {
public int Bar = 42;
public int Baz;
}
RafaelSalguero commented
I agree, marking this as a bug since generates invalid code
RafaelSalguero commented
Closed with commit c07489a and version 0.0.22