swagger_parser icon indicating copy to clipboard operation
swagger_parser copied to clipboard

Incorrect model name in the client method return type for oneOf

Open cheymos opened this issue 4 months ago • 1 comments

Steps to reproduce

dart run swagger_parser

Expected results

The return type of the client method uses ModelNameSealed for oneOf.

Actual results

The return type of the client method uses the non-existent ModelNameUnion for oneOf.

Your OpenApi snippet

Code sample

Code sample
[Paste your code here]

Logs

Logs
[Paste your logs here]

Dart version and used packages versions

Dart version
3.9.2
Packages version
1.34.0

cheymos avatar Oct 26 '25 19:10 cheymos

Same problem, any update?

N39r19 avatar Nov 10 '25 10:11 N39r19

Can you elaborate on why you expect the Sealed prefix? I'm assuming the Union suffix was defined to avoid name clashes with any existing names in the schema.

Peetee06 avatar Nov 19 '25 10:11 Peetee06