Skip to content
Merged
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
4 changes: 2 additions & 2 deletions src/content/docs/developer-tools/sdks/backend/ruby-sdk.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ If you configured a logout redirect url in Kinde, you’ll receive a logout call
To have a new organization created within your application, you will need to run something like:

```ruby
client.organizations.create_organization(create_organization_request: {name: "new_org"})
client.organizations.create_organization(name: "new_org")
```

### Sign up and sign in to organizations
Expand Down 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: "example@asd.com"}}]
  }
)
  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