summaryrefslogtreecommitdiff
path: root/contributors/devel/api_changes.md
diff options
context:
space:
mode:
authork8s-ci-robot <k8s-ci-robot@users.noreply.github.com>2018-07-09 16:30:05 -0700
committerGitHub <noreply@github.com>2018-07-09 16:30:05 -0700
commite0fa8e2bd1bee31244a9e05068bd95da4e892c8a (patch)
treed1435701d3fdd39ad75369056c43e0ad4946126b /contributors/devel/api_changes.md
parentc87a2f0d8a891ac9ec33c2cc34ff8b488370fb7c (diff)
parent6fc625b0e31acf46865bfc8a4114210dca070a0a (diff)
Merge pull request #2261 from nikhita/api-changes-remove-proto-definitions
api_changes: remove proto tags from examples
Diffstat (limited to 'contributors/devel/api_changes.md')
-rw-r--r--contributors/devel/api_changes.md24
1 files changed, 12 insertions, 12 deletions
diff --git a/contributors/devel/api_changes.md b/contributors/devel/api_changes.md
index 303c43a8..4aa930a6 100644
--- a/contributors/devel/api_changes.md
+++ b/contributors/devel/api_changes.md
@@ -791,9 +791,9 @@ For example, consider the following object:
// API v6.
type Frobber struct {
// height ...
- Height *int32 `json:"height" protobuf:"varint,1,opt,name=height"`
+ Height *int32 `json:"height"
// param ...
- Param string `json:"param" protobuf:"bytes,2,opt,name=param"`
+ Param string `json:"param"
}
```
@@ -803,11 +803,11 @@ A developer is considering adding a new `Width` parameter, like this:
// API v6.
type Frobber struct {
// height ...
- Height *int32 `json:"height" protobuf:"varint,1,opt,name=height"`
+ Height *int32 `json:"height"
// param ...
- Param string `json:"param" protobuf:"bytes,2,opt,name=param"`
+ Param string `json:"param"
// width ...
- Width *int32 `json:"width,omitempty" protobuf:"varint,3,opt,name=width"`
+ Width *int32 `json:"width,omitempty"
}
```
@@ -861,13 +861,13 @@ The preferred approach adds an alpha field to the existing object, and ensures i
// API v6.
type Frobber struct {
// height ...
- Height int32 `json:"height" protobuf:"varint,1,opt,name=height"`
+ Height int32 `json:"height"`
// param ...
- Param string `json:"param" protobuf:"bytes,2,opt,name=param"`
+ Param string `json:"param"`
// width indicates how wide the object is.
// This field is alpha-level and is only honored by servers that enable the Frobber2D feature.
// +optional
- Width *int32 `json:"width,omitempty" protobuf:"varint,3,opt,name=width"`
+ Width *int32 `json:"width,omitempty"`
}
```
@@ -934,15 +934,15 @@ In future Kubernetes versions:
Another option is to introduce a new type with an new `alpha` or `beta` version
designator, like this:
-```
+```go
// API v7alpha1
type Frobber struct {
// height ...
- Height *int32 `json:"height" protobuf:"varint,1,opt,name=height"`
+ Height *int32 `json:"height"`
// param ...
- Param string `json:"param" protobuf:"bytes,2,opt,name=param"`
+ Param string `json:"param"`
// width ...
- Width *int32 `json:"width,omitempty" protobuf:"varint,3,opt,name=width"`
+ Width *int32 `json:"width,omitempty"`
}
```