For few last days I'm facing API and client lib issue while listing custom schemas from directory.
According to doc, response should contain kind, etag and list of schemas, but when called using (Java) client lib or online API explorer
https://developers.google.com/admin-sdk/directory/v1/reference/schemas/list#response_1
where customer with provided customerId does not have any custom schemas in his google admin directory, such response only contains kind and etag properties and schemas is not even present (not empty list, not null, no nothing - forcing schemas in request's field parameter does not work either)
{
"kind": "admin#directory#schemas",
"etag": "\"enlFCt4L0-k8PoIKzRNl5h_fsrc/vyGp6PvFo4Rv1gHuoIWeCReyIC8\""
}
which causes (Java) client lib (schemas().list().execute()) to fail on Preconditions check with "IllegalArgumentException: no JSON input found" for schemas field. For customer with some custom schemas, response is ok with filled "schemas" list property.
I think, this (missing schemas response property) behaviour changed few days ago and my question is if someone is facing the same issue or am I having some bad view on it?
Reported to Google issues, now fixed. No code or lib changes are needed.