-
-
Notifications
You must be signed in to change notification settings - Fork 7k
[REQ] [dart-dio] Further improvements to polymorphism support #13372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
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 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 |
to add oneOf type check support, you would need the language to have union types dart-lang/language#1222 |
the abstract classes are intended to be used by the end user the QoL function I am suggesting is to make the user not need the $ classes |
|
Uh oh!
There was an error while loading. Please reload this page.
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: