Replies: 1 comment
-
Could you write me a test which reproduces this issue? We have a lot of these constructions within our code and they seem all to be working fine. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm using AWS to call the Textract API, which returns a bunch of nested data
However, when I try to call a TextractExpenseAnalysisResponse::from($json), I get the following:
App\Domains\Claims\DataObjects\TextractExpenseAnalysisResponse::__construct(): Argument #1 ($ExpenseDocuments) must be of type Spatie\LaravelData\DataCollection, array given, called in ./vendor/spatie/laravel-data/src/Resolvers/DataFromArrayResolver.php on line 60
It works when I don't add the DataCollection of ExpenseDocuments, but as soon as I do, it breaks there.
I've tried everything from making the inner-elements into collections as well, but I keep getting this problem. Would love to debug the problem further, as I want to use this library for typing all responses from an API.
Beta Was this translation helpful? Give feedback.
All reactions