Skip to content

Commit 39f65be

Browse files
CopilotReshrahim
andauthored
Add language annotations to codeblocks in resource type descriptions (#267)
## Summary Codeblocks embedded in the `description` property of many resource types lacked a language annotation, causing them to render without syntax highlighting on docs.radapp.io. This adds ` ```bicep ` annotations to all affected descriptions and documents the requirement in the contribution guide. ## Reason for change Unannotated fences (e.g. in `Radius.Compute/containers`) render incorrectly on docs.radapp.io, unlike the already-correct `Radius.Compute/containerImages`. Auditing all resource types found 33 unannotated opening fences across 15 files — all Bicep examples. ## How to test - Verify each modified `*.yaml` still parses and the description renders with highlighted Bicep in the Radius Dashboard / docs. - Confirm no opening code fence in any `description` remains without a language annotation. ## File change summary | File | Summary of change | | ---- | ----------------- | | `Compute/containers/containers.yaml` | Annotate 3 description codeblocks as `bicep` | | `Compute/persistentVolumes/persistentVolumes.yaml` | Annotate 4 description codeblocks as `bicep` | | `Compute/routes/routes.yaml` | Annotate 3 description codeblocks as `bicep` | | `Data/redisCaches/redisCaches.yaml` | Annotate 2 description codeblocks as `bicep` | | `Data/postgreSqlDatabases/postgreSqlDatabases.yaml` | Annotate 2 description codeblocks as `bicep` | | `Data/mongoDatabases/mongoDatabases.yaml` | Annotate 2 description codeblocks as `bicep` | | `Data/neo4jDatabases/neo4jDatabases.yaml` | Annotate 3 description codeblocks as `bicep` | | `Data/sqlServerDatabases/sqlServerDatabases.yaml` | Annotate 2 description codeblocks as `bicep` | | `Data/mySqlDatabases/mySqlDatabases.yaml` | Annotate 2 description codeblocks as `bicep` | | `Messaging/kafka/kafka.yaml` | Annotate 2 description codeblocks as `bicep` | | `Messaging/rabbitMQ/rabbitMQ.yaml` | Annotate 1 description codeblock as `bicep` | | `AI/search/search.yaml` | Annotate 2 description codeblocks as `bicep` | | `AI/models/models.yaml` | Annotate 2 description codeblocks as `bicep` | | `Storage/objectStorage/objectStorage.yaml` | Annotate 2 description codeblocks as `bicep` | | `Security/secrets/secrets.yaml` | Annotate 1 description codeblock as `bicep` | | `docs/contributing/contributing-resource-types-recipes.md` | Require language annotations on all description codeblocks; convert the `redisCaches` example from indented to fenced `bicep` blocks | <!-- START COPILOT CODING AGENT SUFFIX --> - Fixes #266 --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Reshma Abdul Rahim <61033581+Reshrahim@users.noreply.github.com>
1 parent c141bd1 commit 39f65be

16 files changed

Lines changed: 52 additions & 48 deletions

File tree

AI/models/models.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ types:
66
To deploy a model, add a models resource to the application definition Bicep
77
file. The platform-engineer recipe binds this developer-facing contract to a
88
managed cloud model service without exposing any module details to the app.
9-
```
9+
```bicep
1010
resource model 'Radius.AI/models@2025-08-01-preview' = {
1111
name: 'model'
1212
properties: {
@@ -19,7 +19,7 @@ types:
1919
2020
To connect your container to the model, create a connection from the
2121
Container resource to the model as shown below.
22-
```
22+
```bicep
2323
resource frontend 'Radius.Compute/containers@2025-08-01-preview' = {
2424
name: 'frontend'
2525
properties: {

AI/search/search.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ types:
1010
deploy a search service, add a search resource to the application
1111
definition Bicep file. The platform-engineer recipe provisions the concrete
1212
backend and maps its endpoint and API key outputs back onto this resource.
13-
```
13+
```bicep
1414
resource search 'Radius.AI/search@2025-08-01-preview' = {
1515
name: 'search'
1616
properties: {
@@ -22,7 +22,7 @@ types:
2222
2323
To connect your container to the service, create a connection from the
2424
Container resource to the search service as shown below.
25-
```
25+
```bicep
2626
resource frontend 'Radius.Compute/containers@2025-08-01-preview' = {
2727
name: 'frontend'
2828
properties: {

Compute/containers/containers.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ types:
44
description: |
55
The Radius.Compute/containers Resource Type is the primary resource type for running one or more containers. It is always part of a Radius Application. To deploy a Container add a resource to the application definition Bicep file.
66
7-
```
7+
```bicep
88
extension radius
99
param environment string
1010
@@ -28,7 +28,7 @@ types:
2828
2929
To accept network connections, expose a port on the container.
3030
31-
```
31+
```bicep
3232
resource myContainer 'Radius.Compute/containers@2025-08-01-preview' = {
3333
name: 'myContainer'
3434
properties: {
@@ -52,7 +52,7 @@ types:
5252
5353
To create an ephemeral emptyDir shared between two containers add a Containers.properties.volumes.
5454
55-
```
55+
```bicep
5656
resource myContainer 'Radius.Compute/containers@2025-08-01-preview' = {
5757
name: 'myContainer'
5858
properties: {

Compute/persistentVolumes/persistentVolumes.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ types:
44
description: |
55
The Radius.Compute/persistentVolumes Resource Type represents a persistent storage volume. A PersistentVolume can be referenced in the volumes property of a Container.
66
To deploy, first add a PersistentVolume resource to the application definition Bicep file.
7-
```
7+
```bicep
88
extension radius
99
param environment string
1010
@@ -21,7 +21,7 @@ types:
2121
```
2222
2323
Then reference the PersistentVolume by ID in the volumes property of the Container. Finally, set the mountPath in the container referencing the volumeName.
24-
```
24+
```bicep
2525
resource myContainer 'Radius.Compute/containers@2025-08-01-preview' = {
2626
name: 'myContainer'
2727
properties: {
@@ -50,14 +50,14 @@ types:
5050
```
5151
5252
PersistentVolumes may be shared across multiple Containers. To mount an existing PersistentVolume in read-only mode, reference the PersistentVolume by name using the `existing` Bicep keyword. For example:
53-
```
53+
```bicep
5454
resource existingPersistentVolume 'Radius.Compute/persistentVolumes@2025-08-01-preview' existing = {
5555
name: 'existingPersistentVolume'
5656
}
5757
```
5858
5959
Then add the existing PersistentVolume to the volumes property of a Container with accessMode set to `ReadOnlyMany`.
60-
```
60+
```bicep
6161
resource myContainer 'Radius.Compute/containers@2025-08-01-preview' = {
6262
name: 'myContainer'
6363
properties: {

Compute/routes/routes.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ types:
33
routes:
44
description: |
55
The Radius.Compute/routes Resource Type defines network routes for responding to external clients. Note that a Routes resource is not required for service-to-service communication. To use Routes, define a Container and ensure a `containerPort` is specified.
6-
```
6+
```bicep
77
extension radius
88
param environment string
99
@@ -37,7 +37,7 @@ types:
3737
```
3838
3939
Then define a Routes resource.
40-
```
40+
```bicep
4141
resource ingressRule 'Radius.Compute/routes@2025-08-01-preview' = {
4242
name: 'ingressRule'
4343
properties: {
@@ -65,7 +65,7 @@ types:
6565
The hostname is determined by the Recipe.
6666
6767
Multiple rules can be included in Routes.
68-
```
68+
```bicep
6969
resource ingressRule 'Radius.Compute/routes@2025-08-01-preview' = {
7070
name: 'ingressRule'
7171
properties: {

Data/mongoDatabases/mongoDatabases.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ types:
77
application definition Bicep file. The Azure recipe uses Cosmos DB for
88
MongoDB and exposes its endpoint and connection string as resource
99
properties.
10-
```
10+
```bicep
1111
resource database 'Radius.Data/mongoDatabases@2025-08-01-preview' = {
1212
name: 'mongo'
1313
properties: {
@@ -20,7 +20,7 @@ types:
2020
2121
To connect your container to the database, create a connection from the
2222
Container resource to the database as shown below.
23-
```
23+
```bicep
2424
resource frontend 'Radius.Compute/containers@2025-08-01-preview' = {
2525
name: 'frontend'
2626
properties: {

Data/mySqlDatabases/mySqlDatabases.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ types:
33
mySqlDatabases:
44
description: |
55
The Radius.Data/mySqlDatabases Resource Type deploys a MySQL database. Provide the administrator `username` and `password` directly on the resource. The `password` property is marked `x-radius-sensitive`, so Radius encrypts it at rest, redacts it on reads, and exposes it (decrypted) only to the platform-engineer recipe that provisions the database.
6-
```
6+
```bicep
77
resource mysql 'Radius.Data/mySqlDatabases@2025-08-01-preview' = {
88
name: 'mysql'
99
properties: {
@@ -21,7 +21,7 @@ types:
2121
When deploying the application definition, provide the database password value as a parameter. It is recommended to use a password generator such as `openssl` or equivalent. For example, `rad deploy app.bicep -p ****** rand -hex 16)`.
2222
2323
To connect your container to the database, create a connection from the Container resource to the database as shown below.
24-
```
24+
```bicep
2525
resource myApplication 'Radius.Core/Applications@2025-08-01-preview' = { ... }
2626
2727
resource frontend 'Radius.Compute/containers@2025-08-01-preview' = {

Data/neo4jDatabases/neo4jDatabases.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ types:
55
The Radius.Data/neo4jDatabases Resource Type deploys a Neo4j graph database. To create a new Neo4j database,
66
define an Application and Container resource in your application definition Bicep file.
77
8-
```
8+
```bicep
99
extension radius
1010
param environment string
1111
resource myApplication 'Radius.Core/applications@2025-08-01-preview' = { ... }
1212
resource myContainer 'Radius.Compute/containers@2025-08-01-preview' = { ... }
1313
```
1414
Then add a `neo4jDatabases` resource.
15-
```
15+
```bicep
1616
resource neo4j 'Radius.Data/neo4jDatabases@2025-09-11-preview' = {
1717
name: 'neo4j'
1818
properties: {
@@ -43,7 +43,7 @@ types:
4343
When deploying the application definition, provide the database password value as a parameter. It is recommended to use a password generator such as `openssl` or equivalent. For example, `rad deploy app.bicep -p password=$(openssl rand -hex 16)`.
4444
4545
To connect to the new Neo4j database, add a connection between the container and the new Neo4j database. The final Container resource should look similar to:
46-
```
46+
```bicep
4747
resource myContainer 'Radius.Compute/containers@2025-08-01-preview' = {
4848
name: 'myContainer'
4949
properties: {

Data/postgreSqlDatabases/postgreSqlDatabases.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ types:
33
postgreSqlDatabases:
44
description: |
55
The Radius.Data/postgreSqlDatabases Resource Type deploys a PostgreSQL database. Provide the administrator `username` and `password` directly on the resource. The `password` property is marked `x-radius-sensitive`, so Radius encrypts it at rest, redacts it on reads, and exposes it (decrypted) only to the recipe that provisions the database.
6-
```
6+
```bicep
77
resource postgresql 'Radius.Data/postgreSqlDatabases@2025-08-01-preview' = {
88
name: 'postgresql'
99
properties: {
@@ -21,7 +21,7 @@ types:
2121
When deploying the application definition, provide the database password value as a parameter. It is recommended to use a password generator such as `openssl` or equivalent. For example, `rad deploy app.bicep -p password=$(openssl rand -hex 16)`.
2222
2323
To connect your container to the database, create a connection from the Container resource to the database as shown below.
24-
```
24+
```bicep
2525
resource myApplication 'Radius.Core/Applications@2025-08-01-preview' = { ... }
2626
2727
resource frontend 'Radius.Compute/containers@2025-08-01-preview' = {

Data/redisCaches/redisCaches.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ types:
77
file. Unlike database types, no secret is required: Azure Managed Redis
88
generates its own access keys, so the platform-engineer recipe needs no
99
injected credentials.
10-
```
10+
```bicep
1111
resource cache 'Radius.Data/redisCaches@2025-08-01-preview' = {
1212
name: 'redis'
1313
properties: {
@@ -20,7 +20,7 @@ types:
2020
2121
To connect your container to the cache, create a connection from the
2222
Container resource to the cache as shown below.
23-
```
23+
```bicep
2424
resource frontend 'Radius.Compute/containers@2025-08-01-preview' = {
2525
name: 'frontend'
2626
properties: {

0 commit comments

Comments
 (0)