We are auto generating proxies with SwaggerCodeGen https://swagger.io/ .
This will reduce manually typing in hundreds of classes. We noticed all model class properties are Nullable ? in SwaggerCodeGen.
When they wrote this, doesn't it break the interface contract when some members as required? What is the reason SwaggerCodeGen did this? In our same C# corresponding class, they are not nullable.
export interface Product{
productId?: number;
productName?: string;
productType?: number;
manufacturer?: string;
inventory?: number;
Currently converting C# classes to Angular Typescript 10.
Another topic:
Similarly in NSwag Studio,
They are doing this with Union Types undefined, instead of nullable. Is this the same thing as Swagger CodeGen,
export interface Product {
productId: number | undefined;
productName?: string | undefined;
productType?: number | undefined;
manufacturer?: string | undefined;
inventory?: number | undefined;

nullableis set tofalse. See if that generates the TS how you would expect it. I would also try @monkey-0001 answer as well. If that all checks out, then you need to figure out how your api language need to look like so that it gets generated correctly (ie: in c# you might need the[Required]attribute on your model property).