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

Empty tags #271

Open
vanderck opened this issue Oct 23, 2024 · 0 comments
Open

Empty tags #271

vanderck opened this issue Oct 23, 2024 · 0 comments

Comments

@vanderck
Copy link

Steps to reproduce

"tags":[],
will cause :

openapi:
Failed to generate files.
Bad state: No element
#0 List.first (dart:core-patch/growable_array.dart:344:5)
#1 OpenApiParser._getTag (package:swagger_parser/src/parser/parser/open_api_parser.dart:870:52)
#2 OpenApiParser.parseRestClients.. (package:swagger_parser/src/parser/parser/open_api_parser.dart:643:28)
#3 _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:633:13)
#4 OpenApiParser.parseRestClients. (package:swagger_parser/src/parser/parser/open_api_parser.dart:567:17)
#5 _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:633:13)
#6 OpenApiParser.parseRestClients (package:swagger_parser/src/parser/parser/open_api_parser.dart:554:10)
#7 GenProcessor.generateFiles (package:swagger_parser/src/generator/generator/generator_processor.dart:32:32)

Expected results

Just ignore empty tags

Actual results

Failed to generate files.
Bad state: No element

Your OpenApi snippet

"tags":[],

Code sample

Code sample
[Paste your code here]

Logs

Logs
[Paste your logs here]

Dart version and used packages versions

Dart version
[Paste your output here]
Packages version
[Paste your output here]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant