Closed jonaslagoni closed 1 month ago
While testing the generated Dart code from the generic-input.json using the dart run
command within the runtime-dart
folder, I am getting the following error.
Building package executable...
Failed to build runtime_dart:runtime_dart:
lib/Address.dart:1:8: Error: Error when reading 'lib/nested_object.dart': No such file or directory
import 'package:runtime_dart/nested_object.dart';
^
since the file generated from the generator is NestedObject.dart
and not nested_object.dart
. any suggestions how can I move ahead. In my investigation I found that Dart supports snake-case
for packages.
Also, as I'm not very much familiar with Dart language, it would be a great help if you can tell me how to write the entry point
code for the runtime-dart.dart
file here.
Cant help you much with dart unfortunately... Maybe try and reach out on the AsyncAPI slack channel #tooling
This issue has been automatically marked as stale because it has not had recent activity :sleeping:
It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.
There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.
Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.
Thank you for your patience :heart:
Reason/Context
To properly test that the models that are generated are semantically correct, we need to test them in their specific runtime. This means that we need to add the setup for Dart.
We already have a bunch of existing runtime tests for the other languages, that you can use as reference implementation: https://github.com/asyncapi/modelina/tree/master/test/runtime
Here is the TODO to solve this issue:
runtime-dart
that has a simple testing setupruntime-dart.ts
that generates the models: https://github.com/asyncapi/modelina/blob/master/test/runtime/runtime-kotlin.tstest:runtime:dart
andgenerate:runtime:dart
That should be it to add runtime testing.
If you encounter any problems just reach out :v: