Skip to content

Commit a84a478

Browse files
committed
feat: handle unknown enum values in generated go sdk
1 parent 81b5dab commit a84a478

281 files changed

Lines changed: 1235 additions & 733 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

administrative/.openapi-generator/FILES

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
.openapi-generator-ignore
21
README.md
32
api_account_groups.go
43
api_permissions.go

administrative/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ go get github.com/stretchr/testify/assert
2828
go get golang.org/x/net/context
2929
```
3030

31+
## Enum Compatibility
32+
33+
The API may return enum values added after this SDK version was generated. In those cases, JSON deserialization maps those values to the generated `UNKNOWN` enum member instead of failing. Use the generated `IsValid()` and `New...FromValue()` helpers when you need to check whether a value is part of the SDK's known enum set.
34+
3135
Put the package under your project folder and add the following in import:
3236

3337
```go

administrative/model_cloud_enterprise_agent_type.go

Lines changed: 5 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

administrative/model_enterprise_agent_ipv6_policy.go

Lines changed: 5 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

administrative/model_enterprise_agent_state.go

Lines changed: 5 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

administrative/model_error_detail_code.go

Lines changed: 5 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

administrative/model_expand_account_group_options.go

Lines changed: 5 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

administrative/model_test_interval.go

Lines changed: 5 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

administrative/model_test_type.go

Lines changed: 5 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

agents/.openapi-generator/FILES

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
.openapi-generator-ignore
21
README.md
32
api_agent_proxies.go
43
api_cloud_and_enterprise_agent_notification_rules.go

0 commit comments

Comments
 (0)