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

any support for swagger 3.0.1 ? #72

Closed
5arif opened this issue Oct 13, 2020 · 5 comments · Fixed by #184
Closed

any support for swagger 3.0.1 ? #72

5arif opened this issue Oct 13, 2020 · 5 comments · Fixed by #184
Labels
bug Something isn't working waiting customer response

Comments

@5arif
Copy link

5arif commented Oct 13, 2020

i get some error with swagger 3 "openapi": "3.0.1",
and i need to manualy add build_runner to dev_dependencies:

is that posible to use swagger url like : https://localhost:44373/swagger/v1/swagger.json

> Executing task: flutter pub run build_runner build <

[INFO] Generating build script...
[INFO] Generating build script completed, took 378ms

[WARNING] Deleted previous snapshot due to missing asset graph.
[INFO] Creating build script snapshot......
[INFO] Creating build script snapshot... completed, took 14.0s

[INFO] Initializing inputs
[INFO] Building new asset graph...


You have hit a bug in build_runner
Please file an issue with reproduction steps at https://github.com/dart-lang/build/issues


Bad state: No element
dart:core                                                                   Iterable.first
package:swagger_dart_code_generator/swagger_dart_code_generator.dart 33:20  generateExtensions
package:swagger_dart_code_generator/swagger_dart_code_generator.dart 46:32  SwaggerDartCodeGenerator.buildExtensions
package:build_runner_core/src/generate/phase.dart 122:17                    InBuildPhase.identity
package:build_runner_core/src/asset_graph/graph.dart 547:44                 computeBuildPhasesDigest.<fn>
dart:_internal                                                              ListIterable.toList
package:build_runner_core/src/asset_graph/graph.dart 547:54                 computeBuildPhasesDigest
package:build_runner_core/src/asset_graph/graph.dart 64:9                   AssetGraph.build
package:build_runner_core/src/generate/build_definition.dart 250:41         _Loader.prepareWorkspace.<fn>
package:build_runner_core/src/logging/logging.dart 25:30                    logTimedAsync
package:build_runner_core/src/generate/build_definition.dart 248:13         _Loader.prepareWorkspace
package:build_runner_core/src/generate/build_definition.dart 70:50          BuildDefinition.prepareWorkspace
package:build_runner_core/src/generate/build_impl.dart 113:49               BuildImpl.create
package:build_runner_core/src/generate/build_runner.dart 33:42              BuildRunner.create
package:build_runner/src/generate/build.dart 99:35                          build
package:build_runner/src/entrypoint/build.dart 35:24                        BuildCommand._run
package:build_runner/src/entrypoint/build.dart 31:15                        BuildCommand.run.<fn>
dart:async                                                                  runZoned
package:build/src/experiments.dart 18:5                                     withEnabledExperiments
package:build_runner/src/entrypoint/build.dart 30:12                        BuildCommand.run
package:args/command_runner.dart 197:27                                     CommandRunner.runCommand
package:args/command_runner.dart 112:25                                     CommandRunner.run.<fn>
dart:async                                                                  new Future.sync
package:args/command_runner.dart 112:14                                     CommandRunner.run
package:build_runner/src/entrypoint/run.dart 25:31                          run
.dart_tool\build\entrypoint\build.dart 33:22                                main

pub finished with exit code 1
@fryette
Copy link
Contributor

fryette commented Oct 14, 2020

@5arif Could you please share your swagger file to reproduce an issue?

You can send it to ysampir@gmail.com or share it here.

Actually, the library should support swagger 3.0.1

@Vovanella95
Copy link
Collaborator

Vovanella95 commented Oct 14, 2020

Hi @5arif ,

Currently it's not possible to load swaggers from url manually. We're going to add this feature soon. We're going to add property to build.yaml like

swagger_urls
 - url : 'https://localhost:44373/swagger/v1/swagger.json'
   service_name: 'my_swagger_service'
 - url: 'some another url'
   service_name: 'another_swagger_service'

Is it what you mean?

@Vovanella95 Vovanella95 added the bug Something isn't working label Oct 14, 2020
@Vovanella95
Copy link
Collaborator

Closed due no answer from customer

@jmls
Copy link

jmls commented Jul 1, 2021

can you please reopen this ? hit the exact same error, but using a sdk.swagger file

@Vovanella95
Copy link
Collaborator

Hi @jmls ,

Please share not working swagger file (or part of it) to detect root cause. Thanks

@Vovanella95 Vovanella95 reopened this Jul 7, 2021
Vovanella95 pushed a commit that referenced this issue Jul 13, 2021
@Vovanella95 Vovanella95 mentioned this issue Jul 13, 2021
Vovanella95 added a commit that referenced this issue Jul 13, 2021
* Fixed #72

* Removed not used variable

Co-authored-by: uladzimir_paliukhovich <>
fryette pushed a commit that referenced this issue Jul 20, 2021
* Fixed #72

* Removed not used variable

* Fixed case with List<List<List.....<type>>>...>

* Updated changelog and pubspec

* Fixed small issue

* Updated pubspec and changelog

* Formatted code

Co-authored-by: uladzimir_paliukhovich <>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working waiting customer response
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants