Skip to content
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] The name 'Method' is defined in *models.swagger.dart and chopper/src/annotations.dart #492

Closed
point-source opened this issue Nov 11, 2022 · 0 comments · Fixed by #494
Assignees
Labels
bug Something isn't working Triage needed

Comments

@point-source
Copy link

Describe the bug
Sometimes the names of types specified in the swagger spec result in the creation of classes which clash with imported libraries such as chopper. In this case, a class called "Method" is being (correctly) created but when referenced in the *.swagger.dart file, it conflict with the Method class from the imported package:chapper/src/annotations.dart file.

Expected behavior
The code generator should either rename the generated class or hide the imported class if not necessary. In order to reduce the chance of collision, perhaps only import the chopper classes which are explicitly necessary.

Swagger specification link
Link to swagger/OpenApi documentation

Library version used:
2.8.6 on master (commit f20e71)

@point-source point-source added bug Something isn't working Triage needed labels Nov 11, 2022
Vovanella95 pushed a commit that referenced this issue Nov 14, 2022
Fixed generatino of list request bodies #493
Vovanella95 added a commit that referenced this issue Nov 14, 2022
* Fixed generation of requestBodies in some border cases
Fix #489

* Updated changelog and pubspec

* Added 'Method' to key classes #492
Fixed generatino of list request bodies #493

Co-authored-by: Uladzimir Paliukhovich <uladzimir_paliukhovich@epam.com>
Vovanella95 added a commit that referenced this issue Nov 17, 2022
* Fixed generation of requestBodies in some border cases
Fix #489

* Updated changelog and pubspec

* Added 'Method' to key classes #492
Fixed generatino of list request bodies #493

* Fixed #491

* Fixed ticket number

Co-authored-by: Uladzimir Paliukhovich <uladzimir_paliukhovich@epam.com>
Vovanella95 added a commit that referenced this issue Nov 22, 2022
* Fixed generation of requestBodies in some border cases
Fix #489

* Updated changelog and pubspec

* Added 'Method' to key classes #492
Fixed generatino of list request bodies #493

* Fixed #491

* Fixed ticket number

* Fixed generation of basic types refs and lists of them #502

Co-authored-by: Uladzimir Paliukhovich <uladzimir_paliukhovich@epam.com>
Vovanella95 added a commit that referenced this issue Dec 1, 2022
* Fixed generation of requestBodies in some border cases
Fix #489

* Updated changelog and pubspec

* Added 'Method' to key classes #492
Fixed generatino of list request bodies #493

* Fixed #491

* Fixed ticket number

* Fixed generation of basic types refs and lists of them #502

* Fixed #507
Fixed generation of allOf properties with just properties

* Updated changelog

Co-authored-by: Uladzimir Paliukhovich <uladzimir_paliukhovich@epam.com>
Vovanella95 added a commit that referenced this issue Dec 2, 2022
* Fixed generation of requestBodies in some border cases
Fix #489

* Updated changelog and pubspec

* Added 'Method' to key classes #492
Fixed generatino of list request bodies #493

* Fixed #491

* Fixed ticket number

* Fixed generation of basic types refs and lists of them #502

* Fixed #507
Fixed generation of allOf properties with just properties

* Updated changelog

* Fixed issue with generation Lists models map

Co-authored-by: Uladzimir Paliukhovich <uladzimir_paliukhovich@epam.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Triage needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants