Skip to content

Fix @azureBaseType doc example to reference a real resource model#4755

Merged
markcowl merged 4 commits into
mainfrom
copilot/fix-azure-basetype-doc-example
Jul 10, 2026
Merged

Fix @azureBaseType doc example to reference a real resource model#4755
markcowl merged 4 commits into
mainfrom
copilot/fix-azure-basetype-doc-example

Conversation

Copilot AI commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

The @azureBaseType doc example referenced ...AgentProperties (which is internal) and ...AgentToolProperty (which does not exist), making it non-compilable.

Replaced with a valid example showing the decorator applied to a TrackedResource model, matching actual usage:

model MyAgentProperties {
  displayName: string;
  description: string;
}

@azureBaseType(#{ baseType: "Agent", version: "2024-06-01" })
model MyAgent is TrackedResource<MyAgentProperties> {
  @key("myAgentName") @segment("myAgents") name: string;
}
  • Source: lib/base-types/base-types.tsp — corrected the @example block
  • Generated: generated-defs/Azure.ResourceManager.BaseTypes.ts, README.md, reference/decorators.md — regenerated via pnpm regen-docs

The example previously referenced non-existent spreads (AgentProperties is
internal, AgentToolProperty does not exist). Replace with a compilable
resource-model example that shows the decorator applied to a TrackedResource,
matching actual usage in the codebase. Regenerate reference docs.

Co-authored-by: markcowl <1054056+markcowl@users.noreply.github.com>
@microsoft-github-policy-service microsoft-github-policy-service Bot added lib:azure-resource-manager Issues for @azure-tools/typespec-azure-core library meta:website TypeSpec.io updates labels Jun 30, 2026
Copilot AI changed the title [WIP] Fix @azureBaseType doc example to reference a real resource model Fix @azureBaseType doc example to reference a real resource model Jun 30, 2026
Copilot AI requested a review from markcowl June 30, 2026 02:47

@markcowl markcowl left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@copilot Pull the latest from main, make the suggested changes, rebuild, regenerate docs, verify that all files are correctly formatted and that only the changes associated with this PR are in the PR diff

Copilot AI and others added 2 commits June 30, 2026 21:02
…etype-doc-example

Co-authored-by: markcowl <1054056+markcowl@users.noreply.github.com>
…ample spec

Use ContosoApplianceDefinition, ContosoApplianceProperties, and
ContosoApplianceAgent from the agent sample spec for a realistic example.
Merge latest main, rebuild, regenerate docs, and format.

Co-authored-by: markcowl <1054056+markcowl@users.noreply.github.com>
Copilot AI requested a review from markcowl June 30, 2026 21:07
@markcowl
markcowl marked this pull request as ready for review June 30, 2026 21:11
@azure-sdk-automation

Copy link
Copy Markdown
Contributor

All changed packages have been documented.

  • @azure-tools/typespec-azure-resource-manager
Show changes

@azure-tools/typespec-azure-resource-manager - internal ✏️

Fix @azureBaseType doc example to reference a real resource model instead of non-existent spreads

@pkg-pr-new

pkg-pr-new Bot commented Jun 30, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@azure-tools/typespec-azure-resource-manager@4755

commit: e04aad7

@azure-sdk-automation

Copy link
Copy Markdown
Contributor

You can try these changes here

🛝 Playground 🌐 Website

@markcowl
markcowl added this pull request to the merge queue Jul 10, 2026
Merged via the queue into main with commit 17e3851 Jul 10, 2026
28 checks passed
@markcowl
markcowl deleted the copilot/fix-azure-basetype-doc-example branch July 10, 2026 02:04
github-actions Bot added a commit to XiaofeiCao/typespec-azure that referenced this pull request Jul 11, 2026
Sync documentation from Azure/typespec-azure upstream main branch.

Key changes included:
- Add docs for new ARM linter rule `no-reserved-resource-property` (PR Azure#4842)
- Add docs for new TCGC linter rule `csharp-no-url-suffix` (PR Azure#4541)
- Add ARM agent base type rules docs: `arm-agent-base-type-child-resources`,
  `arm-agent-base-type-lifecycle-operations`, `no-override-props`
- Update ARM `data-types.md`: align Agent ResponseStatus enum to PascalCase
  and `createdAt` to utcDateTime per ARM guidelines (PR Azure#4855)
- Fix `@azureBaseType` decorator doc example (PR Azure#4755)
- Improve ARM library decorators, interfaces, and models docs (PR Azure#4494)
- Add TCGC `@override` path-param and `@clientLocation` type-conflict
  caution admonitions to howto (PR Azure#4844)
- Regen Java emitter docs with default values and improved type info (PR Azure#4863)
- Update Python emitter docs with new `typeddict` models mode (upstream)
- Update TypeScript emitter reference docs
- Update autorest and autorest-canonical emitter docs
- Update azure-rulesets linter reference
- Update azure-core, azure-portal-core, TCGC reference docs
- Update howtos for ARM and Generate client libraries
- Add release notes for 2026-06-09

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

lib:azure-resource-manager Issues for @azure-tools/typespec-azure-core library meta:website TypeSpec.io updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Automated][azure-resource-manager] Fix @azureBaseType doc example to reference a real resource model

3 participants