Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define CustomField #177

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions thrift/src/main/thrift/atoms/interactive.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ namespace java com.gu.contentatom.thrift.atom.interactive
#@namespace scala com.gu.contentatom.thrift.atom.interactive
#@namespace typescript _at_guardian.content_atom_model.interactive

struct CustomField {
1: required string fieldName
2: required string fieldType
3: required string defaultValue
Copy link
Contributor Author

@Fweddi Fweddi Dec 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

string is the best we can do for defaultValue as Thrift doesn't support polymorphism.

I assume we will fill defaultValue with stringified JSON.

}

struct InteractiveAtom {
/* the unique ID will be stored in the `atom` data*/
1: required string type
Expand All @@ -18,4 +24,5 @@ struct InteractiveAtom {
See here: https://amp.dev/documentation/components/amp-iframe/ for more information.
*/
7: optional string placeholderUrl
8: optional list<CustomField> customFields = []
}
Loading