Skip to content

Fix TypeScript codegen options merge and add ExposeProperties to IResourceWithConnectionString resources#14953

Merged
sebastienros merged 3 commits intorelease/13.2from
sebros/referenceexpression-gen
Mar 5, 2026
Merged

Fix TypeScript codegen options merge and add ExposeProperties to IResourceWithConnectionString resources#14953
sebastienros merged 3 commits intorelease/13.2from
sebros/referenceexpression-gen

Conversation

@sebastienros
Copy link
Contributor

Description

This PR improves TypeScript polyglot support by fixing a codegen bug, adding [AspireExport(ExposeProperties = true)] to all resource classes implementing IResourceWithConnectionString, and regenerating all playground validation apps.

Changes

Codegen fixRegisterOptionsInterface in AtsTypeScriptCodeGenerator.cs used first-write-wins when the same options interface name was registered by multiple extension methods on different resource types. This caused parameter loss (e.g., WithDataVolumeOptions missing isReadOnly when RedisInsightResource.withDataVolume(name) was registered before RedisResource.withDataVolume(name, isReadOnly)). Fixed by merging all optional parameters across registrations by name (union of params).

ExposeProperties on IResourceWithConnectionString resources — Added [AspireExport(ExposeProperties = true)] to 15 resource classes across 12 non-Azure hosting integrations (Garnet, Valkey, Kafka, Milvus×2, MongoDB×2, MySql×2, Nats, Qdrant, RabbitMQ, Seq, SqlServer×2). Removed pre-existing [AspireExportIgnore] from ConnectionStringExpression on PostgreSQL and Oracle resources so connection strings are accessible from polyglot app hosts.

Playground regeneration — Regenerated TypeScript SDKs for all 14 affected integrations. Updated all validation apphost.ts files to exercise property .get() calls including connectionStringExpression, primaryEndpoint, host, port, databases, etc. All 14 apps pass npx tsc --noEmit.

Test — Added Generate_SameMethodNameOnDifferentTypes_MergesOptionsInterface test covering the codegen fix. All 60 codegen tests pass.

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
    • No
  • Does the change require an update in our Aspire docs?
    • Yes
    • No

sebastienros and others added 2 commits March 4, 2026 12:02
The RegisterOptionsInterface method used first-write-wins when the same
method name appeared on multiple resource types. This caused parameter
loss — e.g., WithDataVolumeOptions was missing isReadOnly because
RedisInsightResource.WithDataVolume (name only) was registered before
RedisResource.WithDataVolume (name + isReadOnly).

Now merges all optional parameters across registrations by name,
producing a union interface. Also regenerates base.ts (ReferenceExpression
handle-mode constructor) across all polyglot playground apps.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Adds WithDataVolume methods on both TestRedisResource (name + isReadOnly)
and TestDatabaseResource (name only) to reproduce the codegen bug where
first-write-wins caused parameters to be lost. The test verifies that
the generated WithDataVolumeOptions interface contains the union of all
parameters.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 4, 2026 20:41
@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2026

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 14953

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 14953"

Copy link
Contributor

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

This PR improves Aspire’s TypeScript polyglot experience by fixing an options-interface generation bug (parameter loss when the same method name is exported from multiple resource types), exporting resource properties for IResourceWithConnectionString implementations, and regenerating TypeScript playground validation app hosts to exercise the new surface area.

Changes:

  • Fix TypeScript codegen to merge (union) optional parameters for options interfaces registered under the same interface name.
  • Add [AspireExport(ExposeProperties = true)] to multiple IResourceWithConnectionString resource types and remove export-ignore on selected connection-string expression properties.
  • Regenerate TypeScript playground validation app hosts and SDK artifacts to validate property .get() access and updated typings.

Reviewed changes

Copilot reviewed 159 out of 160 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/TestTypes/TestExtensions.cs Adds test extension overloads to reproduce options-interface merge scenario.
tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/TwoPassScanningGeneratedAspire.verified.ts Snapshot update showing merged WithDataVolumeOptions and generated methods.
tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/AtsGeneratedAspire.verified.ts Snapshot update showing merged options interface and generated overload usage.
tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/AtsTypeScriptCodeGeneratorTests.cs Adds regression test asserting options-interface merging behavior.
src/Aspire.Hosting.Valkey/ValkeyResource.cs Exposes properties for polyglot via AspireExport(ExposeProperties = true).
src/Aspire.Hosting.SqlServer/SqlServerServerResource.cs Exposes properties for polyglot via AspireExport(ExposeProperties = true).
src/Aspire.Hosting.SqlServer/SqlServerDatabaseResource.cs Exposes properties for polyglot via AspireExport(ExposeProperties = true).
src/Aspire.Hosting.Seq/SeqResource.cs Exposes properties for polyglot via AspireExport(ExposeProperties = true).
src/Aspire.Hosting.RabbitMQ/RabbitMQServerResource.cs Exposes properties for polyglot via AspireExport(ExposeProperties = true).
src/Aspire.Hosting.Qdrant/QdrantServerResource.cs Exposes properties for polyglot via AspireExport(ExposeProperties = true).
src/Aspire.Hosting.PostgreSQL/PostgresServerResource.cs Removes polyglot export-ignore on ConnectionStringExpression.
src/Aspire.Hosting.PostgreSQL/PostgresDatabaseResource.cs Removes polyglot export-ignore on ConnectionStringExpression.
src/Aspire.Hosting.Oracle/OracleDatabaseServerResource.cs Removes polyglot export-ignore on ConnectionStringExpression.
src/Aspire.Hosting.Oracle/OracleDatabaseResource.cs Removes polyglot export-ignore on ConnectionStringExpression.
src/Aspire.Hosting.Nats/NatsServerResource.cs Exposes properties for polyglot via AspireExport(ExposeProperties = true).
src/Aspire.Hosting.MySql/MySqlServerResource.cs Exposes properties for polyglot via AspireExport(ExposeProperties = true).
src/Aspire.Hosting.MySql/MySqlDatabaseResource.cs Exposes properties for polyglot via AspireExport(ExposeProperties = true).
src/Aspire.Hosting.MongoDB/MongoDBServerResource.cs Exposes properties for polyglot via AspireExport(ExposeProperties = true).
src/Aspire.Hosting.MongoDB/MongoDBDatabaseResource.cs Exposes properties for polyglot via AspireExport(ExposeProperties = true).
src/Aspire.Hosting.Milvus/MilvusServerResource.cs Exposes properties for polyglot via AspireExport(ExposeProperties = true).
src/Aspire.Hosting.Milvus/MilvusDatabaseResource.cs Exposes properties for polyglot via AspireExport(ExposeProperties = true).
src/Aspire.Hosting.Kafka/KafkaServerResource.cs Exposes properties for polyglot via AspireExport(ExposeProperties = true).
src/Aspire.Hosting.Garnet/GarnetResource.cs Exposes properties for polyglot via AspireExport(ExposeProperties = true).
src/Aspire.Hosting.CodeGeneration.TypeScript/AtsTypeScriptCodeGenerator.cs Merges optional parameters for options interfaces sharing the same generated name.
playground/polyglot/TypeScript/Aspire.Hosting.Yarp/ValidationAppHost/.modules/transport.ts Updates callback transport behavior in regenerated module assets.
playground/polyglot/TypeScript/Aspire.Hosting.Yarp/ValidationAppHost/.modules/base.ts Updates ReferenceExpression implementation in regenerated module assets.
playground/polyglot/TypeScript/Aspire.Hosting.Yarp/ValidationAppHost/.modules/.codegen-hash Updates regeneration hash.
playground/polyglot/TypeScript/Aspire.Hosting.Valkey/ValidationAppHost/apphost.ts Exercises newly exposed resource properties via .get().
playground/polyglot/TypeScript/Aspire.Hosting.Valkey/ValidationAppHost/.modules/transport.ts Regenerated transport module update.
playground/polyglot/TypeScript/Aspire.Hosting.Valkey/ValidationAppHost/.modules/base.ts Regenerated base module update.
playground/polyglot/TypeScript/Aspire.Hosting.Valkey/ValidationAppHost/.modules/aspire.ts Regenerated SDK showing exposed properties on ValkeyResource.
playground/polyglot/TypeScript/Aspire.Hosting.Valkey/ValidationAppHost/.modules/.codegen-hash Updates regeneration hash.
playground/polyglot/TypeScript/Aspire.Hosting.SqlServer/ValidationAppHost/apphost.ts Exercises newly exposed resource properties via .get().
playground/polyglot/TypeScript/Aspire.Hosting.SqlServer/ValidationAppHost/.modules/transport.ts Regenerated transport module update.
playground/polyglot/TypeScript/Aspire.Hosting.SqlServer/ValidationAppHost/.modules/base.ts Regenerated base module update.
playground/polyglot/TypeScript/Aspire.Hosting.SqlServer/ValidationAppHost/.modules/.codegen-hash Updates regeneration hash.
playground/polyglot/TypeScript/Aspire.Hosting.Seq/ValidationAppHost/apphost.ts Exercises newly exposed resource properties via .get().
playground/polyglot/TypeScript/Aspire.Hosting.Seq/ValidationAppHost/.modules/transport.ts Regenerated transport module update.
playground/polyglot/TypeScript/Aspire.Hosting.Seq/ValidationAppHost/.modules/base.ts Regenerated base module update.
playground/polyglot/TypeScript/Aspire.Hosting.Seq/ValidationAppHost/.modules/aspire.ts Regenerated SDK showing exposed properties on SeqResource.
playground/polyglot/TypeScript/Aspire.Hosting.Seq/ValidationAppHost/.modules/.codegen-hash Updates regeneration hash.
playground/polyglot/TypeScript/Aspire.Hosting.Redis/ValidationAppHost/.modules/base.ts Regenerated base module update.
playground/polyglot/TypeScript/Aspire.Hosting.Redis/ValidationAppHost/.modules/aspire.ts Regenerated SDK shows updated WithDataVolumeOptions shape.
playground/polyglot/TypeScript/Aspire.Hosting.Redis/ValidationAppHost/.aspire/settings.json Formatting/regen update.
playground/polyglot/TypeScript/Aspire.Hosting.RabbitMQ/ValidationAppHost/apphost.ts Exercises newly exposed resource properties via .get().
playground/polyglot/TypeScript/Aspire.Hosting.RabbitMQ/ValidationAppHost/.modules/transport.ts Regenerated transport module update.
playground/polyglot/TypeScript/Aspire.Hosting.RabbitMQ/ValidationAppHost/.modules/base.ts Regenerated base module update.
playground/polyglot/TypeScript/Aspire.Hosting.RabbitMQ/ValidationAppHost/.modules/aspire.ts Regenerated SDK showing exposed properties on RabbitMQServerResource.
playground/polyglot/TypeScript/Aspire.Hosting.RabbitMQ/ValidationAppHost/.modules/.codegen-hash Updates regeneration hash.
playground/polyglot/TypeScript/Aspire.Hosting.Qdrant/ValidationAppHost/apphost.ts Exercises newly exposed resource properties via .get().
playground/polyglot/TypeScript/Aspire.Hosting.Qdrant/ValidationAppHost/.modules/transport.ts Regenerated transport module update.
playground/polyglot/TypeScript/Aspire.Hosting.Qdrant/ValidationAppHost/.modules/base.ts Regenerated base module update.
playground/polyglot/TypeScript/Aspire.Hosting.Qdrant/ValidationAppHost/.modules/.codegen-hash Updates regeneration hash.
playground/polyglot/TypeScript/Aspire.Hosting.PostgreSQL/ValidationAppHost/apphost.ts Exercises connectionStringExpression.get() on Postgres resources.
playground/polyglot/TypeScript/Aspire.Hosting.PostgreSQL/ValidationAppHost/.modules/transport.ts Regenerated transport module update.
playground/polyglot/TypeScript/Aspire.Hosting.PostgreSQL/ValidationAppHost/.modules/base.ts Regenerated base module update.
playground/polyglot/TypeScript/Aspire.Hosting.PostgreSQL/ValidationAppHost/.modules/aspire.ts Regenerated SDK includes connection string expression accessors.
playground/polyglot/TypeScript/Aspire.Hosting.PostgreSQL/ValidationAppHost/.modules/.codegen-hash Updates regeneration hash.
playground/polyglot/TypeScript/Aspire.Hosting.Oracle/ValidationAppHost/apphost.ts Exercises connectionStringExpression.get() on Oracle resources.
playground/polyglot/TypeScript/Aspire.Hosting.Oracle/ValidationAppHost/.modules/transport.ts Regenerated transport module update.
playground/polyglot/TypeScript/Aspire.Hosting.Oracle/ValidationAppHost/.modules/base.ts Regenerated base module update.
playground/polyglot/TypeScript/Aspire.Hosting.Oracle/ValidationAppHost/.modules/aspire.ts Regenerated SDK includes connection string expression accessors.
playground/polyglot/TypeScript/Aspire.Hosting.Oracle/ValidationAppHost/.modules/.codegen-hash Updates regeneration hash.
playground/polyglot/TypeScript/Aspire.Hosting.OpenAI/ValidationAppHost/.modules/transport.ts Regenerated transport module update.
playground/polyglot/TypeScript/Aspire.Hosting.OpenAI/ValidationAppHost/.modules/base.ts Regenerated base module update.
playground/polyglot/TypeScript/Aspire.Hosting.OpenAI/ValidationAppHost/.modules/aspire.ts Regenerated SDK updates exported JSDoc descriptions.
playground/polyglot/TypeScript/Aspire.Hosting.OpenAI/ValidationAppHost/.modules/.codegen-hash Updates regeneration hash.
playground/polyglot/TypeScript/Aspire.Hosting.Nats/ValidationAppHost/apphost.ts Exercises newly exposed resource properties via .get().
playground/polyglot/TypeScript/Aspire.Hosting.Nats/ValidationAppHost/.modules/transport.ts Regenerated transport module update.
playground/polyglot/TypeScript/Aspire.Hosting.Nats/ValidationAppHost/.modules/base.ts Regenerated base module update.
playground/polyglot/TypeScript/Aspire.Hosting.Nats/ValidationAppHost/.modules/aspire.ts Regenerated SDK showing exposed properties on NatsServerResource.
playground/polyglot/TypeScript/Aspire.Hosting.Nats/ValidationAppHost/.modules/.codegen-hash Updates regeneration hash.
playground/polyglot/TypeScript/Aspire.Hosting.MySql/ValidationAppHost/apphost.ts Exercises newly exposed resource properties via .get().
playground/polyglot/TypeScript/Aspire.Hosting.MySql/ValidationAppHost/.modules/transport.ts Regenerated transport module update.
playground/polyglot/TypeScript/Aspire.Hosting.MySql/ValidationAppHost/.modules/base.ts Regenerated base module update.
playground/polyglot/TypeScript/Aspire.Hosting.MySql/ValidationAppHost/.modules/.codegen-hash Updates regeneration hash.
playground/polyglot/TypeScript/Aspire.Hosting.MongoDB/ValidationAppHost/apphost.ts Exercises newly exposed resource properties via .get().
playground/polyglot/TypeScript/Aspire.Hosting.MongoDB/ValidationAppHost/.modules/transport.ts Regenerated transport module update.
playground/polyglot/TypeScript/Aspire.Hosting.MongoDB/ValidationAppHost/.modules/base.ts Regenerated base module update.
playground/polyglot/TypeScript/Aspire.Hosting.MongoDB/ValidationAppHost/.modules/aspire.ts Regenerated SDK showing exposed properties on MongoDB resources.
playground/polyglot/TypeScript/Aspire.Hosting.MongoDB/ValidationAppHost/.modules/.codegen-hash Updates regeneration hash.
playground/polyglot/TypeScript/Aspire.Hosting.Milvus/ValidationAppHost/apphost.ts Exercises newly exposed resource properties via .get().
playground/polyglot/TypeScript/Aspire.Hosting.Milvus/ValidationAppHost/.modules/transport.ts Regenerated transport module update.
playground/polyglot/TypeScript/Aspire.Hosting.Milvus/ValidationAppHost/.modules/base.ts Regenerated base module update.
playground/polyglot/TypeScript/Aspire.Hosting.Milvus/ValidationAppHost/.modules/aspire.ts Regenerated SDK showing exposed properties on Milvus resources.
playground/polyglot/TypeScript/Aspire.Hosting.Milvus/ValidationAppHost/.modules/.codegen-hash Updates regeneration hash.
playground/polyglot/TypeScript/Aspire.Hosting.Kafka/ValidationAppHost/apphost.ts Exercises newly exposed resource properties via .get().
playground/polyglot/TypeScript/Aspire.Hosting.Kafka/ValidationAppHost/.modules/transport.ts Regenerated transport module update.
playground/polyglot/TypeScript/Aspire.Hosting.Kafka/ValidationAppHost/.modules/base.ts Regenerated base module update.
playground/polyglot/TypeScript/Aspire.Hosting.Kafka/ValidationAppHost/.modules/aspire.ts Regenerated SDK showing exposed properties on KafkaServerResource.
playground/polyglot/TypeScript/Aspire.Hosting.Kafka/ValidationAppHost/.modules/.codegen-hash Updates regeneration hash.
playground/polyglot/TypeScript/Aspire.Hosting.GitHub.Models/ValidationAppHost/.modules/base.ts Regenerated base module update.
playground/polyglot/TypeScript/Aspire.Hosting.GitHub.Models/ValidationAppHost/.modules/.codegen-hash Updates regeneration hash.
playground/polyglot/TypeScript/Aspire.Hosting.Garnet/ValidationAppHost/apphost.ts Exercises newly exposed resource properties via .get().
playground/polyglot/TypeScript/Aspire.Hosting.Garnet/ValidationAppHost/.modules/transport.ts Regenerated transport module update.
playground/polyglot/TypeScript/Aspire.Hosting.Garnet/ValidationAppHost/.modules/base.ts Regenerated base module update.
playground/polyglot/TypeScript/Aspire.Hosting.Garnet/ValidationAppHost/.modules/aspire.ts Regenerated SDK showing exposed properties on GarnetResource.
playground/polyglot/TypeScript/Aspire.Hosting.Garnet/ValidationAppHost/.modules/.codegen-hash Updates regeneration hash.
playground/polyglot/TypeScript/Aspire.Hosting.DevTunnels/ValidationAppHost/.modules/transport.ts Regenerated transport module update.
playground/polyglot/TypeScript/Aspire.Hosting.DevTunnels/ValidationAppHost/.modules/base.ts Regenerated base module update.
playground/polyglot/TypeScript/Aspire.Hosting.DevTunnels/ValidationAppHost/.modules/.codegen-hash Updates regeneration hash.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.WebPubSub/ValidationAppHost/.modules/transport.ts Regenerated transport module update.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.WebPubSub/ValidationAppHost/.modules/base.ts Regenerated base module update.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.WebPubSub/ValidationAppHost/.modules/.codegen-hash Updates regeneration hash.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.Storage/ValidationAppHost/.modules/transport.ts Regenerated transport module update.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.Storage/ValidationAppHost/.modules/base.ts Regenerated base module update.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.Storage/ValidationAppHost/.modules/.codegen-hash Updates regeneration hash.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.Sql/ValidationAppHost/.modules/transport.ts Regenerated transport module update.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.Sql/ValidationAppHost/.modules/base.ts Regenerated base module update.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.Sql/ValidationAppHost/.modules/.codegen-hash Updates regeneration hash.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.SignalR/ValidationAppHost/.modules/transport.ts Regenerated transport module update.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.SignalR/ValidationAppHost/.modules/base.ts Regenerated base module update.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.SignalR/ValidationAppHost/.modules/aspire.ts Regenerated SDK; includes runAsEmulator doc output.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.SignalR/ValidationAppHost/.modules/.codegen-hash Updates regeneration hash.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.ServiceBus/ValidationAppHost/.modules/transport.ts Regenerated transport module update.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.ServiceBus/ValidationAppHost/.modules/base.ts Regenerated base module update.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.ServiceBus/ValidationAppHost/.modules/.codegen-hash Updates regeneration hash.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.Search/ValidationAppHost/.modules/transport.ts Regenerated transport module update.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.Search/ValidationAppHost/.modules/base.ts Regenerated base module update.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.Search/ValidationAppHost/.modules/.codegen-hash Updates regeneration hash.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.Redis/ValidationAppHost/.modules/transport.ts Regenerated transport module update.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.Redis/ValidationAppHost/.modules/base.ts Regenerated base module update.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.Redis/ValidationAppHost/.modules/.codegen-hash Updates regeneration hash.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.PostgreSQL/ValidationAppHost/.modules/transport.ts Regenerated transport module update.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.PostgreSQL/ValidationAppHost/.modules/base.ts Regenerated base module update.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.PostgreSQL/ValidationAppHost/.modules/.codegen-hash Updates regeneration hash.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.OperationalInsights/ValidationAppHost/.modules/transport.ts Regenerated transport module update.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.OperationalInsights/ValidationAppHost/.modules/base.ts Regenerated base module update.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.OperationalInsights/ValidationAppHost/.modules/.codegen-hash Updates regeneration hash.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.KeyVault/ValidationAppHost/.modules/transport.ts Regenerated transport module update.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.KeyVault/ValidationAppHost/.modules/base.ts Regenerated base module update.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.KeyVault/ValidationAppHost/.modules/.codegen-hash Updates regeneration hash.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.Functions/ValidationAppHost/.modules/transport.ts Regenerated transport module update.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.Functions/ValidationAppHost/.modules/base.ts Regenerated base module update.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.Functions/ValidationAppHost/.modules/.codegen-hash Updates regeneration hash.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.EventHubs/ValidationAppHost/.modules/transport.ts Regenerated transport module update.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.EventHubs/ValidationAppHost/.modules/base.ts Regenerated base module update.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.EventHubs/ValidationAppHost/.modules/.codegen-hash Updates regeneration hash.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.CosmosDB/ValidationAppHost/.modules/transport.ts Regenerated transport module update.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.CosmosDB/ValidationAppHost/.modules/base.ts Regenerated base module update.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.CosmosDB/ValidationAppHost/.modules/.codegen-hash Updates regeneration hash.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.ContainerRegistry/ValidationAppHost/.modules/transport.ts Regenerated transport module update.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.ContainerRegistry/ValidationAppHost/.modules/base.ts Regenerated base module update.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.ContainerRegistry/ValidationAppHost/.modules/aspire.ts Regenerated SDK updates exported JSDoc descriptions.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.ContainerRegistry/ValidationAppHost/.modules/.codegen-hash Updates regeneration hash.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.CognitiveServices/ValidationAppHost/.modules/transport.ts Regenerated transport module update.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.CognitiveServices/ValidationAppHost/.modules/base.ts Regenerated base module update.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.CognitiveServices/ValidationAppHost/.modules/.codegen-hash Updates regeneration hash.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.ApplicationInsights/ValidationAppHost/.modules/transport.ts Regenerated transport module update.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.ApplicationInsights/ValidationAppHost/.modules/base.ts Regenerated base module update.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.ApplicationInsights/ValidationAppHost/.modules/.codegen-hash Updates regeneration hash.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.AppContainers/ValidationAppHost/.modules/transport.ts Regenerated transport module update.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.AppContainers/ValidationAppHost/.modules/base.ts Regenerated base module update.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.AppContainers/ValidationAppHost/.modules/.codegen-hash Updates regeneration hash.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.AppConfiguration/ValidationAppHost/.modules/transport.ts Regenerated transport module update.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.AppConfiguration/ValidationAppHost/.modules/base.ts Regenerated base module update.
playground/polyglot/TypeScript/Aspire.Hosting.Azure.AppConfiguration/ValidationAppHost/.modules/.codegen-hash Updates regeneration hash.

@sebastienros sebastienros force-pushed the sebros/referenceexpression-gen branch from 0210eac to bb7cd41 Compare March 4, 2026 20:54
@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2026

🎬 CLI E2E Test Recordings

The following terminal recordings are available for commit cfc4f25:

Test Recording
AddPackageInteractiveWhileAppHostRunningDetached ▶️ View Recording
AddPackageWhileAppHostRunningDetached ▶️ View Recording
AgentCommands_AllHelpOutputs_AreCorrect ▶️ View Recording
AgentInitCommand_MigratesDeprecatedConfig ▶️ View Recording
AgentInitCommand_WithMalformedMcpJson_ShowsErrorAndExitsNonZero ▶️ View Recording
AspireUpdateRemovesAppHostPackageVersionFromDirectoryPackagesProps ▶️ View Recording
Banner_DisplayedOnFirstRun ▶️ View Recording
Banner_DisplayedWithExplicitFlag ▶️ View Recording
CreateAndDeployToDockerCompose ▶️ View Recording
CreateAndDeployToDockerComposeInteractive ▶️ View Recording
CreateAndPublishToKubernetes ▶️ View Recording
CreateAndRunAspireStarterProject ▶️ View Recording
CreateAndRunAspireStarterProjectWithBundle ▶️ View Recording
CreateAndRunJsReactProject ▶️ View Recording
CreateAndRunPythonReactProject ▶️ View Recording
CreateAndRunTypeScriptStarterProject ▶️ View Recording
CreateEmptyAppHostProject ▶️ View Recording
CreateStartAndStopAspireProject ▶️ View Recording
CreateStartWaitAndStopAspireProject ▶️ View Recording
CreateTypeScriptAppHostWithViteApp ▶️ View Recording
DescribeCommandResolvesReplicaNames ▶️ View Recording
DescribeCommandShowsRunningResources ▶️ View Recording
DetachFormatJsonProducesValidJson ▶️ View Recording
DoctorCommand_DetectsDeprecatedAgentConfig ▶️ View Recording
DoctorCommand_WithSslCertDir_ShowsTrusted ▶️ View Recording
DoctorCommand_WithoutSslCertDir_ShowsPartiallyTrusted ▶️ View Recording
LogsCommandShowsResourceLogs ▶️ View Recording
PsCommandListsRunningAppHost ▶️ View Recording
PsFormatJsonOutputsOnlyJsonToStdout ❌ Upload failed
SecretCrudOnDotNetAppHost ▶️ View Recording
SecretCrudOnTypeScriptAppHost ▶️ View Recording
StagingChannel_ConfigureAndVerifySettings_ThenSwitchChannels ❌ Upload failed
StopAllAppHostsFromAppHostDirectory ▶️ View Recording
StopAllAppHostsFromUnrelatedDirectory ▶️ View Recording
StopNonInteractiveMultipleAppHostsShowsError ▶️ View Recording
StopNonInteractiveSingleAppHost ▶️ View Recording
StopWithNoRunningAppHostExitsSuccessfully ▶️ View Recording
TypeScriptAppHostWithProjectReferenceIntegration ▶️ View Recording

📹 Recordings uploaded automatically from CI run #22693093999

…nd include ConnectionStringExpression

- Add [AspireExport(ExposeProperties = true)] to 15 resource classes (Garnet, Valkey,
  Kafka, Milvus×2, MongoDB×2, MySql×2, Nats, Qdrant, RabbitMQ, Seq, SqlServer×2)
- Remove [AspireExportIgnore] from ConnectionStringExpression on PostgreSQL and Oracle
  resources (4 files) to include connection strings in polyglot exports
- Add [AspireExportIgnore] on Databases dictionaries (non-ATS types) for server resources
- Regenerate TypeScript SDKs for all 14 affected integrations
- Add connectionStringExpression.get() access in all validation apphost.ts files
- All 14 apps pass TypeScript compilation

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@sebastienros sebastienros force-pushed the sebros/referenceexpression-gen branch from bb7cd41 to cfc4f25 Compare March 4, 2026 22:48
@sebastienros sebastienros merged commit 7cae02a into release/13.2 Mar 5, 2026
760 of 763 checks passed
@sebastienros sebastienros deleted the sebros/referenceexpression-gen branch March 5, 2026 00:38
@dotnet-policy-service dotnet-policy-service bot added this to the 13.2 milestone Mar 5, 2026
eerhardt pushed a commit to eerhardt/aspire that referenced this pull request Mar 7, 2026
…ourceWithConnectionString resources (microsoft#14953)

* Fix TypeScript codegen: merge options interface params across overloads

The RegisterOptionsInterface method used first-write-wins when the same
method name appeared on multiple resource types. This caused parameter
loss — e.g., WithDataVolumeOptions was missing isReadOnly because
RedisInsightResource.WithDataVolume (name only) was registered before
RedisResource.WithDataVolume (name + isReadOnly).

Now merges all optional parameters across registrations by name,
producing a union interface. Also regenerates base.ts (ReferenceExpression
handle-mode constructor) across all polyglot playground apps.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Add test for options interface parameter merging across overloads

Adds WithDataVolume methods on both TestRedisResource (name + isReadOnly)
and TestDatabaseResource (name only) to reproduce the codegen bug where
first-write-wins caused parameters to be lost. The test verifies that
the generated WithDataVolumeOptions interface contains the union of all
parameters.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Add ExposeProperties to all IResourceWithConnectionString resources and include ConnectionStringExpression

- Add [AspireExport(ExposeProperties = true)] to 15 resource classes (Garnet, Valkey,
  Kafka, Milvus×2, MongoDB×2, MySql×2, Nats, Qdrant, RabbitMQ, Seq, SqlServer×2)
- Remove [AspireExportIgnore] from ConnectionStringExpression on PostgreSQL and Oracle
  resources (4 files) to include connection strings in polyglot exports
- Add [AspireExportIgnore] on Databases dictionaries (non-ATS types) for server resources
- Regenerate TypeScript SDKs for all 14 affected integrations
- Add connectionStringExpression.get() access in all validation apphost.ts files
- All 14 apps pass TypeScript compilation

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI pushed a commit that referenced this pull request Mar 10, 2026
…ourceWithConnectionString resources (#14953)

* Fix TypeScript codegen: merge options interface params across overloads

The RegisterOptionsInterface method used first-write-wins when the same
method name appeared on multiple resource types. This caused parameter
loss — e.g., WithDataVolumeOptions was missing isReadOnly because
RedisInsightResource.WithDataVolume (name only) was registered before
RedisResource.WithDataVolume (name + isReadOnly).

Now merges all optional parameters across registrations by name,
producing a union interface. Also regenerates base.ts (ReferenceExpression
handle-mode constructor) across all polyglot playground apps.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Add test for options interface parameter merging across overloads

Adds WithDataVolume methods on both TestRedisResource (name + isReadOnly)
and TestDatabaseResource (name only) to reproduce the codegen bug where
first-write-wins caused parameters to be lost. The test verifies that
the generated WithDataVolumeOptions interface contains the union of all
parameters.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Add ExposeProperties to all IResourceWithConnectionString resources and include ConnectionStringExpression

- Add [AspireExport(ExposeProperties = true)] to 15 resource classes (Garnet, Valkey,
  Kafka, Milvus×2, MongoDB×2, MySql×2, Nats, Qdrant, RabbitMQ, Seq, SqlServer×2)
- Remove [AspireExportIgnore] from ConnectionStringExpression on PostgreSQL and Oracle
  resources (4 files) to include connection strings in polyglot exports
- Add [AspireExportIgnore] on Databases dictionaries (non-ATS types) for server resources
- Regenerate TypeScript SDKs for all 14 affected integrations
- Add connectionStringExpression.get() access in all validation apphost.ts files
- All 14 apps pass TypeScript compilation

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

3 participants