[docs] Update multi-language integration guide for ATS-first API design#756
Draft
aspire-repo-bot[bot] wants to merge 1 commit intorelease/13.3from
Draft
[docs] Update multi-language integration guide for ATS-first API design#756aspire-repo-bot[bot] wants to merge 1 commit intorelease/13.3from
aspire-repo-bot[bot] wants to merge 1 commit intorelease/13.3from
Conversation
Documents the getter-only-to-async-method behavior introduced in microsoft/aspire#16403 and adds a new 'Callback context types and the ATS-first editor pattern' section explaining: - How getter-only C# properties map to async methods in generated TypeScript SDKs, while mutable-collection properties remain as readonly getters - The ATS-first editor/facade pattern for callback context types (EnvironmentEditor, etc.) that should be used instead of ExposeProperties = true on callback context classes - How to define, export, and consume callback extension methods like withEnvironmentCallback, withArgsCallback, and withUrls Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
e2faff6 to
93b70f3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Documents changes from microsoft/aspire#16403
Author: @sebastienros
Targeting
main— falling back tomainbecauserelease/13.3(resolved from the source PR milestone13.3) does not exist onmicrosoft/aspire.dev.Why this PR is needed
PR microsoft/aspire#16403 adopts an ATS-first API design for
Aspire.Hostingexported capabilities. This introduces two user-facing changes that the current docs don't cover:Getter-only properties → async methods in TypeScript. When a C# property is getter-only (no setter, and not a mutable-collection type), the code generator now emits it as an async method in the TypeScript SDK (
property(): Promise<T>). Previously it was a readonly getter. This is a breaking change for any TypeScript AppHost code that uses ATS-generated properties. The currentmulti-language-integration-authoring.mdxpage says "each public property becomes a capability" but doesn't explain this distinction.New ATS-first callback context pattern. The PR introduces
EnvironmentEditor,CommandLineArgsEditor, andResourceUrlsEditorfacade types, and exportswithEnvironmentCallback,withArgsCallback, andwithUrlscallback APIs. Integration authors following the old pattern ofExposeProperties = trueon callback context classes need to know the new recommended approach: use individual[AspireExport]attributes and wrap mutable state in editor classes.What was changed
src/frontend/src/content/docs/extensibility/multi-language-integration-authoring.mdx:ExposeProperties = true[AspireExport]on the class +[AspireExport]on its methods)[AspireExport]attributes on the properties TypeScript callers needFiles modified
src/frontend/src/content/docs/extensibility/multi-language-integration-authoring.mdxThis draft PR needs human review before merging — in particular, the C# code examples for the editor class and callback context type should be verified against the actual types shipped in 13.3.
Note
🔒 Integrity filter blocked 1 item
The following item was blocked because it doesn't meet the GitHub integrity level.
issue_read: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".To allow these resources, lower
min-integrityin your GitHub frontmatter: