-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
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
[BUG] Generation fails for "discriminatorType" element in my swagger file #311
Comments
Hi @ATeteryatnikov , I have fixed generation error you've described. The only thing - discriminatorType: '#/definitions/V1ListArticle' will not be generated like final V1ListArticle discriminatorType because it's not valid swagger. You can put in into Swagger editor and check. There are 2 problems: Semantic error at definitions.V1ListArticle.allOf.0.$ref Structural error at definitions.V1ListArticle.allOf.1.properties.discriminatorType Anyway, your file generating well now. (version 2.3.6 and higher) Enjoy using our generator! :) |
* Fixed some issues * Added fix for Field annotations. Updatec changelog and pubspec * Fixed lot of issues with AllOf support * Updated changelog and pubspec * Added requestbodies generation from requests * Add windows support (#273) * Run CI on windows too * chore: Fix a number of path joins * fix: Revert change to getFileNameWithoutExtension * fix: Normalize paths used for extensions * Fixed errors with requestBodies generation * Added possibility to use operationId for request name * Format code * Updated pubspec and changelog * Fix tests * Fix analyser issues * Updated example readme * Removed converter generator * Fix cases when refs are overriden * Fixed enum generation Changed int64 parsing to double * Released 2.2.8 * Added support int64 * Updated changelog and pubspec * Fix for models int64 * Updated changelog and pubspec * Removed not needed file * Fixed responses array of int * Reverted analysis options * Updated changelog * Updated version * Fixed tests * Fixed analyser issues * Fixed issue #291 * updated changelog and pubcpec * Added parsing of security for requests * Fixed num parsing as Num * Implemented security keys definition * Removed not needed prints * Updated changelog and pubspec * Removed use_inheritance field * Removed outdated tests * Implemented integer enums support * Updated changelog and pubspec * Fixed fromJson for integer enum fields * Updated changelog and pubspec * Formatted code * Updated changelog * Fixed issue 263 * Fixed test * Fixed issue #311 * Updated pubspec and changelog Co-authored-by: uladzimir_paliukhovich <> Co-authored-by: Elliana May <me@mause.me>
* Fixed some issues * Added fix for Field annotations. Updatec changelog and pubspec * Fixed lot of issues with AllOf support * Updated changelog and pubspec * Added requestbodies generation from requests * Add windows support (#273) * Run CI on windows too * chore: Fix a number of path joins * fix: Revert change to getFileNameWithoutExtension * fix: Normalize paths used for extensions * Fixed errors with requestBodies generation * Added possibility to use operationId for request name * Format code * Updated pubspec and changelog * Fix tests * Fix analyser issues * Updated example readme * Removed converter generator * Fix cases when refs are overriden * Fixed enum generation Changed int64 parsing to double * Released 2.2.8 * Added support int64 * Updated changelog and pubspec * Fix for models int64 * Updated changelog and pubspec * Removed not needed file * Fixed responses array of int * Reverted analysis options * Updated changelog * Updated version * Fixed tests * Fixed analyser issues * Fixed issue #291 * updated changelog and pubcpec * Added parsing of security for requests * Fixed num parsing as Num * Implemented security keys definition * Removed not needed prints * Updated changelog and pubspec * Removed use_inheritance field * Removed outdated tests * Implemented integer enums support * Updated changelog and pubspec * Fixed fromJson for integer enum fields * Updated changelog and pubspec * Formatted code * Updated changelog * Fixed issue 263 * Fixed test * Fixed issue #311 * Updated pubspec and changelog * Fixed list enums generation in requests * Updated pubspec and changelog Co-authored-by: uladzimir_paliukhovich <> Co-authored-by: Elliana May <me@mause.me>
* Fixed some issues * Added fix for Field annotations. Updatec changelog and pubspec * Fixed lot of issues with AllOf support * Updated changelog and pubspec * Added requestbodies generation from requests * Add windows support (#273) * Run CI on windows too * chore: Fix a number of path joins * fix: Revert change to getFileNameWithoutExtension * fix: Normalize paths used for extensions * Fixed errors with requestBodies generation * Added possibility to use operationId for request name * Format code * Updated pubspec and changelog * Fix tests * Fix analyser issues * Updated example readme * Removed converter generator * Fix cases when refs are overriden * Fixed enum generation Changed int64 parsing to double * Released 2.2.8 * Added support int64 * Updated changelog and pubspec * Fix for models int64 * Updated changelog and pubspec * Removed not needed file * Fixed responses array of int * Reverted analysis options * Updated changelog * Updated version * Fixed tests * Fixed analyser issues * Fixed issue #291 * updated changelog and pubcpec * Added parsing of security for requests * Fixed num parsing as Num * Implemented security keys definition * Removed not needed prints * Updated changelog and pubspec * Removed use_inheritance field * Removed outdated tests * Implemented integer enums support * Updated changelog and pubspec * Fixed fromJson for integer enum fields * Updated changelog and pubspec * Formatted code * Updated changelog * Fixed issue 263 * Fixed test * Fixed issue #311 * Updated pubspec and changelog * Fixed list enums generation in requests * Updated pubspec and changelog * Fixed issue #296 * Updated pubspec and changelog * Fixed conflicts Co-authored-by: uladzimir_paliukhovich <> Co-authored-by: Elliana May <me@mause.me>
* Fixed some issues * Added fix for Field annotations. Updatec changelog and pubspec * Fixed lot of issues with AllOf support * Updated changelog and pubspec * Added requestbodies generation from requests * Add windows support (#273) * Run CI on windows too * chore: Fix a number of path joins * fix: Revert change to getFileNameWithoutExtension * fix: Normalize paths used for extensions * Fixed errors with requestBodies generation * Added possibility to use operationId for request name * Format code * Updated pubspec and changelog * Fix tests * Fix analyser issues * Updated example readme * Removed converter generator * Fix cases when refs are overriden * Fixed enum generation Changed int64 parsing to double * Released 2.2.8 * Added support int64 * Updated changelog and pubspec * Fix for models int64 * Updated changelog and pubspec * Removed not needed file * Fixed responses array of int * Reverted analysis options * Updated changelog * Updated version * Fixed tests * Fixed analyser issues * Fixed issue #291 * updated changelog and pubcpec * Added parsing of security for requests * Fixed num parsing as Num * Implemented security keys definition * Removed not needed prints * Updated changelog and pubspec * Removed use_inheritance field * Removed outdated tests * Implemented integer enums support * Updated changelog and pubspec * Fixed fromJson for integer enum fields * Updated changelog and pubspec * Formatted code * Updated changelog * Fixed issue 263 * Fixed test * Fixed issue #311 * Updated pubspec and changelog * Fixed list enums generation in requests * Updated pubspec and changelog * Fixed issue #296 * Updated pubspec and changelog * Fixed conflicts * [BUB] Array in spec is not being generated as expected * Updated pubspec and changelog Co-authored-by: uladzimir_paliukhovich <> Co-authored-by: Elliana May <me@mause.me>
* Fixed some issues * Added fix for Field annotations. Updatec changelog and pubspec * Fixed lot of issues with AllOf support * Updated changelog and pubspec * Added requestbodies generation from requests * Add windows support (#273) * Run CI on windows too * chore: Fix a number of path joins * fix: Revert change to getFileNameWithoutExtension * fix: Normalize paths used for extensions * Fixed errors with requestBodies generation * Added possibility to use operationId for request name * Format code * Updated pubspec and changelog * Fix tests * Fix analyser issues * Updated example readme * Removed converter generator * Fix cases when refs are overriden * Fixed enum generation Changed int64 parsing to double * Released 2.2.8 * Added support int64 * Updated changelog and pubspec * Fix for models int64 * Updated changelog and pubspec * Removed not needed file * Fixed responses array of int * Reverted analysis options * Updated changelog * Updated version * Fixed tests * Fixed analyser issues * Fixed issue #291 * updated changelog and pubcpec * Added parsing of security for requests * Fixed num parsing as Num * Implemented security keys definition * Removed not needed prints * Updated changelog and pubspec * Removed use_inheritance field * Removed outdated tests * Implemented integer enums support * Updated changelog and pubspec * Fixed fromJson for integer enum fields * Updated changelog and pubspec * Formatted code * Updated changelog * Fixed issue 263 * Fixed test * Fixed issue #311 * Updated pubspec and changelog * Fixed list enums generation in requests * Updated pubspec and changelog * Fixed issue #296 * Updated pubspec and changelog * Fixed conflicts * [BUB] Array in spec is not being generated as expected * Updated pubspec and changelog * Fixed responses returns Stream<Something> Fixed cases when we have List<List<...<List<SomeClass> in model parameter * Updated changelog and pubspec Co-authored-by: uladzimir_paliukhovich <> Co-authored-by: Elliana May <me@mause.me>
* Fixed some issues * Added fix for Field annotations. Updatec changelog and pubspec * Fixed lot of issues with AllOf support * Updated changelog and pubspec * Added requestbodies generation from requests * Add windows support (#273) * Run CI on windows too * chore: Fix a number of path joins * fix: Revert change to getFileNameWithoutExtension * fix: Normalize paths used for extensions * Fixed errors with requestBodies generation * Added possibility to use operationId for request name * Format code * Updated pubspec and changelog * Fix tests * Fix analyser issues * Updated example readme * Removed converter generator * Fix cases when refs are overriden * Fixed enum generation Changed int64 parsing to double * Released 2.2.8 * Added support int64 * Updated changelog and pubspec * Fix for models int64 * Updated changelog and pubspec * Removed not needed file * Fixed responses array of int * Reverted analysis options * Updated changelog * Updated version * Fixed tests * Fixed analyser issues * Fixed issue #291 * updated changelog and pubcpec * Added parsing of security for requests * Fixed num parsing as Num * Implemented security keys definition * Removed not needed prints * Updated changelog and pubspec * Removed use_inheritance field * Removed outdated tests * Implemented integer enums support * Updated changelog and pubspec * Fixed fromJson for integer enum fields * Updated changelog and pubspec * Formatted code * Updated changelog * Fixed issue 263 * Fixed test * Fixed issue #311 * Updated pubspec and changelog * Fixed list enums generation in requests * Updated pubspec and changelog * Fixed issue #296 * Updated pubspec and changelog * Fixed conflicts * [BUB] Array in spec is not being generated as expected * Updated pubspec and changelog * Fixed responses returns Stream<Something> Fixed cases when we have List<List<...<List<SomeClass> in model parameter * Updated changelog and pubspec * Fixed issue 328: Error when swagger has models with name "Type" * Updated changelog and pubspec * Fixed enums naming Co-authored-by: uladzimir_paliukhovich <> Co-authored-by: Elliana May <me@mause.me>
if swagger json file has "discriminatorType" element then an error occurs:
"type 'String' is not a subtype of type 'Map<String, dynamic>' in type cast"
To Reproduce
part of my model for example:
"V1ListArticle": { "allOf": [ { "$ref": "#/definitions/BaseRecord" }, { "type": "object", "properties": { "articleRank": { "type": "number" }, "discriminatorType": "#/definitions/V1ListArticle" } } ] },
If I remove "discriminatorType" is work.
Library version used:
2.3.5
The text was updated successfully, but these errors were encountered: