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] Error when both overriden_models and separate_models are used #745

Open
daniel-deboeverie-lemon opened this issue Apr 16, 2024 · 0 comments
Assignees
Labels
bug Something isn't working Triage needed

Comments

@daniel-deboeverie-lemon
Copy link

daniel-deboeverie-lemon commented Apr 16, 2024

Describe the bug
When separate_models is set to true in the build.yaml whilst overriden_models are defined, the api.models.swagger.dart file gets an import going import "overriden_models.dart" that it can not find.

To Reproduce
I used the pet_service_json from the example.

and the build.yaml looks as follows:

targets:
  $default:
    sources:
      - lib/**
    builders:
      swagger_dart_code_generator:
        options:
          input_folder: lib/swagger
          output_folder: lib/swagger/generated
          separate_models: true
          overriden_models:
            - file_name: "pets"
              import_url: "package:test_project/swagger/overrides/overriden_models.dart"
              overriden_models:
                - "Pet"

The Pet override class is also just a copy paste from the example.

Expected behavior
for the defined import url to be used instead of import "overriden_models.dart"

Library version used:
2.15.2

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
3 participants