Skip to content

Improve Radius.Core resource type documentation, property descriptions, and default values#12439

Open
zachcasper wants to merge 13 commits into
radius-project:mainfrom
zachcasper:core-resource-type-desciptions
Open

Improve Radius.Core resource type documentation, property descriptions, and default values#12439
zachcasper wants to merge 13 commits into
radius-project:mainfrom
zachcasper:core-resource-type-desciptions

Conversation

@zachcasper

@zachcasper zachcasper commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Summary

This pull request improves the documentation for the Radius.Core resource types (applications, environments, recipePacks, bicepSettings, and terraformSettings) so that platform engineers and developers can understand and use them from the resource type definition alone. It combines two related efforts: expanded, example-driven type-level documentation and a full pass over every schema property description. The changes are authored in TypeSpec and reflected in the generated Go models and the OpenAPI specification, and are verified by the unit tests.

The most important changes are:

Resource Type Documentation Improvements:

  • Expanded the type-level descriptions for ApplicationResource, BicepSettingsResource, EnvironmentResource, RecipePackResource, and TerraformSettingsResource to include detailed explanations, Bicep and CLI examples, and deployment instructions.

Property Description Improvements:

  • Added (Required), (Optional), and (Read Only) prefixes to every schema property across the five resource types, matching each property's schema optionality.
  • Rewrote the property descriptions to be accurate, precise, and helpful for platform engineers, conforming to the resource-types-contrib documentation standards.
  • Documented default values on optional properties. For example, environments.providers now notes it defaults to Kubernetes in the default namespace, and environments.recipePacks notes it defaults to the default Recipe Pack in the default resource group.
  • Standardized on "Bicep settings" and "Terraform settings" naming throughout.

Testing and Validation:

  • Updated the unit test in pkg/ucp/initializer/service_test.go to check that the resource type descriptions contain the expected prefixes, ensuring the documentation is present and correct in the API summary.

Reason for change

These changes significantly improve the developer and platform engineer experience by making the API documentation more comprehensive and actionable, and by surfacing default values that were previously undocumented.

Fixes #12429
Fixes #12430
Fixes #12431

How to test

rad resource-type show Radius.Core/applications
rad resource-type show Radius.Core/environments
rad resource-type show Radius.Core/recipePacks
rad resource-type show Radius.Core/terraformSettings
rad resource-type show Radius.Core/bicepSettings

Also view in the dashboard. Screenshots below:

Radius.Core/applications before:

applications before

Radius.Core/applications after:

applications after

Radius.Core/environments before:

environments after

Radius.Core/environments after:

environments before

Radius.Core/recipePacks before:

recipePacks after

Radius.Core/recipePacks after:

recipePacks after

Radius.Core/terraformSettings before:

terraformSettings before

Radius.Core/terraformSettings after:

terraformSettings after

Radius.Core/bicepSettings before:

recipePacks before

Radius.Core/bicepSettings after:

bicepSettings after

@zachcasper
zachcasper requested review from a team as code owners July 15, 2026 16:41
Copilot AI review requested due to automatic review settings July 15, 2026 16:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 developer/platform-engineer documentation for key Radius.Core resource types by expanding their description text (TypeSpec → generated Go models/responses → OpenAPI), and updates a unit test to validate that the richer descriptions are present in the registered resource type summaries.

Changes:

  • Expanded @doc(...) descriptions for applications, environments, recipePacks, bicepSettings, and terraformSettings in TypeSpec with usage guidance and examples.
  • Regenerated/updated corresponding OpenAPI and Go generated artifacts so the richer documentation flows through the API surface.
  • Updated pkg/ucp/initializer/service_test.go to validate the new description content is present.

Reviewed changes

Copilot reviewed 7 out of 9 changed files in this pull request and generated 18 comments.

Show a summary per file
File Description
typespec/Radius.Core/applications.tsp Adds expanded developer documentation for Radius.Core/applications, including Bicep/CLI examples.
typespec/Radius.Core/bicepSettings.tsp Adds expanded documentation for Radius.Core/bicepSettings including registry auth examples.
typespec/Radius.Core/environments.tsp Adds expanded documentation for Radius.Core/environments including CLI and Bicep examples and defaults.
typespec/Radius.Core/recipePacks.tsp Adds expanded documentation for Radius.Core/recipePacks including authoring and referencing examples.
typespec/Radius.Core/terraformSettings.tsp Adds expanded documentation for Radius.Core/terraformSettings including private registry + provider mirror examples.
swagger/specification/radius/resource-manager/Radius.Core/preview/2025-08-01-preview/openapi.json Updates OpenAPI descriptions to match the new expanded TypeSpec docs.
pkg/corerp/api/v20250801preview/zz_generated_models.go Updates generated Go model comments to carry the new resource type documentation.
pkg/corerp/api/v20250801preview/zz_generated_responses.go Updates generated Go response comments to carry the new resource type documentation.
pkg/ucp/initializer/service_test.go Adjusts the test to validate the updated description content is present for registered types.
Files not reviewed (2)
  • pkg/corerp/api/v20250801preview/zz_generated_models.go: Generated file
  • pkg/corerp/api/v20250801preview/zz_generated_responses.go: Generated file

Comment thread typespec/Radius.Core/environments.tsp
Comment thread typespec/Radius.Core/environments.tsp
Comment thread typespec/Radius.Core/environments.tsp
Comment thread typespec/Radius.Core/environments.tsp
Comment thread typespec/Radius.Core/applications.tsp
Comment thread typespec/Radius.Core/terraformSettings.tsp
Comment thread typespec/Radius.Core/terraformSettings.tsp
Comment thread typespec/Radius.Core/terraformSettings.tsp
Comment thread typespec/Radius.Core/terraformSettings.tsp
Comment thread pkg/ucp/initializer/service_test.go Outdated
@codecov

codecov Bot commented Jul 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 53.88%. Comparing base (13b3e87) to head (c149c34).

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #12439   +/-   ##
=======================================
  Coverage   53.88%   53.88%           
=======================================
  Files         765      765           
  Lines       50647    50647           
=======================================
  Hits        27290    27290           
  Misses      20787    20787           
  Partials     2570     2570           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@zachcasper zachcasper changed the title Add developer and PE documentation for Radius.Core Resource Types Improve Radius.Core resource type documentation, property descriptions, and default values Jul 16, 2026
@github-actions

github-actions Bot commented Jul 16, 2026

Copy link
Copy Markdown

Functional Tests - corerp-cloud

30 tests  ±0   29 ✅ +2   22m 11s ⏱️ - 26m 14s
 2 suites ±0    1 💤 ±0 
 1 files   ±0    0 ❌  - 2 

Results for commit dbeea4a. ± Comparison against base commit 375f076.

♻️ This comment has been updated with latest results.

Comment thread typespec/Radius.Core/environments.tsp Outdated
Copilot AI review requested due to automatic review settings July 22, 2026 17:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 12 changed files in this pull request and generated 3 comments.

Files not reviewed (4)
  • pkg/corerp/api/v20250801preview/zz_generated_bicepsettings_client.go: Generated file
  • pkg/corerp/api/v20250801preview/zz_generated_models.go: Generated file
  • pkg/corerp/api/v20250801preview/zz_generated_responses.go: Generated file
  • pkg/corerp/api/v20250801preview/zz_generated_terraformsettings_client.go: Generated file

Comment thread typespec/Radius.Core/bicepSettings.tsp
Comment thread typespec/Radius.Core/bicepSettings.tsp
Comment thread typespec/Radius.Core/terraformSettings.tsp
lakshmimsft
lakshmimsft previously approved these changes Jul 22, 2026
Copilot AI review requested due to automatic review settings July 22, 2026 20:22
@zachcasper
zachcasper force-pushed the core-resource-type-desciptions branch from c5203c5 to 8657a65 Compare July 22, 2026 20:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 12 changed files in this pull request and generated no new comments.

Files not reviewed (4)
  • pkg/corerp/api/v20250801preview/zz_generated_bicepsettings_client.go: Generated file
  • pkg/corerp/api/v20250801preview/zz_generated_models.go: Generated file
  • pkg/corerp/api/v20250801preview/zz_generated_responses.go: Generated file
  • pkg/corerp/api/v20250801preview/zz_generated_terraformsettings_client.go: Generated file
Comments suppressed due to low confidence (2)

typespec/Radius.Core/bicepSettings.tsp:136

  • The description for basicAuthSecretId now states only Radius.Security/secrets is supported, but the implementation still supports legacy Applications.Core/secretStores as well (see pkg/recipes/configloader/secrets.go and pkg/corerp/datamodel/bicepsettings.go). Update the doc to reflect both supported secret resource types (and keep Radius.Security/secrets as recommended).
  @doc("(Optional) The ID of a `Radius.Security/secrets` resource containing the username and password. Required when `authenticationMethod` is `BasicAuth`.")

typespec/Radius.Core/terraformSettings.tsp:214

  • The description for TerraformCredentialConfig.secret now states only Radius.Security/secrets is supported, but the recipes secret loader still supports both Radius.Security/secrets and legacy Applications.Core/secretStores (see pkg/recipes/configloader/secrets.go and pkg/corerp/datamodel/terraformsettings.go). Update the doc to reflect both supported resource types (with Radius.Security/secrets recommended).
  @doc("(Optional) The ID of a `Radius.Security/secrets` resource containing the authentication token. The secret must have a key named `token`.")

Copilot AI review requested due to automatic review settings July 22, 2026 20:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 12 changed files in this pull request and generated no new comments.

Files not reviewed (4)
  • pkg/corerp/api/v20250801preview/zz_generated_bicepsettings_client.go: Generated file
  • pkg/corerp/api/v20250801preview/zz_generated_models.go: Generated file
  • pkg/corerp/api/v20250801preview/zz_generated_responses.go: Generated file
  • pkg/corerp/api/v20250801preview/zz_generated_terraformsettings_client.go: Generated file
Comments suppressed due to low confidence (2)

typespec/Radius.Core/terraformSettings.tsp:215

  • The doc for TerraformCredentialConfig.secret now states only Radius.Security/secrets is supported, but the code path that loads secrets still accepts both Radius.Security/secrets and legacy Applications.Core/secretStores IDs (see pkg/recipes/configloader/secrets.go and pkg/corerp/datamodel/terraformsettings.go). Update the description to avoid incorrectly rejecting valid inputs.
@doc("Credential configuration for a Terraform registry or module source host.")
model TerraformCredentialConfig {
  @doc("(Optional) The ID of a `Radius.Security/secrets` resource containing the authentication token. The secret must have a key named `token`.")
  secret?: string;

typespec/Radius.Core/bicepSettings.tsp:137

  • basicAuthSecretId is documented as only supporting Radius.Security/secrets, but the secrets loader and CoreRP datamodel still support Applications.Core/secretStores as well (legacy compatibility). Update this description to reflect actual supported resource types so users aren't misled.
  @doc("(Optional) How Radius authenticates to the registry.")
  authenticationMethod?: BicepAuthenticationMethod;

  @doc("(Optional) The ID of a `Radius.Security/secrets` resource containing the username and password. Required when `authenticationMethod` is `BasicAuth`.")
  basicAuthSecretId?: string;

@zachcasper
zachcasper enabled auto-merge July 22, 2026 20:47
Copilot AI review requested due to automatic review settings July 22, 2026 21:03
Signed-off-by: Zach Casper <zachcasper@microsoft.com>
Signed-off-by: Zach Casper <zachcasper@microsoft.com>
Signed-off-by: Zach Casper <zachcasper@microsoft.com>
Signed-off-by: Zach Casper <zachcasper@microsoft.com>
Signed-off-by: Zach Casper <zachcasper@microsoft.com>
Signed-off-by: Zach Casper <zachcasper@microsoft.com>
Signed-off-by: Zach Casper <zachcasper@microsoft.com>
Signed-off-by: Zach Casper <zachcasper@microsoft.com>
Add (Required)/(Optional)/(Read Only) prefixes to every schema property across the five Radius.Core resource types (applications, environments, recipePacks, bicepSettings, terraformSettings) and rewrite the descriptions to be accurate, precise, and helpful for platform engineers, conforming to the resource-types-contrib documentation standards. Document default values on optional properties (for example providers and recipePacks on environments). Standardize on "Bicep settings" and "Terraform settings" naming and regenerate the OpenAPI spec and Go clients.

Fixes radius-project#12430

Fixes radius-project#12431

Signed-off-by: Zach Casper <zachcasper@microsoft.com>
Signed-off-by: Zach Casper <zachcasper@microsoft.com>
Signed-off-by: Zach Casper <zachcasper@microsoft.com>
Signed-off-by: Zach Casper <zachcasper@microsoft.com>
Signed-off-by: Zach Casper <zachcasper@microsoft.com>
@zachcasper
zachcasper force-pushed the core-resource-type-desciptions branch from 8ebdc6b to c149c34 Compare July 22, 2026 21:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 12 changed files in this pull request and generated no new comments.

Files not reviewed (4)
  • pkg/corerp/api/v20250801preview/zz_generated_bicepsettings_client.go: Generated file
  • pkg/corerp/api/v20250801preview/zz_generated_models.go: Generated file
  • pkg/corerp/api/v20250801preview/zz_generated_responses.go: Generated file
  • pkg/corerp/api/v20250801preview/zz_generated_terraformsettings_client.go: Generated file
Comments suppressed due to low confidence (2)

typespec/Radius.Core/bicepSettings.tsp:136

  • This description now claims only Radius.Security/secrets is supported, but the recipe secret loader and registry auth plumbing still support Applications.Core/secretStores as well (see pkg/recipes/configloader/secrets.go and pkg/corerp/datamodel/recipe_types.go). Update the doc to reflect both supported secret resource types (and optionally mark Radius.Security/secrets as recommended).
  @doc("(Optional) The ID of a `Radius.Security/secrets` resource containing the username and password. Required when `authenticationMethod` is `BasicAuth`.")

typespec/Radius.Core/terraformSettings.tsp:214

  • This description now claims only Radius.Security/secrets is supported, but the secrets loader used by Terraform recipe execution still supports Applications.Core/secretStores as well (it dispatches by resource type and can load both). Update the doc to reflect both supported secret resource types (and optionally mark Radius.Security/secrets as recommended).
  @doc("(Optional) The ID of a `Radius.Security/secrets` resource containing the authentication token. The secret must have a key named `token`.")

Copilot AI review requested due to automatic review settings July 22, 2026 21:07
@radius-functional-tests

radius-functional-tests Bot commented Jul 22, 2026

Copy link
Copy Markdown

Radius functional test overview

🔍 Go to test action run

Click here to see the test run details
Name Value
Repository zachcasper/radius
Commit ref c149c34
Unique ID func668f295de5
Image tag pr-func668f295de5
  • Dapr: 1.14.4
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.3.0
  • Bicep recipe location ghcr.io/radius-project/dev/test/testrecipes/test-bicep-recipes/<name>:pr-func668f295de5
  • Terraform recipe location http://tf-module-server.radius-test-tf-module-server.svc.cluster.local/<name>.zip (in cluster)
  • applications-rp test image location: ghcr.io/radius-project/dev/applications-rp:pr-func668f295de5
  • dynamic-rp test image location: ghcr.io/radius-project/dev/dynamic-rp:pr-func668f295de5
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-func668f295de5
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-func668f295de5
  • deployment-engine test image location: ghcr.io/radius-project/deployment-engine:latest

Test Status

⌛ Building Radius and pushing container images for functional tests...
✅ Container images build succeeded
⌛ Publishing Bicep Recipes for functional tests...
✅ Recipe publishing succeeded
⌛ Starting corerp-cloud functional tests...
✅ Container images build succeeded
⌛ Publishing Bicep Recipes for functional tests...
✅ Recipe publishing succeeded
⌛ Starting corerp-cloud functional tests...
⌛ Starting ucp-cloud functional tests...
✅ ucp-cloud functional tests succeeded
✅ ucp-cloud functional tests succeeded
✅ corerp-cloud functional tests succeeded
✅ corerp-cloud functional tests succeeded

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 12 changed files in this pull request and generated no new comments.

Files not reviewed (4)
  • pkg/corerp/api/v20250801preview/zz_generated_bicepsettings_client.go: Generated file
  • pkg/corerp/api/v20250801preview/zz_generated_models.go: Generated file
  • pkg/corerp/api/v20250801preview/zz_generated_responses.go: Generated file
  • pkg/corerp/api/v20250801preview/zz_generated_terraformsettings_client.go: Generated file
Comments suppressed due to low confidence (2)

typespec/Radius.Core/terraformSettings.tsp:214

  • The docs narrow this to only Radius.Security/secrets, but the runtime secret loader and datamodel still support legacy Applications.Core/secretStores IDs as well. This makes the schema docs inaccurate for existing users and conflicts with the actual supported resource types.
  @doc("(Optional) The ID of a `Radius.Security/secrets` resource containing the authentication token. The secret must have a key named `token`.")

typespec/Radius.Core/bicepSettings.tsp:136

  • This description states only Radius.Security/secrets, but the codebase still supports legacy Applications.Core/secretStores for basicAuthSecretId (see datamodel + secret loader). Update the docs to reflect both supported secret resource types so the TypeSpec/OpenAPI docs don’t mislead existing users.
  @doc("(Optional) The ID of a `Radius.Security/secrets` resource containing the username and password. Required when `authenticationMethod` is `BasicAuth`.")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

3 participants