Skip to content

feat: PhaseTwo API SDK generated via Kiota#175

Open
curiousvlxd wants to merge 1 commit intoNikiforovAll:mainfrom
curiousvlxd:feature/phasetwo-kiota-sdk
Open

feat: PhaseTwo API SDK generated via Kiota#175
curiousvlxd wants to merge 1 commit intoNikiforovAll:mainfrom
curiousvlxd:feature/phasetwo-kiota-sdk

Conversation

@curiousvlxd
Copy link

@curiousvlxd curiousvlxd commented Jun 24, 2025

Hi @NikiforovAll!

PhaseTwo is a set of extensions for Keycloak's Admin API, enabling advanced multi-tenancy, user, and organization management.
This PR introduces a Kiota-generated SDK for the PhaseTwo Admin API, based on the OpenAPI specification:
🔗 https://raw.githubusercontent.com/p2-inc/phasetwo-docs/main/openapi.yaml


To be done

  • Tests
  • Possible non-Kiota SDK implementation (separate project, tbd)

@curiousvlxd
Copy link
Author

I've followed such repetitive namespace naming, please let me know if it's correct:
PhaseTwo.AuthServices.Sdk.Kiota.Admin.Admin.* similar to Keycloak.AuthServices.Sdk.Kiota.Admin.Admin.*

@curiousvlxd curiousvlxd changed the title PhaseTwo API SDK generated via Kiota feat: PhaseTwo API SDK generated via Kiota Jun 24, 2025
@NikiforovAll NikiforovAll requested a review from Copilot June 26, 2025 05:56
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Introduces a Kiota-generated C# SDK for the PhaseTwo Keycloak Admin API, providing client, models, and DI extensions.

  • Adds kiota-lock.json to lock generator settings.
  • Provides ServiceCollectionExtensions and PhaseTwoAdminClientOptions for DI setup.
  • Includes generated PhaseTwoAdminApiClient, Models, RequestBuilders, and a new project file.

Reviewed Changes

Copilot reviewed 91 out of 91 changed files in this pull request and generated no comments.

File Description
src/PhaseTwo.AuthServices.Sdk.Kiota/kiota-lock.json Stores Kiota generator configuration
src/PhaseTwo.AuthServices.Sdk.Kiota/ServiceCollectionExtensions.cs Adds DI extension methods for the client
src/PhaseTwo.AuthServices.Sdk.Kiota/PhaseTwoAuthServices.Sdk.Kiota.csproj Defines project metadata and package settings
Comments suppressed due to low confidence (1)

src/PhaseTwo.AuthServices.Sdk.Kiota/ServiceCollectionExtensions.cs:147

  • [nitpick] The explicit assignment of options.SslRequired duplicates the input; consider removing it or documenting why it’s needed to reduce redundant code.
            // redundant

@NikiforovAll
Copy link
Owner

@curiousvlxd thank you for the contribution, and sorry for the late reply.

I think it is better to create keycloak-authorization-services-dotnet-contrib as a dedicated space for such extensions. It will be an opprotunity for others to be more creative. What do you think? If you agree, I will create the contrib repo and update the docs to point to it.

Are there any blockers that stop us from moving this one to the contrib repo?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants