We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The attached example demonstrates the problem.
It contains two classes (Obj1 and Obj2). Both have the same mode property.
Obj1
Obj2
mode
In the class Obj1 this results in the property
Set<Obj1ModeEnum> mode;
while in the class Obj2 the property looks like this:
Set<ModeEnum> mode;
Here I would expect Set<Obj2ModeEnum> mode;.
Set<Obj2ModeEnum> mode;
In the file obj1.dart the associated type is
obj1.dart
class Obj2ModeEnum { /// Instantiate a new enum with the provided [value]. const Obj2ModeEnum._(this.value); ...
Here I would expect Obj1ModeEnum.
Obj1ModeEnum
In the file obj2.dart the corresponding type is correct (but duplicate, since it's in obj1.dart already):
obj2.dart
openapi-generator-cli 7.6.0 commit : ab7d0cb built : -999999999-01-01T00:00:00+18:00 source : https://github.com/openapitools/openapi-generator docs : https://openapi-generator.tech/
{ "openapi": "3.0.1", "info": { "title": "api_test", "version": "1.0.0" }, "paths": {}, "components": { "schemas": { "Obj1": { "type": "object", "properties": { "mode": { "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": [ "mode1", "mode2", "mode3" ] } } } }, "Obj2": { "type": "object", "properties": { "mode": { "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": [ "mode1", "mode2", "mode3" ] } } } } } } }
I'm using the following command:
openapi-generator generate -g dart -i spapi.json -o "$(pwd)/spapi" --additional-properties=pubName=spapi
Use provided sample json and command.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description
The attached example demonstrates the problem.
It contains two classes (
Obj1
andObj2
).Both have the same
mode
property.In the class
Obj1
this results in the propertywhile in the class
Obj2
the property looks like this:Here I would expect
Set<Obj2ModeEnum> mode;
.In the file
obj1.dart
the associated type isHere I would expect
Obj1ModeEnum
.In the file
obj2.dart
the corresponding type is correct (but duplicate, since it's inobj1.dart
already):openapi-generator version
OpenAPI declaration file content or url
Generation Details
I'm using the following command:
openapi-generator generate -g dart -i spapi.json -o "$(pwd)/spapi" --additional-properties=pubName=spapi
Steps to reproduce
Use provided sample json and command.
The text was updated successfully, but these errors were encountered: