-
-
Notifications
You must be signed in to change notification settings - Fork 7.2k
Open
Labels
Description
Bug Report Checklist
- [ x ] Have you provided a full/minimal spec to reproduce the issue?
- [ x ] Have you validated the input using an OpenAPI validator?
- [ x ] Have you tested with the latest master to confirm the issue still exists?
- [ x ] Have you searched for related issues/PRs?
- [ x ] What's the actual output vs expected output?
- [Optional] Sponsorship to speed up the bug fix or feature request (example)
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