okta / okta-sdk-golang

A Golang SDK for interacting with the Okta management API, enabling server-side code to manage Okta users, groups, applications, and more.
https://github.com/okta/okta-sdk-golang
Other
173 stars 143 forks source link

UserGetSingleton Type Error #419

Closed tgoodsell-tempus closed 6 months ago

tgoodsell-tempus commented 9 months ago

Describe the bug?

UserGetSingleton has an incorrect type for its type field it appears. Based on the documentation, this is returning a error upstream such as: https://github.com/okta/terraform-provider-okta/issues/1836

What is expected to happen?

Property unmarshalls to the GoStruct successfully

What is the actual behavior?

Does not happen

Reproduction Steps?

See the Terraform Provider Issue

Additional Information?

https://github.com/okta/okta-sdk-golang/blob/846efbd8f9f45f3bf295acf2ff4e3a2ea63a9e3b/okta/docs/UserGetSingleton.md?plain=1#L18C2-L18C2

Golang Version

go version go1.21.4 darwin/arm64

SDK Version

3.0.18

OS version

No response

tgoodsell-tempus commented 9 months ago

This seems to be because the spec used to generate this is incorrect compared to upstream:

Bad spec: https://github.com/okta/okta-sdk-golang/blob/65eaabab4de5851f3d66a2068003842290b9df85/.generator/okta-management-APIs-oasv3-enum-inheritance.yaml#L35902C7-L35902C7

Upstream spec: https://github.com/okta/okta-management-openapi-spec/blob/61659e78d1ff598ac43766f4c7e969080e6c6e15/resources/3.0/management.yaml#L27782

I don't want to try and DIY a fix since I have no idea if we should be using the v3 spec at all (the upstream repo documentation indicates the v2 as the primary spec) nor do I understand why this spec is pulled into this repo at all.

github-actions[bot] commented 8 months ago

This issue has been marked stale because there has been no activity within the last 14 days. To keep this issue active, remove the stale label.

github-actions[bot] commented 7 months ago

This issue has been marked stale because there has been no activity within the last 14 days. To keep this issue active, remove the stale label.

duytiennguyen-okta commented 6 months ago

This is fixed in v3.0.19