Open konarskis opened 5 months ago
Running into this as well, any luck finding a workaround?
Faced the same, here's the specs example:
/browse-sections:
post:
operationId: browse-sections
requestBody:
content:
application/json:
schema:
required:
- query
- navigation
properties:
query:
type: object
properties:
location:
properties:
id:
type: string
search:
type: string
navigation:
allOf:
- $ref: '#/components/schemas/value.navigation'
- properties:
sort:
allOf:
- $ref: '#/components/schemas/value.sort'
- type: object
properties:
key:
type: string
enum: [ name, description, createDate ]
example: name
order:
type: string
enum: [ ASC, DESC ]
example: 'ASC'
responses:
200:
content:
application/json:
schema:
properties:
results:
type: array
items:
type: object
properties:
section:
$ref: '#/components/schemas/section.browse'
page:
$ref: '#/components/schemas/value.page'
400:
content:
application/json:
schema:
$ref: '#/components/schemas/value.error'
description: Bad content
401:
content:
application/json:
schema:
$ref: '#/components/schemas/value.error'
description: Unauthorized
500:
content:
application/json:
schema:
$ref: '#/components/schemas/value.error'
description: Server error
And this part is generated with dynamic types:
/// Browse sections
@POST('/browse-sections')
Future<dynamic> postBrowseSections({
@Body() dynamic body,
});
Steps to reproduce
Try generating the code with the provided snippet.
Expected results
It's expected that the types will be merged into new types with autogenerated names possibly.
Actual results
Instead, the generated type is just 'dynamic'.
Your OpenApi snippet
Code sample
No response
Logs
No response
Dart version and used packages versions
3.4.3
```console dart run swagger_parser ```18.0
```console dart run swagger_parser ```