crossplane / docs

Repo for Crossplane documentation.
https://docs.crossplane.io
Other
46 stars 105 forks source link

Tips for (XR) API design #564

Open negz opened 9 months ago

negz commented 9 months ago

What's Missing?

One challenge folks getting started with Crossplane have is how to design their custom APIs - i.e. how to design XR OpenAPI schemas. It's hard to go from nothing to a serviceable API that can evolve over time without breaking changes.

I think the Crossplane maintainers will have some useful tips for this. A lot of our job is designing new APIs for Crossplane, and we've certainly made and learned mistakes with Crossplane's APIs. Kubernetes API conventions capture a lot of this and we could draw out some of the more important things called out in that document. I'd also include things like:

negz commented 4 months ago

I think this would probably include https://github.com/crossplane/docs/issues/478.

negz commented 4 months ago

Another little thing: don't make status fields required.

jbw976 commented 3 months ago

This K8s API doc on "Changing the API" is probably also helpful here: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api_changes.md

This document is oriented at developers who want to change existing APIs