Hey there I want to generate a client with your amazing package. I encountered a problem with allOf definition where you can have multiple schemas references or even have an in place object there with properties.
So in this case Pet should contain all of props from NewPet and prop id in it.
Pseudocode for visualisation of expected result (in the end it should be freezed generated class)
class Pet {
final int id;
final String name;
final String? tag;
Pet({
required this.id,
required this.name,
this.tag,
})
}
At the moment I don't see support for that. I'm trying to figure out where is the best place to handle dereferencing the allOf + working with in-place schemas. As of now I think SchemaGenerator._writeObject is the place it should be handled but dunno yet.
I'd appreciate any feedback on this problem and maybe some guidance how to make it work ;)
Hey there I want to generate a client with your amazing package. I encountered a problem with
allOf
definition where you can have multiple schemas references or even have an in place object there with properties.You have an example of such schema in petstore-expanded.yaml
So in this case
Pet
should contain all of props fromNewPet
and propid
in it.Pseudocode for visualisation of expected result (in the end it should be freezed generated class)
At the moment I don't see support for that. I'm trying to figure out where is the best place to handle dereferencing the allOf + working with in-place schemas. As of now I think
SchemaGenerator._writeObject
is the place it should be handled but dunno yet.I'd appreciate any feedback on this problem and maybe some guidance how to make it work ;)