@@ -26,12 +26,19 @@ type BumpFilter struct {
2626 metadata * Metadata
2727}
2828
29+ type State struct {
30+ Label string `json:"label"`
31+ Color string `json:"color"`
32+ }
33+
2934const (
30- stateFieldName = "x-state"
31- stateFieldValueUpcoming = "UPCOMING"
32- stateFieldValuePreview = "PREVIEW"
33- betaFieldName = "x-beta"
34- description = `This API is in preview. Breaking changes might be introduced before it is released. Don't use preview APIs in production.
35+ stateFieldName = "x-state"
36+ stateFieldValueUpcoming = "UPCOMING"
37+ stateFieldValuePreview = "PREVIEW"
38+ stateFieldValuePreviewColor = "#B89D09" // Yellow
39+ betaFieldName = "x-beta"
40+ description = `This API is in preview. Breaking changes might be introduced ` +
41+ `before it is released. Don't use preview APIs in production.
3542
3643`
3744)
@@ -71,7 +78,10 @@ func (f *BumpFilter) includeBumpFieldForPreview() error {
7178 if op .Extensions == nil {
7279 op .Extensions = map [string ]any {}
7380 }
74- op .Extensions [stateFieldName ] = stateFieldValuePreview
81+ op .Extensions [stateFieldName ] = State {
82+ Label : stateFieldValuePreview ,
83+ Color : stateFieldValuePreviewColor ,
84+ }
7585 op .Extensions [betaFieldName ] = true
7686 op .Description = description + " " + op .Description
7787 }
0 commit comments