Replies: 1 comment 2 replies
-
While some of our users do use generated classes to test data fetcher results, I believe it's not common. And even then I think it's been mostly in Java, since our Kotlin user base is much smaller comparatively. For schema modeling, we do come across such patterns, i.e. ones that introduce cycles in the schema. It's mostly left to the implementor's judgement though as to what makes the most sense to represent their data. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all,
I found a situation that I would like to get advice on. It is about using
executeAndExtractJsonPathAsObject
and the non-nullable fields in the Kotlin generated classes. The question is more to see if you have found similar situations and how you dealt with them (I don't think there is an issue with the framework)Assume this schema
If I do a test to validate that I can get all the employees using executeAndExtractJsonPathAsObject, it fails if I don't ask about all the mandatory fields.
This fails:
But this works:
As you can see, I'm forced to bring extra data (employer name, and the employer in the employee) to fulfill Kotlin's non-nullable constraints. Some questions:
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions