Structured JSON Type Hints #3349
joornby
started this conversation in
Feature Requests & Ideas
Replies: 0 comments
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.
-
I was recently working on trying to build a plugin to a third party platform that provides their own widget. Upon the user selecting an item in this widget, it provides an event back to the custom admin component I was rendering. What I wanted to do was specify the type of the field as
json
, and save the information coming back from the third party widget in the field. That would work great, but the format of the data is always the same, so I felt like the generated types and schemas should know the specific shape of the items selected from the widget. I ended up using thegroup
field specifying all of the sub-fields, but the things I had to do to get that to work was pretty ridiculous. So my proposal is that there be a way to define the schema for ajson
field. There are three primary benefits of allowing a strict type on the json field:Beta Was this translation helpful? Give feedback.
All reactions