Open TheOneWithTheBraid opened 3 years ago
Yes, we should fix that. Do you think you can propose a change? Or collect invalid returns?
I will try it. Where is the source code of the API located? In the backend or in a separate repo? I would probably even like to fix it...
Well, is https://github.com/mailcow/cow-app really the right repo for the API?
I have tried to look into that as well. I think the current API code is in https://github.com/mailcow/mailcow-dockerized/blob/master/data/web/json_api.php The repo https://github.com/mailcow/cow-app seems to be some kind of proof of concept at this state?
Oh, sorry, overlooked this. Yes, the json_api.php is what you are looking for.
The cow-app repository is a WIP as of today, yes.
Thanks for the clarification. Is there any information on this WIP? I have thought of implementing a terraform provider. But currently it is not clear to me if that makes sense or if the whole API will change? Also I might be interested in helping with the development of this WIP.
The cow-app is a mail UI. :) Not related.
Summary
It would be great to have static types in the API. Currently, in many types of responses, the mailcow API returns non-constant types:
get/domain
'sbytes_total
sometimes returns Strings, sometimes ints. For languages with static typing, it is very hard to handle this inconsistency.I propose to standardize the types used.
Motivation
I currently try to integrate the mailcow API into a Dart server, which seems to be difficult due to the non-static types.
Additional context
Nope