Improve Radius.Core resource type documentation, property descriptions, and default values#12439
Improve Radius.Core resource type documentation, property descriptions, and default values#12439zachcasper wants to merge 10 commits into
Conversation
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>
There was a problem hiding this comment.
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 forapplications,environments,recipePacks,bicepSettings, andterraformSettingsin 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.goto 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
Signed-off-by: Zach Casper <zachcasper@microsoft.com>
Signed-off-by: Zach Casper <zachcasper@microsoft.com>
Signed-off-by: Zach Casper <zachcasper@microsoft.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #12439 +/- ##
==========================================
+ Coverage 53.46% 53.51% +0.04%
==========================================
Files 758 758
Lines 49254 49326 +72
==========================================
+ Hits 26333 26396 +63
- Misses 20475 20482 +7
- Partials 2446 2448 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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>
Functional Tests - corerp-cloud30 tests ±0 27 ✅ ±0 52m 44s ⏱️ + 4m 19s For more details on these failures, see this check. Results for commit d027ff6. ± Comparison against base commit 375f076. |
Signed-off-by: Zach Casper <zachcasper@microsoft.com>
Radius functional test overviewClick here to see the test run details
Test Status⌛ Building Radius and pushing container images for functional tests... |
|
|
||
| ## Cloud providers | ||
|
|
||
| By default an Environment deploys to Kubernetes. To deploy cloud resources, configure the `providers` property with your cloud account. For AWS, set the account ID and region: |
There was a problem hiding this comment.
we can delete 'For AWS, set the account ID and region' or include details for all providers
Summary
This pull request improves the documentation for the
Radius.Coreresource types (applications,environments,recipePacks,bicepSettings, andterraformSettings) 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:
ApplicationResource,BicepSettingsResource,EnvironmentResource,RecipePackResource, andTerraformSettingsResourceto include detailed explanations, Bicep and CLI examples, and deployment instructions.Property Description Improvements:
(Required),(Optional), and(Read Only)prefixes to every schema property across the five resource types, matching each property's schema optionality.environments.providersnow notes it defaults to Kubernetes in thedefaultnamespace, andenvironments.recipePacksnotes it defaults to thedefaultRecipe Pack in thedefaultresource group.Testing and Validation:
pkg/ucp/initializer/service_test.goto 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:
Radius.Core/applications after:
Radius.Core/environments before:
Radius.Core/environments after:
Radius.Core/recipePacks before:
Radius.Core/recipePacks after:
Radius.Core/terraformSettings before:
Radius.Core/terraformSettings after:
Radius.Core/bicepSettings before:
Radius.Core/bicepSettings after: