Skip to content

fix(dotnet): make Makefile respect supportsStreamedListObjects config…#662

Merged
daniel-jonathan merged 2 commits intomainfrom
fix/streamed_list_flag
Nov 19, 2025
Merged

fix(dotnet): make Makefile respect supportsStreamedListObjects config…#662
daniel-jonathan merged 2 commits intomainfrom
fix/streamed_list_flag

Conversation

@daniel-jonathan
Copy link
Copy Markdown
Contributor

@daniel-jonathan daniel-jonathan commented Nov 19, 2025

Fix dotnet SDK Makefile to Respect supportsStreamedListObjects Config Flag

Problem

The supportsStreamedListObjects configuration flag in config/clients/dotnet/config.overrides.json was being ignored. The Makefile always built the dotnet SDK with streaming support enabled, causing build failures:

error CS1061: 'ApiClient' does not contain a definition for 'SendStreamingRequestAsync'

Root Cause

The build-client-dotnet target unconditionally called build-client-streamed, which hardcoded x-streaming = true in the OpenAPI spec regardless of the config flag setting.

Solution

Modified the Makefile to check the config flag and conditionally build with or without streaming support:

  1. Updated build-client-dotnet to check the config flag value
  2. Added build-client-non-streamed target for builds without streaming
  3. Added build-openapi-non-streamed target that removes the /streamed-list-objects endpoint from the OpenAPI spec

Changes

.PHONY: build-client-dotnet
build-client-dotnet: build-dotnet-multi-image
	@if grep -q '"supportsStreamedListObjects": true' config/clients/dotnet/config.overrides.json; then \
		make build-client-streamed sdk_language=dotnet tmpdir=${TMP_DIR} OPENAPI_GENERATOR_CLI_DOCKER_TAG=v7.11.0; \
	else \
		make build-client-non-streamed sdk_language=dotnet tmpdir=${TMP_DIR} OPENAPI_GENERATOR_CLI_DOCKER_TAG=v7.11.0; \
	fi

Result

The flag now works correctly:

  • When supportsStreamedListObjects: false (current default) - streaming endpoint is not generated, build succeeds
  • When supportsStreamedListObjects: true (future) - streaming endpoint is generated

Configuration

Default is set to false in config/clients/dotnet/config.overrides.json since SendStreamingRequestAsync() is not yet implemented.

Impact

This fix is dotnet-specific and does not affect other SDKs (Python, Go, Java, JS).

Testing

$ make build-client-dotnet
Building dotnet SDK without streaming support...
Build completed: 0 errors

Files Modified

  • sdk-generator/Makefile

Summary by CodeRabbit

  • Chores
    • Added new build targets for generating non-streamed .NET client and OpenAPI specification variants.
    • Updated build configuration to conditionally select between streamed and non-streamed client generation pathways.
    • Modified .NET client configuration to disable streamed list objects support.

… flag

Previously, the dotnet SDK always built with streaming support enabled,
ignoring the supportsStreamedListObjects config flag. The Makefile
unconditionally called build-client-streamed which hardcoded the
x-streaming flag in the OpenAPI spec.

Changes:
- Modified build-client-dotnet to check config flag value
- Added build-client-non-streamed target for non-streaming builds
- Added build-openapi-non-streamed to remove streaming endpoint from spec
- Default remains false since SendStreamingRequestAsync is not yet implemented

The flag now works correctly - when set to false, the streaming endpoint
is completely removed from the generated SDK.
@daniel-jonathan daniel-jonathan requested a review from a team as a code owner November 19, 2025 18:10
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Nov 19, 2025

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

This PR introduces conditional build pathways for .NET clients and OpenAPI specifications, allowing the build system to generate either streamed or non-streamed variants based on configuration. New Makefile targets support non-streamed builds, while the existing build-client-dotnet target gains conditional logic to select the appropriate pathway. The dotnet config override disables streaming support.

Changes

Cohort / File(s) Change Summary
Makefile build targets
Makefile
Added new public targets build-client-non-streamed and build-openapi-non-streamed for generating non-streamed client and OpenAPI spec variants. Updated build-client-dotnet to conditionally invoke either streamed or non-streamed build targets based on config overrides. Added corresponding PHONY declarations.
Dotnet configuration
config/clients/dotnet/config.overrides.json
Changed supportsStreamedListObjects flag from true to false, disabling streaming support for the dotnet SDK.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

  • Makefile changes consist of straightforward new targets and conditional branching with no complex logic
  • Configuration override is a single boolean property change
  • Changes are isolated to build infrastructure with clear, self-contained purposes
  • Verify that the conditional logic in build-client-dotnet correctly routes based on the supportsStreamedListObjects override

Possibly related PRs

Suggested reviewers

  • rhamzeh

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: making the Makefile respect the supportsStreamedListObjects config flag. It directly reflects the core objective of the PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fbdfb43 and 8224a5f.

📒 Files selected for processing (2)
  • Makefile (3 hunks)
  • config/clients/dotnet/config.overrides.json (1 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
config/clients/*/config.overrides.json

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

config/clients/*/config.overrides.json: Always update the packageVersion in each language-specific config.overrides.json when making version changes
Maintain FOSSA compliance notice IDs in each language’s config.overrides.json

Files:

  • config/clients/dotnet/config.overrides.json
config/**/*.{json,mustache}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Never hardcode API keys or credentials in configuration or template files

Files:

  • config/clients/dotnet/config.overrides.json
config/{common/config.base.json,clients/*/config.overrides.json}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Ensure consistent versioning across base and language override configuration files to avoid version conflicts

Files:

  • config/clients/dotnet/config.overrides.json
Makefile

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Makefile: Update OPEN_API_REF in the Makefile when targeting new OpenFGA API versions
Update Docker image tags in the Makefile when upgrading build tools
Use official, tagged Docker images for containerized builds

Files:

  • Makefile
🧠 Learnings (8)
📓 Common learnings
Learnt from: CR
Repo: openfga/sdk-generator PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-09-04T17:35:34.111Z
Learning: Applies to scripts/build_client.sh : Implement and maintain OpenAPI transformations in scripts/build_client.sh (remove streaming endpoints, rename Object to FgaObject, strip v1. prefixes) when API schemas change
📚 Learning: 2025-09-04T17:35:34.111Z
Learnt from: CR
Repo: openfga/sdk-generator PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-09-04T17:35:34.111Z
Learning: Applies to config/clients/*/config.overrides.json : Maintain FOSSA compliance notice IDs in each language’s config.overrides.json

Applied to files:

  • config/clients/dotnet/config.overrides.json
📚 Learning: 2025-09-04T17:35:34.111Z
Learnt from: CR
Repo: openfga/sdk-generator PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-09-04T17:35:34.111Z
Learning: Applies to config/clients/*/config.overrides.json : Always update the packageVersion in each language-specific config.overrides.json when making version changes

Applied to files:

  • config/clients/dotnet/config.overrides.json
📚 Learning: 2025-09-04T17:35:34.111Z
Learnt from: CR
Repo: openfga/sdk-generator PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-09-04T17:35:34.111Z
Learning: Applies to scripts/build_client.sh : Implement and maintain OpenAPI transformations in scripts/build_client.sh (remove streaming endpoints, rename Object to FgaObject, strip v1. prefixes) when API schemas change

Applied to files:

  • Makefile
📚 Learning: 2025-09-04T17:35:34.111Z
Learnt from: CR
Repo: openfga/sdk-generator PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-09-04T17:35:34.111Z
Learning: Applies to Makefile : Update OPEN_API_REF in the Makefile when targeting new OpenFGA API versions

Applied to files:

  • Makefile
📚 Learning: 2025-09-04T17:35:34.111Z
Learnt from: CR
Repo: openfga/sdk-generator PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-09-04T17:35:34.111Z
Learning: Applies to Makefile : Update Docker image tags in the Makefile when upgrading build tools

Applied to files:

  • Makefile
📚 Learning: 2025-09-04T17:35:34.111Z
Learnt from: CR
Repo: openfga/sdk-generator PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-09-04T17:35:34.111Z
Learning: Applies to Makefile : Use official, tagged Docker images for containerized builds

Applied to files:

  • Makefile
📚 Learning: 2025-09-04T17:35:34.111Z
Learnt from: CR
Repo: openfga/sdk-generator PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-09-04T17:35:34.111Z
Learning: Applies to scripts/build_client.sh : Clean up temporary directories and containers during/after builds to manage resources efficiently

Applied to files:

  • Makefile
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: build-and-test-dotnet-sdk
  • GitHub Check: build-and-test-java-sdk
  • GitHub Check: build-and-test-go-sdk
🔇 Additional comments (3)
config/clients/dotnet/config.overrides.json (1)

40-40: Configuration flag properly disables streaming support.

The addition of "supportsStreamedListObjects": false correctly aligns with the PR's goal of enabling non-streamed builds for the .NET SDK. The change is minimal, maintains existing version and FOSSA compliance information, and requires no additional updates per the coding guidelines.

Makefile (2)

110-116: Verify Docker image tag override rationale.

Both build paths override OPENAPI_GENERATOR_CLI_DOCKER_TAG from the default v6.4.0 to v7.11.0. The PR objectives do not explain this version upgrade, and per the coding guidelines, tool version changes in the Makefile should be documented.

Please clarify:

  1. Why is v7.11.0 specifically required for .NET (streamed and non-streamed)?
  2. Does the upstream openapi-generator v7.11.0 provide critical features or fixes needed for this PR?
  3. Should this version change apply to other SDK languages as well, or is it .NET-specific?

You can reference the generator's changelog to confirm the rationale: https://github.com/OpenAPITools/openapi-generator/releases


208-211: New build-client-non-streamed target structure is sound.

The target properly mirrors the build-client-streamed pattern, correctly depends on build-openapi-non-streamed, and appropriately delegates to ./scripts/build_client.sh. The .PHONY declaration is present.

rhamzeh
rhamzeh previously approved these changes Nov 19, 2025
Address CodeRabbit feedback to also remove StreamedListObjectsResponse
and StreamResultOfStreamedListObjectsResponse definitions from the
non-streamed OpenAPI spec, not just the endpoint path.

This ensures no orphaned model definitions remain when streaming support
is disabled.
@daniel-jonathan daniel-jonathan added this pull request to the merge queue Nov 19, 2025
Merged via the queue into main with commit 5be3002 Nov 19, 2025
12 of 15 checks passed
@daniel-jonathan daniel-jonathan deleted the fix/streamed_list_flag branch November 19, 2025 18:27
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