Actions
Bug #11673
closedAPI settings unquoted integer provided gives error
Difficulty:
Triaged:
Bugzilla link:
Pull request:
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1241077
Description of problem:
Settings unqouted Integer values are resulting in an error that an integer is required. Changing it to a quoted value does not give this error.
I would expect the otherway around that a quoted integer shall give an error instead.
This is also a regression compared to 6.0.8 that accepted the unqouted integer value.
- curl -K /opt/hoici/etc/sat6/curl-hoici.conf "-HContent-Type: application/json" "-d{\"per_page\":9999,\"setting\":{\"value\":60}}" -XPUT https://localhost/api/v2/settings/52
{
"error": {"id":52,"errors":{"value":["is invalid: must be integer"]},"full_messages":["Value is invalid: must be integer"]}
}
- curl -K /opt/hoici/etc/sat6/curl-hoici.conf "-HContent-Type: application/json" "-d{\"per_page\":9999,\"setting\":{\"value\":\"60\"}}" -XPUT https://localhost/api/v2/settings/52 {"created_at":"2015-07-08T08:45:44Z","default":30,"description":"Puppet interval in minutes","id":52,"name":"puppet_interval","settings_type":"integer","updated_at":"2015-07-08T09:57:12Z","value":60}
Version-Release number of selected component (if applicable):
How reproducible:
Steps to Reproduce:
1. See curl commands above
2.
3.
Actual results:
Unqouted integer value gives error
Expected results:
Unqouted integer works
Additional info:
Actions