You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I made this issue to track what improvements can be introduced to the newly added polymorphism support for dart-dio#12295
Suggestions and help are welcome !
Merge all test schemas into one test schema for better maintainability
I would love for the generator to generate code that adds OneOf support in a type-checkable way. Currently using the OneOf stuff is quite hard to get right and the only way you can iterate is at runtime. For example, if you have a struct my MyOneOfStruct and it has a oneof field that expects A or B, you can pass in C and it will not complain at type check time, but fail at runtime. This makes it a real nightmare to know what to use.
In a similar vein, I'd love if the generatated code hid the types that you shouldn't need to use as an end user, such as the abstract classes, the *AllOf types, etc. These also make it super confusing what you're meant to use (not to mention all the $, $$, _$, etc. classes.
I made this issue to track what improvements can be introduced to the newly added polymorphism support for
dart-dio
#12295Suggestions and help are welcome !
modules/openapi-generator/src/test/resources/3_0/oneof_polymorphism_and_inheritance.yaml
modules/openapi-generator/src/test/resources/3_0/oneOf_primitive.yaml
modules/openapi-generator/src/test/resources/3_0/oneOf.yaml
modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml
json_serializable
createConcreteBuilder
forbuilt_value
serializerApple
, the signature would be:static AppleBuilder createConcreteBuilder() => AppleBuilder();
Fruit
which classApple
inherits from, it would have the signature:static $FruitBuilder createConcreteBuilder() => $FruitBuilder();
@kuhnroyal @agilob @jaumard @josh-burton @amondnet @sbu-WBT @banool
The text was updated successfully, but these errors were encountered: