Skip to content

/Apps api response and Sdk.Model.Application schema are different causing deserialization issues #792

@NisargKotak

Description

@NisargKotak

Describe the bug?

List all applications API (/apps api) returns a response which includes "settings" property. This property is missing in the Okta.Sdk.Model.Application schema - https://github.com/okta/okta-sdk-dotnet/blob/master/docs/Application.md

When we try to deserialize the API response to the Sdk.Application object instance, it results in a deserialization error - "Unexpected token: StartArray. Path 'settings.app.domains'"

What is expected to happen?

The schema in Sdk should be consistent with the API response and all the missing properties should be added to the schema. Deserialization should result in an error.

What is the actual behavior?

Deserialization of API response results in an error.

Reproduction Steps?

Call the Okta List all Applications endpoint -

curl -i -X GET
https://subdomain.okta.com/api/v1/apps
-H 'Authorization: YOUR_API_KEY_HERE'

Try deserializing response to Okta.Sdk.Application object:

JsonConvert.DeserializeObject<Okta.Sdk.Model.Application>(apiResponse);

This results in deserialization error:
"Unexpected token: StartArray. Path 'settings.app.domains'"

Additional Information?

No response

.NET Version

version 8.0.412

SDK Version

version 9.2.3

OS version

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions