-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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] [Dart] "The method 'listFromJson' isn't defiend" for DateTime #11462
Comments
Just tested this with a 6.0.0 snapshot, docker container was built directly from master, still persists. |
I have a similliar problem with MultipartFile:
|
We also experience this issue with 6.0.1. Is this related to: #4887 ? |
You can't create static extension methods for built-in Dart classes: dart-lang/language#723 Until that is possible, you can create an extension for the DateTime class like this:
And then call the extension method using hte name of the extension:
|
Seems to happen in typescript fetch for some spring generated swagger specs. |
Bug Report Checklist
Description
When using the generated Dart code, this error get's displayed:
openapi-generator version
openapi-generator-cli 5.4.0-SNAPSHOT
commit : 35fea62
built : 2022-01-29T18:29:19Z
source : https://github.com/openapitools/openapi-generator
docs : https://openapi-generator.tech/
OpenAPI declaration file content or url
https://api.apaleo.com/swagger/inventory-v1/swagger.json
Generation Details
n/a
Steps to reproduce
docker run --rm -v "${PWD}:/local" openapitools/openapi-generator-cli:latest generate -i /local/swagger.json -g dart -o /local/api
Related issues/PRs
n/a
Suggest a fix
I don't know the internals of OpenAPITools - probably the
listFromJson
implementation for builtin types needs to be fixed?The text was updated successfully, but these errors were encountered: