GopherCon Europe 2020: Marcel van Lohuizen - Better APIs with Shareable Validation Logic28:10 351 views 100% Published 2 months ago
About the talk:
Validating data at various points, like in clients and servers, is desirable. But keeping validation logic in sync between, say Go code and OpenAPI is prone to errors and toil. CUE addresses this issue with the ability to convert and combine various formats. This allows for some cool and exciting rewriting capabilities, such as generating a single documented OpenAPI spec from various sources and automated compatibility checks. It addresses the issue that validation logic can often not be consolidated into one place or format.
The demonstrated abilities are based on experience from the Istio pipeline and the author’s research into composing CRD schemas for Kubernetes.
The talk will demonstrate several conversions, including JSON schema, OpenAPI, and simple tricks in CUE itself.
About the speaker:
Marcel van Lohuizen (@mpvl_) is part of the Go team at Google, where he has worked on things like testing, error handling and the x/text repository. He currently is focussed on the development of CUE, a constraint-based, aspect-oriented data language.
Before working on the Go team, he worked on search and Borg (Google’s large-scale cluster manager), among other things.