Hi all,

Currently some actions on the API return results that are not parseable as JSON.

For example the add_note or delete_note action on the repository. These actions return just the string "true", which is in my opinion a string that can not be parsed by JSON libraries. Actually, ruby's json can't parse it.

It would make it easier for people working with the API, if they can count on it that if they get a 200 answer, that the body can be parsed as json.

So for example these actions could return '{"result":true}', if they only would like to return true or false.

What do you think?

~pete

Btw: The documentation sometimes tells in that region that the result is Unspecified or "return: a Repo object". While this is not true for all actions, at least add_note returns "true" instead of a repo object. Should I file bzs?

_______________________________________________
Pulp-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/pulp-list

Reply via email to