Skip to content

Rename main client class to Zitadel::Client for API consistency#37

Merged
mridang merged 1 commit into
mainfrom
harmonise-module-naming
May 20, 2025
Merged

Rename main client class to Zitadel::Client for API consistency#37
mridang merged 1 commit into
mainfrom
harmonise-module-naming

Conversation

@mridang

@mridang mridang commented May 20, 2025

Copy link
Copy Markdown
Collaborator

Which Problems Are Solved

This PR addresses the naming convention of the main public API class in the Ruby SDK. Specifically:

  • The previous main client class name (e.g., Zitadel::ZitadelClient or a similar variation) was less aligned with the desired concise naming strategy for SDK components.
  • This change aims to provide a clearer, more idiomatic, and standardized entry point for users of the Zitadel Ruby SDK, making it more intuitive.

How the Problems Are Solved

The primary SDK class has been refined to improve clarity and consistency:

  • Renamed the main public client class to Client and ensured it is properly namespaced under the top-level Zitadel module. The fully qualified name for the main class is now Zitadel::Client.
  • Updated the class definition file (e.g., likely moved from lib/zitadel/zitadel_client.rb or similar to lib/zitadel/client.rb).
  • Modified all internal references, instantiation examples (e.g., Zitadel::Client.new(...) or Zitadel::Client.withPrivateKey(...)), and method calls throughout the SDK to use the new Zitadel::Client class.
  • Adjusted the test suite to accurately reflect and test the renamed class and its usage.

Additional Changes

To support the primary renaming and ensure a smooth transition:

  • Updated all documentation (README.md, code comments, and any other relevant guides) to reflect the new class name Zitadel::Client and its usage.
  • Ensured all provided code snippets and examples for SDK initialization and usage now correctly demonstrate interaction with Zitadel::Client.
  • Verified that the gem's main module file (lib/zitadel.rb) correctly requires and loads the renamed client class file.

Additional Context

This renaming to Zitadel::Client helps align the Ruby SDK's namespace and class structure with patterns used in our other SDKs, promoting consistency across the Zitadel ecosystem:

  • It introduces a clear Client identifier as the primary class name within the main Zitadel module. This is conceptually similar to how the PHP SDK organizes its client under a Zitadel\Client namespace structure.
  • It maintains a consistent top-level Zitadel module for the gem, which is akin to the com.zitadel base package in the Java SDK and the Zitadel vendor namespace in PHP.

You can also add specific issue links if they apply:

  • Closes #[issue_number]
  • Related to discussion in [link to Slack/Discord thread, GitHub Discussion]

@mridang mridang force-pushed the harmonise-module-naming branch from bd968ea to f16af1c Compare May 20, 2025 14:17
@github-actions

Copy link
Copy Markdown
Contributor

Qodana for PHP

It seems all right 👌

No new problems were found according to the checks applied

💡 Qodana analysis was run in the pull request mode: only the changed files were checked
☁️ View the detailed Qodana report

Contact Qodana team

Contact us at qodana-support@jetbrains.com

@mridang mridang self-assigned this May 20, 2025
@mridang mridang added the enhancement New feature or request label May 20, 2025
@mridang mridang changed the title feat: harmonised the namespaces so they are similar to the other SDKs Rename main client class to Zitadel::Client for API consistency May 20, 2025
@mridang mridang merged commit af2a765 into main May 20, 2025
14 checks passed
github-actions Bot pushed a commit that referenced this pull request May 20, 2025
# [1.5.0](v1.4.2...v1.5.0) (2025-05-20)

### Features

* harmonised the namespaces so they are similar to the other SDKs ([#37](#37)) ([af2a765](af2a765))
* regenerated the sdk to ensure that the new namespaces work ([321237a](321237a))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant