summaryrefslogtreecommitdiff
path: root/api_changes.md
diff options
context:
space:
mode:
authorClayton Coleman <ccoleman@redhat.com>2016-04-22 11:48:58 -0400
committerClayton Coleman <ccoleman@redhat.com>2016-04-27 21:15:36 -0400
commitb2a0bc70116a62b046542b20f0a6b594ba009851 (patch)
treefee3fccbe54592d3851be8686210cde6c3732540 /api_changes.md
parentf3e75e1aa70561dd8272281a1c078ba6a479e7a4 (diff)
Protobuf doc changes
Diffstat (limited to 'api_changes.md')
-rw-r--r--api_changes.md17
1 files changed, 17 insertions, 0 deletions
diff --git a/api_changes.md b/api_changes.md
index 987d5576..703b1743 100644
--- a/api_changes.md
+++ b/api_changes.md
@@ -51,6 +51,7 @@ found at [API Conventions](api-conventions.md).
- [Edit types.go](#edit-typesgo)
- [Edit validation.go](#edit-validationgo)
- [Edit version conversions](#edit-version-conversions)
+ - [Generate protobuf objects](#generate-protobuf-objects)
- [Edit json (un)marshaling code](#edit-json-unmarshaling-code)
- [Making a new API Group](#making-a-new-api-group)
- [Update the fuzzer](#update-the-fuzzer)
@@ -472,6 +473,22 @@ generator to create it from scratch.
Unsurprisingly, adding manually written conversion also requires you to add tests to
`pkg/api/<version>/conversion_test.go`.
+## Generate protobuf objects
+
+For any core API object, we also need to generate the Protobuf IDL and marshallers.
+That generation is done with
+
+```sh
+hack/update-generated-protobuf.sh
+```
+
+The vast majority of objects will not need any consideration when converting
+to protobuf, but be aware that if you depend on a Golang type in the standard
+library there may be additional work requried, although in practice we typically
+use our own equivalents for JSON serialization. The `pkg/api/serialization_test.go`
+will verify that your protobuf serialization preserves all fields - be sure to
+run it several times to ensure there are no incompletely calculated fields.
+
## Edit json (un)marshaling code
We are auto-generating code for marshaling and unmarshaling json representation