File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,8 @@ const (
3131 stateFieldValueUpcoming = "Upcoming"
3232 stateFieldValuePreview = "Preview"
3333 betaFieldName = "x-beta"
34+ description = "\n This API is in preview. Breaking changes might be introduced before it is released. " +
35+ "Don't use preview APIs in production."
3436)
3537
3638func (f * BumpFilter ) ValidateMetadata () error {
@@ -70,6 +72,7 @@ func (f *BumpFilter) includeBumpFieldForPreview() error {
7072 }
7173 op .Extensions [stateFieldName ] = stateFieldValuePreview
7274 op .Extensions [betaFieldName ] = true
75+ op .Description += description
7376 }
7477 }
7578 return nil
Original file line number Diff line number Diff line change @@ -70,6 +70,7 @@ func TestBumpFilter_Apply_Preview(t *testing.T) {
7070 assert .Equal (t , "Preview" , op .Extensions ["x-state" ])
7171 assert .Contains (t , op .Extensions , "x-beta" )
7272 assert .Equal (t , true , op .Extensions ["x-beta" ])
73+ assert .Contains (t , description , op .Description )
7374}
7475
7576func TestBumpFilter_Apply_Upcoming (t * testing.T ) {
@@ -115,6 +116,7 @@ func TestBumpFilter_Apply_Upcoming(t *testing.T) {
115116 assert .Contains (t , op .Extensions , "x-state" )
116117 assert .Equal (t , "Upcoming" , op .Extensions ["x-state" ])
117118 assert .NotContains (t , op .Extensions , "x-beta" )
119+ assert .NotContains (t , op .Description , description )
118120}
119121
120122func TestBumpFilter_Apply_Stable (t * testing.T ) {
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments