Actually, I think my issue persists, but in a different way from what I imagined. How do I set field parameters?
Using the following: set "body", min: 1, max: 1
on different lines, without result.
#homepage
schema "page"
page = generate 1
# generate from ContentItem
schema "ContentItem"
# accountActions using ContentItem Schema
--> attempted here (see results 1)
page["accountActions"] = generate 3
page["accountActions"].each do |action|
--> attempted here (see result 2)
--> even attempted: action["body"] = set "body", min: 1, max: 1 (see result 2)
action["category"] = ["accountActions","home"]
action["imageUrl"] = "user"
action["imageType"] = "SvgUse"
end
#return the response
page
### END API SCRIPT
### OUTPUT
# result 1: paragraph length follows schema settings, not "set" instructions.
# result 2
"body": {
"min": "1",
"max": "1"
}
Edited for clarity.