OpenAPITools / OpenAPITools/openapi-generator
[REQ] [dart-dio] Further improvements to polymorphism support
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
I made this issue to track what improvements can be introduced to the newly added polymorphism support for dart-dio https://github.com/OpenAPITools/openapi-generator/pull/12295
Suggestions and help are welcome !
- Merge all test schemas into one test schema for better maintainability
modules/openapi-generator/src/test/resources/3_0/oneof_polymorphism_and_inheritance.yamlmodules/openapi-generator/src/test/resources/3_0/oneOf_primitive.yamlmodules/openapi-generator/src/test/resources/3_0/oneOf.yaml- should be merged with:
modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml - into a new test schema specific for dart
- Add polymorphism support to
json_serializable - Add a new QoL method inside generated classes called
createConcreteBuilderforbuilt_valueserializer- so for example if you have class
Apple, the signature would be:
static AppleBuilder createConcreteBuilder() => AppleBuilder(); - if you have class
Fruitwhich classAppleinherits from, it would have the signature:
static $FruitBuilder createConcreteBuilder() => $FruitBuilder();
- so for example if you have class
- Implement MonoRepo structure for https://github.com/Bdaya-Dev/dart-oneof and write CD to auto deploy the package to pub.dev on each new release
- Auto assign discriminator type on serialization based on type (PR https://github.com/OpenAPITools/openapi-generator/pull/14291)
@kuhnroyal @agilob @jaumard @josh-burton @amondnet @sbu-WBT @banool
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the dart-dio polymorphism support introduced by PR #12295 and the listed schemas under modules/openapi-generator/src/test/resources/3_0/. Choose one unchecked item and first run the related dart-dio tests, if available. Done means the selected improvement is implemented with updated schema or generated-code coverage; the issue does not define a single acceptance scope for all items.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart, openapi
- Domain
- api, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100