Description
I'm using orval 7.9.0 and I have the following component schema:
"components": {
"schemas": {
"TestDto":{
"type":"object",
"required":[
"Foo",
"Bar"
],
"properties":{
"Foo":{
"type":"string"
},
"Bar":{
"nullable":true,
"type":"string"
},
"Foobar":{
"nullable":true,
"type":"string"
}
}
}
}
}
and the generated model with angular
client output is as such:
export interface TestDto {
Foo: string;
/** @nullable */
Bar: string;
/** @nullable */
Foobar?: string;
}
As you can see the Bar and Foobar properties both have the "nullable" comment (but Bar surprisingly isn't nullable nor optional at all) and Foobar is just an optional property.
If I generate with zod
client output I get what I expected:
export interface TestDto {
Foo: string;
/** @nullable */
Bar: string | null;
/** @nullable */
Foobar?: string | null;
}
Is there any specific reason for why angular generation works this way or is it just a bug?