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
181 stars 145 forks source link

Apps API is not properly represented with openapi codegen #493

Open duytiennguyen-okta opened 3 weeks ago

duytiennguyen-okta commented 3 weeks ago

Describe the bug?

Discriminator property is coming as "null" for some type of applications due to which returned response is not mapped to any polymorphic type. For ex- GET /api/v1/apps?filter=name eq "active_directory" Response:

[
    {
        "id": "0oa12ensf1P3tOPdF7k6",
        "orn": "orn:okta:idp:00o12eniiOtpqtsAZ7k6:apps:active_directory:0oa12ensf1P3tOPdF7k6",
        "name": "active_directory",
        "label": "iwa.dc",
        "status": "ACTIVE",
        "lastUpdated": "2024-11-05T20:58:46.000Z",
        "created": "2024-09-18T17:29:34.000Z",
        "accessibility": {
            "selfService": false,
            "errorRedirectUrl": null,
            "loginRedirectUrl": null
        },
        "visibility": {
            "autoSubmitToolbar": false,
            "hide": {
                "iOS": false,
                "web": false
            },
            "appLinks": {}
        },
        "features": [
            "IMPORT_PROFILE_UPDATES",
            "PROFILE_MASTERING",
            "OUTBOUND_DEL_AUTH",
            "IMPORT_USER_SCHEMA",
            "IMPORT_NEW_USERS"
        ],
        "signOnMode": null,
        "credentials": {
            "userNameTemplate": {
                "template": "substringBefore(user.login, \"@\") + \"@\" + target_app.namingContext",
                "type": "CUSTOM",
                "pushStatus": "NOT_CONFIGURED"
            },
            "signing": {}
        },
        "settings": {
            "app": {},
            "notifications": {
                "vpn": {
                    "network": {
                        "connection": "DISABLED"
                    },
                    "message": null,
                    "helpUrl": null
                }
            },
            "manualProvisioning": false,
            "implicitAssignment": false,
            "emOptInStatus": "NONE"
        },
    }
]

What is expected to happen?

Map to ListApplications200ResponseInner

What is the actual behavior?

Unable to map to ListApplications200ResponseInner because signOnMode is null

Reproduction Steps?

This is an issue with codegen

Additional Information?

No response

Golang Version

1.21

SDK Version

v5

OS version

No response

github-actions[bot] commented 1 week 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.