Skip to content

Commit 261ffb3

Browse files
committed
fix(api): make zero-value request fields nullable, fix wrong property name
Five surgical spec fixes so the generated Go SDK can express "false"/"0" and so a renamed server field actually round-trips: - RUM application update: is_private/no_ip/no_geo are now ["boolean","null"] instead of "boolean". A non-nullable optional bool generates a Go bool with omitempty, and the JSON encoder silently drops false — so these toggles could be turned on but never back off via the update endpoint. The create schema is unaffected; it never needed this. - RUM field list is_facet is now ["boolean","null"], and its description is corrected: omitted/null returns all fields, true returns only facet-enabled fields, false returns only non-facet fields (the previous description incorrectly said false behaved the same as omitted). - RUM application alerting.enabled is now ["boolean","null"]. The generated SDK marks the whole alerting object omitzero, so a minimal {"enabled": false} payload is entirely zero-valued and the whole alerting key gets dropped from the request. Making enabled nullable gives the object a non-zero field so it survives serialization, letting callers disable alerting without resending unrelated fields. - On-call schedule notify advance_in_time is now ["integer","null"]. 0 is a meaningful value (notify exactly at shift start) but was unreachable through a plain "integer" field with omitempty; omitting the field now explicitly means "no advance notification". - Renamed the notification template property feishu_app_card_table_enabled to feishu_app_card_v2_table_enabled in the template create/update request schemas (and the shared item schema) to match the field the server actually binds and persists. The old name was silently discarded by JSON binding, so no value the SDK sent for this property ever reached the server, in either direction.
1 parent 07dedf5 commit 261ffb3

6 files changed

Lines changed: 132 additions & 60 deletions

File tree

api-reference/on-call.openapi.en.json

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26947,9 +26947,12 @@
2694726947
],
2694826948
"properties": {
2694926949
"advance_in_time": {
26950-
"type": "integer",
26950+
"type": [
26951+
"integer",
26952+
"null"
26953+
],
2695126954
"format": "int64",
26952-
"description": "Advance notification lead time (seconds)."
26955+
"description": "Advance notification lead time in seconds. `0` notifies exactly at shift start; omitting disables advance notification."
2695326956
},
2695426957
"fixed_time": {
2695526958
"$ref": "#/components/schemas/ScheduleFixedTimeNotifyInfo"
@@ -27781,7 +27784,7 @@
2778127784
"type": "string",
2778227785
"description": "Feishu app message template source."
2778327786
},
27784-
"feishu_app_card_table_enabled": {
27787+
"feishu_app_card_v2_table_enabled": {
2778527788
"type": "boolean",
2778627789
"default": false,
2778727790
"description": "Render alert labels as a table in Feishu app cards."
@@ -27870,7 +27873,7 @@
2787027873
"wecom",
2787127874
"feishu",
2787227875
"feishu_app",
27873-
"feishu_app_card_table_enabled",
27876+
"feishu_app_card_v2_table_enabled",
2787427877
"dingtalk_app",
2787527878
"wecom_app",
2787627879
"slack_app",
@@ -27937,7 +27940,7 @@
2793727940
"type": "string",
2793827941
"description": "Feishu app message template source."
2793927942
},
27940-
"feishu_app_card_table_enabled": {
27943+
"feishu_app_card_v2_table_enabled": {
2794127944
"type": "boolean",
2794227945
"description": "Whether alert labels use table rendering in Feishu app cards."
2794327946
},
@@ -28154,7 +28157,7 @@
2815428157
"type": "string",
2815528158
"description": "Feishu app message template source."
2815628159
},
28157-
"feishu_app_card_table_enabled": {
28160+
"feishu_app_card_v2_table_enabled": {
2815828161
"type": [
2815928162
"boolean",
2816028163
"null"

api-reference/on-call.openapi.zh.json

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26938,9 +26938,12 @@
2693826938
],
2693926939
"properties": {
2694026940
"advance_in_time": {
26941-
"type": "integer",
26941+
"type": [
26942+
"integer",
26943+
"null"
26944+
],
2694226945
"format": "int64",
26943-
"description": "提前通知时间(秒)。"
26946+
"description": "提前通知时间(秒);为 `0` 时在排班开始时通知;不传则不发送提前通知。"
2694426947
},
2694526948
"fixed_time": {
2694626949
"$ref": "#/components/schemas/ScheduleFixedTimeNotifyInfo"
@@ -27772,7 +27775,7 @@
2777227775
"type": "string",
2777327776
"description": "飞书应用消息模板源。"
2777427777
},
27775-
"feishu_app_card_table_enabled": {
27778+
"feishu_app_card_v2_table_enabled": {
2777627779
"type": "boolean",
2777727780
"default": false,
2777827781
"description": "是否在飞书应用卡片中以表格渲染告警标签,默认关闭。"
@@ -27861,7 +27864,7 @@
2786127864
"wecom",
2786227865
"feishu",
2786327866
"feishu_app",
27864-
"feishu_app_card_table_enabled",
27867+
"feishu_app_card_v2_table_enabled",
2786527868
"dingtalk_app",
2786627869
"wecom_app",
2786727870
"slack_app",
@@ -27928,7 +27931,7 @@
2792827931
"type": "string",
2792927932
"description": "飞书应用消息模板源。"
2793027933
},
27931-
"feishu_app_card_table_enabled": {
27934+
"feishu_app_card_v2_table_enabled": {
2793227935
"type": "boolean",
2793327936
"description": "是否在飞书应用卡片中以表格渲染告警标签。"
2793427937
},
@@ -28145,7 +28148,7 @@
2814528148
"type": "string",
2814628149
"description": "飞书应用消息模板源。"
2814728150
},
28148-
"feishu_app_card_table_enabled": {
28151+
"feishu_app_card_v2_table_enabled": {
2814928152
"type": [
2815028153
"boolean",
2815128154
"null"

api-reference/openapi.en.json

Lines changed: 33 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -38514,9 +38514,12 @@
3851438514
],
3851538515
"properties": {
3851638516
"advance_in_time": {
38517-
"type": "integer",
38517+
"type": [
38518+
"integer",
38519+
"null"
38520+
],
3851838521
"format": "int64",
38519-
"description": "Advance notification lead time (seconds)."
38522+
"description": "Advance notification lead time in seconds. `0` notifies exactly at shift start; omitting disables advance notification."
3852038523
},
3852138524
"fixed_time": {
3852238525
"$ref": "#/components/schemas/ScheduleFixedTimeNotifyInfo"
@@ -39462,7 +39465,7 @@
3946239465
"wecom",
3946339466
"feishu",
3946439467
"feishu_app",
39465-
"feishu_app_card_table_enabled",
39468+
"feishu_app_card_v2_table_enabled",
3946639469
"dingtalk_app",
3946739470
"wecom_app",
3946839471
"slack_app",
@@ -39529,7 +39532,7 @@
3952939532
"type": "string",
3953039533
"description": "Feishu app message template source."
3953139534
},
39532-
"feishu_app_card_table_enabled": {
39535+
"feishu_app_card_v2_table_enabled": {
3953339536
"type": "boolean",
3953439537
"description": "Whether alert labels use table rendering in Feishu app cards."
3953539538
},
@@ -39754,7 +39757,7 @@
3975439757
"type": "string",
3975539758
"description": "Feishu app message template source."
3975639759
},
39757-
"feishu_app_card_table_enabled": {
39760+
"feishu_app_card_v2_table_enabled": {
3975839761
"type": "boolean",
3975939762
"default": false,
3976039763
"description": "Render alert labels as a table in Feishu app cards."
@@ -39872,7 +39875,7 @@
3987239875
"type": "string",
3987339876
"description": "Feishu app message template source."
3987439877
},
39875-
"feishu_app_card_table_enabled": {
39878+
"feishu_app_card_v2_table_enabled": {
3987639879
"type": [
3987739880
"boolean",
3987839881
"null"
@@ -44520,7 +44523,10 @@
4452044523
"description": "Alert settings for the application.",
4452144524
"properties": {
4452244525
"enabled": {
44523-
"type": "boolean",
44526+
"type": [
44527+
"boolean",
44528+
"null"
44529+
],
4452444530
"description": "Whether alerting is enabled."
4452544531
},
4452644532
"channel_ids": {
@@ -44901,16 +44907,25 @@
4490144907
"description": "Owning team ID. Get team IDs via `POST /team/list`. Omit to leave unchanged."
4490244908
},
4490344909
"is_private": {
44904-
"type": "boolean",
44905-
"description": "Restrict access to members of the owning team. Omit to leave unchanged."
44910+
"type": [
44911+
"boolean",
44912+
"null"
44913+
],
44914+
"description": "Restrict access to members of the owning team; `false` explicitly makes the application public. Omit to leave unchanged."
4490644915
},
4490744916
"no_ip": {
44908-
"type": "boolean",
44909-
"description": "When `true`, stop collecting user IP addresses. Omit to leave unchanged."
44917+
"type": [
44918+
"boolean",
44919+
"null"
44920+
],
44921+
"description": "When `true`, stop collecting user IP addresses; when `false`, resume collecting them. Omit to leave unchanged."
4491044922
},
4491144923
"no_geo": {
44912-
"type": "boolean",
44913-
"description": "When `true`, stop inferring geographic location from IP. Omit to leave unchanged."
44924+
"type": [
44925+
"boolean",
44926+
"null"
44927+
],
44928+
"description": "When `true`, stop inferring geographic location from IP; when `false`, resume inferring it. Omit to leave unchanged."
4491444929
},
4491544930
"alerting": {
4491644931
"$ref": "#/components/schemas/RumApplicationAlerting",
@@ -49781,8 +49796,11 @@
4978149796
"description": "Filter by RUM data scopes. Valid values: `session`, `view`, `action`, `error`, `resource`, `long_task`, `vital`, `issue`, `sourcemap`."
4978249797
},
4978349798
"is_facet": {
49784-
"type": "boolean",
49785-
"description": "When true, return only facet-enabled fields. When false or omitted, return all fields."
49799+
"type": [
49800+
"boolean",
49801+
"null"
49802+
],
49803+
"description": "When omitted or `null`, return all fields. When `true`, return only facet-enabled fields. When `false`, return only fields that are not facet-enabled."
4978649804
}
4978749805
}
4978849806
},

api-reference/openapi.zh.json

Lines changed: 33 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -38505,9 +38505,12 @@
3850538505
],
3850638506
"properties": {
3850738507
"advance_in_time": {
38508-
"type": "integer",
38508+
"type": [
38509+
"integer",
38510+
"null"
38511+
],
3850938512
"format": "int64",
38510-
"description": "提前通知时间(秒)。"
38513+
"description": "提前通知时间(秒);为 `0` 时在排班开始时通知;不传则不发送提前通知。"
3851138514
},
3851238515
"fixed_time": {
3851338516
"$ref": "#/components/schemas/ScheduleFixedTimeNotifyInfo"
@@ -39453,7 +39456,7 @@
3945339456
"wecom",
3945439457
"feishu",
3945539458
"feishu_app",
39456-
"feishu_app_card_table_enabled",
39459+
"feishu_app_card_v2_table_enabled",
3945739460
"dingtalk_app",
3945839461
"wecom_app",
3945939462
"slack_app",
@@ -39520,7 +39523,7 @@
3952039523
"type": "string",
3952139524
"description": "飞书应用消息模板源。"
3952239525
},
39523-
"feishu_app_card_table_enabled": {
39526+
"feishu_app_card_v2_table_enabled": {
3952439527
"type": "boolean",
3952539528
"description": "是否在飞书应用卡片中以表格渲染告警标签。"
3952639529
},
@@ -39745,7 +39748,7 @@
3974539748
"type": "string",
3974639749
"description": "飞书应用消息模板源。"
3974739750
},
39748-
"feishu_app_card_table_enabled": {
39751+
"feishu_app_card_v2_table_enabled": {
3974939752
"type": "boolean",
3975039753
"default": false,
3975139754
"description": "是否在飞书应用卡片中以表格渲染告警标签,默认关闭。"
@@ -39863,7 +39866,7 @@
3986339866
"type": "string",
3986439867
"description": "飞书应用消息模板源。"
3986539868
},
39866-
"feishu_app_card_table_enabled": {
39869+
"feishu_app_card_v2_table_enabled": {
3986739870
"type": [
3986839871
"boolean",
3986939872
"null"
@@ -44511,7 +44514,10 @@
4451144514
"description": "应用的告警配置。",
4451244515
"properties": {
4451344516
"enabled": {
44514-
"type": "boolean",
44517+
"type": [
44518+
"boolean",
44519+
"null"
44520+
],
4451544521
"description": "是否启用告警。"
4451644522
},
4451744523
"channel_ids": {
@@ -44892,16 +44898,25 @@
4489244898
"description": "应用所属团队 ID,可通过 `POST /team/list` 获取;不传则保持不变。"
4489344899
},
4489444900
"is_private": {
44895-
"type": "boolean",
44896-
"description": "是否仅限所属团队成员访问;不传则保持不变。"
44901+
"type": [
44902+
"boolean",
44903+
"null"
44904+
],
44905+
"description": "是否仅限所属团队成员访问;`false` 显式改为公开访问;不传则保持不变。"
4489744906
},
4489844907
"no_ip": {
44899-
"type": "boolean",
44900-
"description": "为 `true` 时停止采集用户 IP 地址;不传则保持不变。"
44908+
"type": [
44909+
"boolean",
44910+
"null"
44911+
],
44912+
"description": "为 `true` 时停止采集用户 IP 地址,为 `false` 时恢复采集;不传则保持不变。"
4490144913
},
4490244914
"no_geo": {
44903-
"type": "boolean",
44904-
"description": "为 `true` 时不再基于 IP 推断地理位置;不传则保持不变。"
44915+
"type": [
44916+
"boolean",
44917+
"null"
44918+
],
44919+
"description": "为 `true` 时不再基于 IP 推断地理位置,为 `false` 时恢复推断;不传则保持不变。"
4490544920
},
4490644921
"alerting": {
4490744922
"$ref": "#/components/schemas/RumApplicationAlerting",
@@ -49772,8 +49787,11 @@
4977249787
"description": "按 RUM 数据 scope 过滤。合法值:`session`、`view`、`action`、`error`、`resource`、`long_task`、`vital`、`issue`、`sourcemap`。"
4977349788
},
4977449789
"is_facet": {
49775-
"type": "boolean",
49776-
"description": "为 true 时只返回支持分面查询的字段;为 false 或不传时返回所有字段。"
49790+
"type": [
49791+
"boolean",
49792+
"null"
49793+
],
49794+
"description": "不传或为 `null` 时返回所有字段;为 `true` 时只返回支持分面查询的字段;为 `false` 时只返回不支持分面查询的字段。"
4977749795
}
4977849796
}
4977949797
},

api-reference/rum.openapi.en.json

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3715,7 +3715,10 @@
37153715
"description": "Alert settings for the application.",
37163716
"properties": {
37173717
"enabled": {
3718-
"type": "boolean",
3718+
"type": [
3719+
"boolean",
3720+
"null"
3721+
],
37193722
"description": "Whether alerting is enabled."
37203723
},
37213724
"channel_ids": {
@@ -4135,16 +4138,25 @@
41354138
"description": "Owning team ID. Get team IDs via `POST /team/list`. Omit to leave unchanged."
41364139
},
41374140
"is_private": {
4138-
"type": "boolean",
4139-
"description": "Restrict access to members of the owning team. Omit to leave unchanged."
4141+
"type": [
4142+
"boolean",
4143+
"null"
4144+
],
4145+
"description": "Restrict access to members of the owning team; `false` explicitly makes the application public. Omit to leave unchanged."
41404146
},
41414147
"no_ip": {
4142-
"type": "boolean",
4143-
"description": "When `true`, stop collecting user IP addresses. Omit to leave unchanged."
4148+
"type": [
4149+
"boolean",
4150+
"null"
4151+
],
4152+
"description": "When `true`, stop collecting user IP addresses; when `false`, resume collecting them. Omit to leave unchanged."
41444153
},
41454154
"no_geo": {
4146-
"type": "boolean",
4147-
"description": "When `true`, stop inferring geographic location from IP. Omit to leave unchanged."
4155+
"type": [
4156+
"boolean",
4157+
"null"
4158+
],
4159+
"description": "When `true`, stop inferring geographic location from IP; when `false`, resume inferring it. Omit to leave unchanged."
41484160
},
41494161
"alerting": {
41504162
"$ref": "#/components/schemas/RumApplicationAlerting",
@@ -4583,8 +4595,11 @@
45834595
"description": "Filter by RUM data scopes. Valid values: `session`, `view`, `action`, `error`, `resource`, `long_task`, `vital`, `issue`, `sourcemap`."
45844596
},
45854597
"is_facet": {
4586-
"type": "boolean",
4587-
"description": "When true, return only facet-enabled fields. When false or omitted, return all fields."
4598+
"type": [
4599+
"boolean",
4600+
"null"
4601+
],
4602+
"description": "When omitted or `null`, return all fields. When `true`, return only facet-enabled fields. When `false`, return only fields that are not facet-enabled."
45884603
}
45894604
}
45904605
},

0 commit comments

Comments
 (0)