[dart][dart-dio-next] Models referenced in form parameters don't get generated
Created by: ahmednfwela
Description
Models referenced in form parameters don't get generated
openapi-generator version
5.2.0
OpenAPI declaration file content or url
Partial endpoint declaration (model name is ReqFileDesc
):
"/v1.0/Api/Files/UploadFiles": {
"post": {
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"files": {
"type": "array",
"items": {
"type": "string",
"format": "binary"
}
},
"fileDesc": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ReqFileDesc"
}
}
}
},
"encoding": {
"files": {
"style": "form"
},
"fileDesc": {
"style": "form"
}
}
}
}
},
}
},
ReqFileDesc
model:
"ReqFileDesc": {
"type": "object",
"properties": {
"friendlyName": {
"type": "string",
"nullable": true
},
"desc": {
"type": "string",
"nullable": true
}
},
"additionalProperties": false
},
Generation Details
The generated api file correctly imports the model file (at src/model/req_file_desc.dart
), however the model file itself (src/model/req_file_desc.dart
) is not generated and doesn't exist
Suggest a fix
the generator should generate all schemas included in the definition (even if they are not being referenced in the api)