Description
I have to specify Users list when I create a Thing entity. User id for the "Create Thing" request is taken from a "Create User" response. When I provide an annotation, grammar.py is generated in a way that puts just the id value and does not allow sending the list.
Steps to reproduce
My annotations.json file:
{
"x-restler-global-annotations": [
{
"producer_endpoint": "/users",
"producer_method": "POST",
"producer_resource_name": "id",
"consumer_endpoint": "/things",
"consumer_method": "POST",
"consumer_param": "/users/[0]"
}
]
}
Generated grammar.py file:
primitives.restler_static_string(""",
"users":"""),
primitives.restler_static_string(_users_post_id.reader(), quoted=False),
consumer_param_array.zip
Expected results
My system expects an array of user IDs (users: ["UserId"]) in the "CreateThing" request (item of an array, quoted).
Actual results
I see just users: UserID (simple unquoted value).
Environment details
Ubuntu 22.04, Python 3.10, .Net 8, Restler v3.9.1
Description
I have to specify Users list when I create a Thing entity. User id for the "Create Thing" request is taken from a "Create User" response. When I provide an annotation, grammar.py is generated in a way that puts just the id value and does not allow sending the list.
Steps to reproduce
My annotations.json file:
Generated grammar.py file:
consumer_param_array.zip
Expected results
My system expects an array of user IDs (
users: ["UserId"]) in the "CreateThing" request (item of an array, quoted).Actual results
I see just
users: UserID(simple unquoted value).Environment details
Ubuntu 22.04, Python 3.10, .Net 8, Restler v3.9.1