What
fossapi list projects fails with a deserialization error against the
real /api/projects endpoint:
$ fossapi list projects --json --count 1
Error: HTTP error: error decoding response body
The same key works fine for get project <locator>, get revision <locator>, and a direct curl against /api/projects?count=1 returns
valid JSON — so the response itself is well-formed. Only fossapi's
response struct is intolerant of something in it.
Suggested fix
- Make the response struct tolerant of unknown / nullable fields
(#[serde(default)], Option<T>).
- If repro is hard to set up, comparing the live
/api/projects JSON
shape against the struct definition should surface the offending
field(s).
What
fossapi list projectsfails with a deserialization error against thereal
/api/projectsendpoint:The same key works fine for
get project <locator>,get revision <locator>, and a directcurlagainst/api/projects?count=1returnsvalid JSON — so the response itself is well-formed. Only fossapi's
response struct is intolerant of something in it.
Suggested fix
(
#[serde(default)],Option<T>)./api/projectsJSONshape against the struct definition should surface the offending
field(s).