Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: updated the create or documentation #290

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/content/docs/developer-tools/sdks/backend/ruby-sdk.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ This token can then be used to call any of the endpoints in the [Kinde Manageme
client = KindeSdk.client({"access_token" => $redis.get("kinde_m2m_token")})
client.organizations.get_organizations

client.organizations.create_organization(create_organization_request: {name: "new_org"})
client.organizations.create_organization(name: "new_org")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Documentation shows inconsistent method signatures for creating organizations

The simplified method signature create_organization(name: "new_org") shown here conflicts with other examples in the documentation that use the original signature create_organization(create_organization_request: {name: "new_org"}). This inconsistency could confuse developers.

Please ensure all examples consistently use the same method signature throughout the documentation. If the signature has been simplified in a new version, consider:

  1. Adding a version note to indicate when this change was introduced
  2. Updating all examples to use the new signature
  3. Adding a migration guide if this is a breaking change

🛠️ Refactor suggestion

Documentation shows multiple patterns for user creation

The documentation presents two different approaches for creating users:

  1. Direct hash creation:
client.users.create_user(
  create_user_request: {
    profile: {given_name: "name", family_name: "surname"},
    identities: [{type: "email", details: {email: "[email protected]"}}]
  }
)
  1. Using model instances:
request = KindeApi::CreateUserRequest.new(...)
client.users.create_user(create_user_request: request)

This could confuse developers about the recommended approach.

Consider:

  1. Clearly indicating which approach is preferred
  2. Adding version information if these represent different SDK versions
  3. Removing deprecated examples if any
  4. Adding examples of the simplified signature mentioned in the AI summary

```

### Create new user
Expand Down
Loading