Re:Kubernetes is a red flag signalling premature optimisation
by majewsky on Monday July 04, 2022 @05:49AM
(#31975294)
Sounds about right. I have an API service written in Go for which we also offer a client library in Go. We moved the common ground between the two into a separate module to avoid code duplication. That module ended up having the type declarations that appear on the API in JSON payloads, plus some serialization/validation helper methods, and that's it.
[ Parent
| on HN ]
Re:Kubernetes is a red flag signalling premature optimisation
by cryptonym on Wednesday July 06, 2022 @10:22AM
(#32001428)
True, that can be a valid use-case. Another solution would be to leverage language agnostic API discovery solutions, generating the serialisation and part of validation code (swagger/open api/...). This way you provide a nice documentation and don't have to care about language differences while keeping good productivity.