okta / okta-sdk-java

A Java SDK for interacting with the Okta management API, enabling server-side code to manage Okta users, groups, applications, and more.
Apache License 2.0
149 stars 135 forks source link

Readme is outdated / wrong #1579

Open fabianfrz opened 2 days ago

fabianfrz commented 2 days ago

Describe the bug?

Dear Okta-Team,

It looks like the API has changed in v20, leaving it very undocumented as the documentation, if existing, is hard to find.

What is expected to happen?

The samples under "Usage guide" do not work as the methods have a different signature.

What is the actual behavior?

for example, GetUserById has this signature:

public UserGetSingleton getUser(String id, String contentType, String expand) throws ApiException

Even the return type is com.okta.sdk.resource.model.UserGetSingleton instead of a User object.

The example on the readme mentions this

UserApi userApi = new UserApi(client);
User user = userApi.getUser("userId");

Reproduction Steps?

Build with version "20.0.0" in the pom

Additional Information?

No response

Java Version

openjdk version "17.0.12" 2024-07-16 OpenJDK Runtime Environment (build 17.0.12+7) OpenJDK 64-Bit Server VM (build 17.0.12+7, mixed mode, sharing)

SDK Version

20.0.0

OS version

NAME="Manjaro Linux" PRETTY_NAME="Manjaro Linux" ID=manjaro ID_LIKE=arch BUILD_ID=rolling ANSI_COLOR="32;1;24;144;200" HOME_URL="https://manjaro.org/" DOCUMENTATION_URL="https://wiki.manjaro.org/" SUPPORT_URL="https://forum.manjaro.org/" BUG_REPORT_URL="https://docs.manjaro.org/reporting-bugs/" PRIVACY_POLICY_URL="https://manjaro.org/privacy-policy/" LOGO=manjarolinux

arvindkrishnakumar-okta commented 2 days ago

Can you please double check the latest README here as most of the issues you mentioned have been fixed/non-existent already?

fabianfrz commented 2 days ago

Hi @arvindkrishnakumar-okta,

I looked into it and when I upgraded the library - multiple things have changed. For example:

I have looked into the changelogs and did not find it there that the UserAPI was split up that much. Also the thing with the User might cause a lot of trouble as the data in the UserGetSingleton as it is not 100% compatible with the User..