Skip to content

fix: skip ConfigurationSchema.json generation for non-public clients#10284

Merged
JoshLove-msft merged 1 commit intomicrosoft:mainfrom
JoshLove-msft:fix/skip-config-schema-for-internal-clients
Apr 7, 2026
Merged

fix: skip ConfigurationSchema.json generation for non-public clients#10284
JoshLove-msft merged 1 commit intomicrosoft:mainfrom
JoshLove-msft:fix/skip-config-schema-for-internal-clients

Conversation

@JoshLove-msft
Copy link
Copy Markdown
Contributor

ConfigurationSchemaGenerator was generating schemas for clients that had been made internal by visitors (e.g., management RestClientVisitor). ClientSettings was set during construction when DeclarationModifiers was still Public, and the generator only checked ClientSettings != null.

Added a DeclarationModifiers.HasFlag(Public) check so only clients that are still public after visitors have run are included in the schema.

ConfigurationSchemaGenerator was generating schemas for clients that had
been made internal by visitors (e.g., management RestClientVisitor).
ClientSettings was set during construction when DeclarationModifiers was
still Public, and the generator only checked ClientSettings != null.

Added a DeclarationModifiers.HasFlag(Public) check so only clients that
are still public after visitors have run are included in the schema.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@microsoft-github-policy-service microsoft-github-policy-service Bot added the emitter:client:csharp Issue for the C# client emitter: @typespec/http-client-csharp label Apr 7, 2026
@JoshLove-msft JoshLove-msft enabled auto-merge April 7, 2026 15:57
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 7, 2026

Open in StackBlitz

npm i https://pkg.pr.new/@typespec/http-client-csharp@10284

commit: ebd96fc

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 7, 2026

No changes needing a change description found.

@JoshLove-msft JoshLove-msft added this pull request to the merge queue Apr 7, 2026
Merged via the queue into microsoft:main with commit 51d89f1 Apr 7, 2026
29 checks passed
@JoshLove-msft JoshLove-msft deleted the fix/skip-config-schema-for-internal-clients branch April 7, 2026 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

emitter:client:csharp Issue for the C# client emitter: @typespec/http-client-csharp

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants