Skip to content
Open

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

499 changes: 432 additions & 67 deletions pkg/corerp/api/v20250801preview/zz_generated_models.go

Large diffs are not rendered by default.

1,089 changes: 1,074 additions & 15 deletions pkg/corerp/api/v20250801preview/zz_generated_responses.go

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 11 additions & 9 deletions pkg/ucp/initializer/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"encoding/hex"
"os"
"path/filepath"
"strings"
"testing"

v1 "github.com/radius-project/radius/pkg/armrpc/api/v1"
Expand Down Expand Up @@ -323,19 +324,20 @@ types:
require.NoError(t, obj.As(summaryModel))
require.Len(t, summaryModel.Properties.ResourceTypes, len(radiusCoreTypeOpenAPIDefinitions))

expectedDescriptions := map[string]string{
"applications": "Radius Application resource",
"bicepSettings": "The Bicep configuration resource, providing reusable Bicep recipe settings for environments.",
"environments": "The environment resource",
"recipePacks": "The recipe pack resource",
"terraformSettings": "The Terraform configuration resource, providing reusable Terraform recipe settings for environments.",
expectedDescriptionPrefixes := map[string]string{
"applications": "The `Radius.Core/applications` Resource Type represents a Radius Application",
"bicepSettings": "The `Radius.Core/bicepSettings` Resource Type holds reusable Bicep engine settings",
"environments": "The `Radius.Core/environments` Resource Type represents a Radius Environment",
"recipePacks": "The `Radius.Core/recipePacks` Resource Type represents a Recipe Pack",
"terraformSettings": "The `Radius.Core/terraformSettings` Resource Type holds reusable Terraform CLI settings",
}
require.Len(t, expectedDescriptions, len(radiusCoreTypeOpenAPIDefinitions))
for typeName, expectedDescription := range expectedDescriptions {
require.Len(t, expectedDescriptionPrefixes, len(radiusCoreTypeOpenAPIDefinitions))
for typeName, expectedDescriptionPrefix := range expectedDescriptionPrefixes {
resourceType := summaryModel.Properties.ResourceTypes[typeName]
require.NotNil(t, resourceType, "resource type %q should be registered", typeName)
require.NotNil(t, resourceType.Description, "resource type %q should have a description", typeName)
assert.Equal(t, expectedDescription, *resourceType.Description)
assert.True(t, strings.HasPrefix(*resourceType.Description, expectedDescriptionPrefix),
"resource type %q description should start with %q, got %q", typeName, expectedDescriptionPrefix, *resourceType.Description)

apiVersion := resourceType.APIVersions["2025-08-01-preview"]
require.NotNil(t, apiVersion, "resource type %q should have API version 2025-08-01-preview", typeName)
Expand Down
Loading
Loading