Bug Report Checklist
Description
The generated dart code is invalid when enums have a default value.
openapi-generator version
Using 7.16, it worked in 7.13, I think it was a regression with pr #21355
OpenAPI declaration file content or url
{
"openapi": "3.1.0",
"info": {
"title": "Simple",
"version": "0.0.1"
},
"paths": {},
"components": {
"schemas": {
"TestItem": {
"properties": {
"productTypeSetting": {
"default": "physical",
"enum": [
"physical",
"service",
"perProduct"
],
"type": "string"
}
},
"type": "object",
"title": "TestItem"
}
}
},
"tags": []
}
Generation Details
Simple command:
openapi-generator generate -i openapi.json -g dart-dio
Steps to reproduce
Run the generation command
Related issues/PRs
#21355
Bug Report Checklist
Description
The generated dart code is invalid when enums have a default value.
openapi-generator version
Using 7.16, it worked in 7.13, I think it was a regression with pr #21355
OpenAPI declaration file content or url
{ "openapi": "3.1.0", "info": { "title": "Simple", "version": "0.0.1" }, "paths": {}, "components": { "schemas": { "TestItem": { "properties": { "productTypeSetting": { "default": "physical", "enum": [ "physical", "service", "perProduct" ], "type": "string" } }, "type": "object", "title": "TestItem" } } }, "tags": [] }Generation Details
Simple command:
openapi-generator generate -i openapi.json -g dart-dioSteps to reproduce
Run the generation command
Related issues/PRs
#21355