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

Unsupported generated import in client_mapping.dart #167

Closed
mzdm opened this issue May 20, 2021 · 2 comments
Closed

Unsupported generated import in client_mapping.dart #167

mzdm opened this issue May 20, 2021 · 2 comments

Comments

@mzdm
Copy link

mzdm commented May 20, 2021

Swagger/Json file example: https://cloud.ibm.com/apidocs/visual-recognition/visual-recognition-v3.json
-> this has name visual-recognition-visual-recognition-v3.swagger

When running the generator, client_mapping.dart generates import:

import 'visual-recognition-visual-recognition-v3.swagger.dart';

Target of URI doesn't exist: 'visual-recognition-visual-recognition-v3.swagger.dart'.

However in other files the imports generates fine, - are replaced with _, e.g. visual_recognition_visual_recognition_v3.swagger file:

import 'package:json_annotation/json_annotation.dart';
import 'package:meta/meta.dart';
import 'package:chopper/chopper.dart';
import 'package:chopper/chopper.dart' as chopper;
import 'visual_recognition_visual_recognition_v3.enums.swagger.dart' as enums;
export 'visual_recognition_visual_recognition_v3.enums.swagger.dart';

part 'visual_recognition_visual_recognition_v3.swagger.chopper.dart';
part 'visual_recognition_visual_recognition_v3.swagger.g.dart';
deps
dependencies:
  flutter:
    sdk: flutter
  chopper: ^4.0.0

dev_dependencies:
  flutter_test:
    sdk: flutter
  build_runner: ^1.12.2
  json_annotation: 4.0.1
  json_serializable: 4.1.2
  swagger_dart_code_generator: ^2.0.0-nullsafety.7+2
  chopper_generator: ^4.0.0-nullsafety.1
Vovanella95 pushed a commit that referenced this issue May 24, 2021
@Vovanella95
Copy link
Collaborator

Please check 2.0.0-nullsafety.8

@mzdm
Copy link
Author

mzdm commented May 26, 2021

Thanks, fixed with 2.0.0-nullsafety.8!

@mzdm mzdm closed this as completed May 26, 2021
fryette added a commit that referenced this issue Jun 1, 2021
* Made enums not nullable

* Updated pubspec and changelog

* Removed not needed code

* Added ..removeWhere for maps from json

* Changed default enum value to empty string

* Fixed some things

* Add nullable parameters

* Fixed enums parsing

* Merge remote-tracking branch 'origin/version/1.7.0'

# Conflicts:
#	CHANGELOG.md
#	analysis_options.yaml
#	example/build.yaml
#	lib/src/code_generators/swagger_models_generator.dart
#	lib/src/code_generators/swagger_requests_generator.dart
#	pubspec.yaml

* updated chopper version

* Make all parameters nullable

* Fixed list of enums parsing

* Made list elements not nullable

* updated pubspec and changelog

* Fixed List<Strings>

* updated changeloc and pubspec

* Removed required attribute from constructors

* updated pubspec and changelog

* Merged other branch

* Fixed issues

* Fix

* reverted version back

* Made default header case insative

* Uncommended build file

* Uncommended bulld.yaml

* Fixe #168 and Fixed #167

* Added models postfix

* Revert "Added models postfix"

This reverts commit 7f3026a.

* Removed ..removeWehere

* Revert "Revert "Added models postfix""

This reverts commit b27473b.

* Implemented models postfix

* fixed tests

* added generated files to ignore

* Updated dependencies and version

* Fixed version

* Added some tests

Co-authored-by: uladzimir_paliukhovich <>
Co-authored-by: Yauhen <ysampir@gmail.com>
Vovanella95 added a commit that referenced this issue Jun 1, 2021
* Made enums not nullable

* Updated pubspec and changelog

* Removed not needed code

* Added ..removeWhere for maps from json

* Changed default enum value to empty string

* Fixed some things

* Add nullable parameters

* Fixed enums parsing

* Merge remote-tracking branch 'origin/version/1.7.0'

# Conflicts:
#	CHANGELOG.md
#	analysis_options.yaml
#	example/build.yaml
#	lib/src/code_generators/swagger_models_generator.dart
#	lib/src/code_generators/swagger_requests_generator.dart
#	pubspec.yaml

* updated chopper version

* Make all parameters nullable

* Fixed list of enums parsing

* Made list elements not nullable

* updated pubspec and changelog

* Fixed List<Strings>

* updated changeloc and pubspec

* Removed required attribute from constructors

* updated pubspec and changelog

* Merged other branch

* Fixed issues

* Fix

* reverted version back

* Made default header case insative

* Uncommended build file

* Uncommended bulld.yaml

* Fixe #168 and Fixed #167

* Added models postfix

* Revert "Added models postfix"

This reverts commit 7f3026a.

* Removed ..removeWehere

* Revert "Revert "Added models postfix""

This reverts commit b27473b.

* Implemented models postfix

* fixed tests

* added generated files to ignore

* Updated dependencies and version

* Fixed version

* Added some tests

* Removed meta

* Updated pubspec and changelog

* moved dart style to dev_dependencies

* Returned dart_style

Co-authored-by: uladzimir_paliukhovich <>
Co-authored-by: Yauhen <ysampir@gmail.com>
fryette added a commit that referenced this issue Jun 2, 2021
* Made enums not nullable

* Updated pubspec and changelog

* Removed not needed code

* Added ..removeWhere for maps from json

* Changed default enum value to empty string

* Fixed some things

* Add nullable parameters

* Fixed enums parsing

* Merge remote-tracking branch 'origin/version/1.7.0'

# Conflicts:
#	CHANGELOG.md
#	analysis_options.yaml
#	example/build.yaml
#	lib/src/code_generators/swagger_models_generator.dart
#	lib/src/code_generators/swagger_requests_generator.dart
#	pubspec.yaml

* updated chopper version

* Make all parameters nullable

* Fixed list of enums parsing

* Made list elements not nullable

* updated pubspec and changelog

* Fixed List<Strings>

* updated changeloc and pubspec

* Removed required attribute from constructors

* updated pubspec and changelog

* Merged other branch

* Fixed issues

* Fix

* reverted version back

* Made default header case insative

* Uncommended build file

* Uncommended bulld.yaml

* Fixe #168 and Fixed #167

* Added models postfix

* Revert "Added models postfix"

This reverts commit 7f3026a.

* Removed ..removeWehere

* Revert "Revert "Added models postfix""

This reverts commit b27473b.

* Implemented models postfix

* fixed tests

* added generated files to ignore

* Updated dependencies and version

* Fixed version

* Added some tests

* Removed meta

* Updated pubspec and changelog

* moved dart style to dev_dependencies

* Returned dart_style

* Updated chopper version in example

Co-authored-by: uladzimir_paliukhovich <>
Co-authored-by: Yauhen <ysampir@gmail.com>
Vovanella95 added a commit that referenced this issue Aug 19, 2021
* Made enums not nullable

* Updated pubspec and changelog

* Removed not needed code

* Added ..removeWhere for maps from json

* Changed default enum value to empty string

* Fixed some things

* Add nullable parameters

* Fixed enums parsing

* Merge remote-tracking branch 'origin/version/1.7.0'

# Conflicts:
#	CHANGELOG.md
#	analysis_options.yaml
#	example/build.yaml
#	lib/src/code_generators/swagger_models_generator.dart
#	lib/src/code_generators/swagger_requests_generator.dart
#	pubspec.yaml

* updated chopper version

* Make all parameters nullable

* Fixed list of enums parsing

* Made list elements not nullable

* updated pubspec and changelog

* Fixed List<Strings>

* updated changeloc and pubspec

* Removed required attribute from constructors

* updated pubspec and changelog

* Merged other branch

* Fixed issues

* Fix

* reverted version back

* Made default header case insative

* Uncommended build file

* Uncommended bulld.yaml

* Fixe #168 and Fixed #167

* Added models postfix

* Revert "Added models postfix"

This reverts commit 7f3026a.

* Removed ..removeWehere

* Revert "Revert "Added models postfix""

This reverts commit b27473b.

* Implemented models postfix

* fixed tests

* added generated files to ignore

* Updated dependencies and version

* Refactored requests generator

* Fixed some dependencies

* Revert "Fixed some dependencies"

This reverts commit 180b10d.

* Pushed generated files

* Fixed imports

* Fixed version

* Added some tests

* Removed meta

* Updated pubspec and changelog

* moved dart style to dev_dependencies

* Returned dart_style

* Updated chopper version in example

* Resolved conflicts

* Fixed requests generator

* Fixed some issues in requests generator

* Fixed modelPostfix for requests models

* Refactored some fixes

* Fixed enum parameters in requests generator

* Fixed some issues

* Fixed some bugs in generators

* Fixed some things

* Some fixes

* fixed some things

* Renamed generated file

* Fixed some things

* Fixed some issues

* Added support of request bodies

* Fixed request bodies calculation

* Fixed some issues with generator

* Fixed some issues

* Fixed some bugs

* Updated changelog

* Fixed parameters generation

* Some cool fixes

* Removed not needed code

* Added check for array

* Added optionalBody

* Fixed issue with ref request body

* Updated logo

* Fix binary format for request body

* Fixed parsing of swagger response ref

* Fixed issue with request body with ref

* Fix return type generation

* Fixed some border cases

* Fixed some issues

* Fixed some issues

* Fixed conflicts

* Fixed conflicts

* Some fixes

* Fixed some swaggers.
Added prerelease label

* Made headers non required

* Fixed some issues

* Changed service to static class

* Revert "Changed service to static class"

This reverts commit 2a9fe9b.

* Fixed class names with dollars

* Fixed Issue #202

* Fixed JsonSerializableConverter issue

* Fixed test

* Updated changelog and pubspec.yaml

* Formatted code

* Commented some tests

* Removed file

* Fixed analyser issues

* Updated usage of includeIfNull

* Updated pubspec and changeloc

* Fixed ref

* Removed generated code

* Fixed some bugs

* Formatted code

* Fixed special Swagger

* Updated pubspec and changelog

* formatted code

* Commented failed tests

Co-authored-by: uladzimir_paliukhovich <>
Co-authored-by: Yauhen <ysampir@gmail.com>
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

2 participants