Skip to content

[BUG] [Dart] "The method 'listFromJson' isn't defiend" for DateTime #11462

Closed
@jhlgns

Description

@jhlgns

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • Have you tested with the latest master to confirm the issue still exists?
  • Have you searched for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description

When using the generated Dart code, this error get's displayed:

The method 'listFromJson' isn't defined for the type 'DateTime'.
Try correcting the name to the name of an existing method, or defining a method named 'listFromJson'.
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
  • Use the generated dart library
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?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions