Open S3B4SZ17 opened 4 months ago
Addressing the #257 issue. If an API response with a non JSON formatted obj (a string or int i.e 1234 or my-string) we are going to use that value as the tf obj id. We need to set the id_attribute option as *.
1234
my-string
id_attribute
*
Example non-JSON response from the fakeserver:
curl 127.0.0.1:8080/api/objects -X POST -d '{ "Id": "1", "Name": "Foo", "No_json": true}' 1
That 1 will be used as the Obj ID
1
Under restapi/api_object_test.go created the create_object_no_json_response test case
restapi/api_object_test.go
create_object_no_json_response
Summary
Addressing the #257 issue. If an API response with a non JSON formatted obj (a string or int i.e
1234
ormy-string
) we are going to use that value as the tf obj id. We need to set theid_attribute
option as*
.Example
Example non-JSON response from the fakeserver:
That
1
will be used as the Obj IDTests
Under
restapi/api_object_test.go
created thecreate_object_no_json_response
test case