Data collection property ............. in .............................. has an annotation that isn't a data object or is missing an annotation #392
Replies: 2 comments 1 reply
-
I also have no idea immediately what's happening. First, try to upgrade to v3 and see if that fixes the problem. The message is shown when a docblock is missing a correct annotation, but since you're using |
Beta Was this translation helpful? Give feedback.
0 replies
-
I see well noted @rubenvanassche, will try it on my other projects, as currently I'm currently used laravel 8, and unable to update to v3 just now |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
My name is Ivan, and I'm quite interested in using this library for constructing FHIR R4 API which needs some DTO
I am using Spatie/Laravel-data v2 on PHP 8.1 Laravel 8.
It's quite confusing/frustating as I am out of ammo to debug and the error response is not pointing the problem in more detail :
Summary
I have called the classes directly without using DataCollection
Error shown
Second attempt : to use DataCollection
Error shown
Complete Snippet
First of all, I have created a DTO template for Complex Datatype such as the following (FhirComplex.php): --> referring to this https://www.hl7.org/fhir/datatypes.html
Second For parsing the json I create some custom DTO referring to other Data Classes (FhirEncounter.type):
I have used read the documentation using laravel-data DTO as requests
And I'm using this following json payload to test in Postman :
and this is the first error that I got
When I tried to comment this part in FhirEncounter.php for Identifier
I got another error from Classes
Thank you very much for your time reading this and really appreciate any helps / hints on this...
CC: @rubenvanassche
Beta Was this translation helpful? Give feedback.
All reactions