Skip to content

Commit d2684d4

Browse files
Update Aspire schema (SchemaStore#5082)
* Update Aspire schema * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 00b2542 commit d2684d4

File tree

4 files changed

+517
-0
lines changed

4 files changed

+517
-0
lines changed

src/schemas/json/aspire-8.0.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,23 @@
339339
},
340340
"additionalProperties": false
341341
},
342+
{
343+
"type": "object",
344+
"description": "Represents a formatted projection of a parameter value, produced by applying the specified filter to the parameter.",
345+
"required": ["type", "value", "filter"],
346+
"properties": {
347+
"type": {
348+
"const": "annotated.string"
349+
},
350+
"value": {
351+
"$ref": "#/definitions/value"
352+
},
353+
"filter": {
354+
"$ref": "#/definitions/annotatedStringFilter"
355+
}
356+
},
357+
"additionalProperties": false
358+
},
342359
{
343360
"type": "object",
344361
"description": "Represents a Dapr resource in the manifest.",
@@ -458,6 +475,7 @@
458475
"type": "string",
459476
"enum": [
460477
"parameter.v0",
478+
"annotated.string",
461479
"container.v0",
462480
"container.v1",
463481
"dockerfile.v0",
@@ -549,6 +567,11 @@
549567
"type": "string",
550568
"description": "A value that can be referenced via an expression in the manifest"
551569
},
570+
"annotatedStringFilter": {
571+
"type": "string",
572+
"description": "Identifies the filter to apply to the referenced parameter value (for example, 'uri').",
573+
"enum": ["uri"]
574+
},
552575
"args": {
553576
"type": "array",
554577
"description": "List of arguments to used when launched.",

src/test/aspire-8.0/Nats.3.json

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
{
2+
"$schema": "https://json.schemastore.org/aspire-8.0.json",
3+
"resources": {
4+
"api": {
5+
"bindings": {
6+
"http": {
7+
"external": true,
8+
"protocol": "tcp",
9+
"scheme": "http",
10+
"transport": "http"
11+
},
12+
"https": {
13+
"external": true,
14+
"protocol": "tcp",
15+
"scheme": "https",
16+
"transport": "http"
17+
}
18+
},
19+
"env": {
20+
"ASPNETCORE_FORWARDEDHEADERS_ENABLED": "true",
21+
"ConnectionStrings__nats": "{nats.connectionString}",
22+
"HTTP_PORTS": "{api.bindings.http.targetPort}",
23+
"NATS_HOST": "{nats.bindings.tcp.host}",
24+
"NATS_PASSWORD": "{nats-password.value}",
25+
"NATS_PORT": "{nats.bindings.tcp.port}",
26+
"NATS_URI": "nats://nats:{nats-password-uri-encoded.value}@{nats.bindings.tcp.host}:{nats.bindings.tcp.port}",
27+
"NATS_USERNAME": "nats",
28+
"OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EVENT_LOG_ATTRIBUTES": "true",
29+
"OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EXCEPTION_LOG_ATTRIBUTES": "true",
30+
"OTEL_DOTNET_EXPERIMENTAL_OTLP_RETRY": "in_memory"
31+
},
32+
"path": "../Nats.ApiService/Nats.ApiService.csproj",
33+
"type": "project.v0"
34+
},
35+
"backend": {
36+
"bindings": {
37+
"http": {
38+
"protocol": "tcp",
39+
"scheme": "http",
40+
"transport": "http"
41+
},
42+
"https": {
43+
"protocol": "tcp",
44+
"scheme": "https",
45+
"transport": "http"
46+
}
47+
},
48+
"env": {
49+
"ASPNETCORE_FORWARDEDHEADERS_ENABLED": "true",
50+
"ConnectionStrings__nats": "{nats.connectionString}",
51+
"HTTP_PORTS": "{backend.bindings.http.targetPort}",
52+
"NATS_HOST": "{nats.bindings.tcp.host}",
53+
"NATS_PASSWORD": "{nats-password.value}",
54+
"NATS_PORT": "{nats.bindings.tcp.port}",
55+
"NATS_URI": "nats://nats:{nats-password-uri-encoded.value}@{nats.bindings.tcp.host}:{nats.bindings.tcp.port}",
56+
"NATS_USERNAME": "nats",
57+
"OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EVENT_LOG_ATTRIBUTES": "true",
58+
"OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EXCEPTION_LOG_ATTRIBUTES": "true",
59+
"OTEL_DOTNET_EXPERIMENTAL_OTLP_RETRY": "in_memory"
60+
},
61+
"path": "../Nats.Backend/Nats.Backend.csproj",
62+
"type": "project.v0"
63+
},
64+
"nats": {
65+
"args": ["--user", "nats", "--pass", "{nats-password.value}", "-js"],
66+
"bindings": {
67+
"tcp": {
68+
"protocol": "tcp",
69+
"scheme": "tcp",
70+
"targetPort": 4222,
71+
"transport": "tcp"
72+
}
73+
},
74+
"connectionString": "nats://nats:{nats-password-uri-encoded.value}@{nats.bindings.tcp.host}:{nats.bindings.tcp.port}",
75+
"image": "docker.io/library/nats:2.11",
76+
"type": "container.v0"
77+
},
78+
"nats-password": {
79+
"inputs": {
80+
"value": {
81+
"default": {
82+
"generate": {
83+
"minLength": 22,
84+
"special": false
85+
}
86+
},
87+
"secret": true,
88+
"type": "string"
89+
}
90+
},
91+
"type": "parameter.v0",
92+
"value": "{nats-password.inputs.value}"
93+
},
94+
"nats-password-uri-encoded": {
95+
"filter": "uri",
96+
"type": "annotated.string",
97+
"value": "{nats-password.value}"
98+
}
99+
}
100+
}
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
{
2+
"$schema": "https://json.schemastore.org/aspire-8.0.json",
3+
"resources": {
4+
"FREEPDB1": {
5+
"connectionString": "{oracle.connectionString}/FREEPDB1",
6+
"type": "value.v0"
7+
},
8+
"api": {
9+
"bindings": {
10+
"http": {
11+
"protocol": "tcp",
12+
"scheme": "http",
13+
"transport": "http"
14+
},
15+
"https": {
16+
"protocol": "tcp",
17+
"scheme": "https",
18+
"transport": "http"
19+
}
20+
},
21+
"env": {
22+
"ASPNETCORE_FORWARDEDHEADERS_ENABLED": "true",
23+
"ConnectionStrings__FREEPDB1": "{FREEPDB1.connectionString}",
24+
"FREEPDB1_DATABASE": "FREEPDB1",
25+
"FREEPDB1_HOST": "{oracle.bindings.tcp.host}",
26+
"FREEPDB1_JDBCCONNECTIONSTRING": "jdbc:oracle:thin:system/{oracle-password-uri-encoded.value}@//{oracle.bindings.tcp.host}:{oracle.bindings.tcp.port}/FREEPDB1",
27+
"FREEPDB1_PASSWORD": "{oracle-password.value}",
28+
"FREEPDB1_PORT": "{oracle.bindings.tcp.port}",
29+
"FREEPDB1_USERNAME": "system",
30+
"HTTP_PORTS": "{api.bindings.http.targetPort}",
31+
"OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EVENT_LOG_ATTRIBUTES": "true",
32+
"OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EXCEPTION_LOG_ATTRIBUTES": "true",
33+
"OTEL_DOTNET_EXPERIMENTAL_OTLP_RETRY": "in_memory"
34+
},
35+
"path": "../OracleEndToEnd.ApiService/OracleEndToEnd.ApiService.csproj",
36+
"type": "project.v0"
37+
},
38+
"oracle": {
39+
"bindings": {
40+
"tcp": {
41+
"protocol": "tcp",
42+
"scheme": "tcp",
43+
"targetPort": 1521,
44+
"transport": "tcp"
45+
}
46+
},
47+
"connectionString": "user id=system;password={oracle-password.value};data source={oracle.bindings.tcp.host}:{oracle.bindings.tcp.port}",
48+
"env": {
49+
"ORACLE_PWD": "{oracle-password.value}"
50+
},
51+
"image": "container-registry.oracle.com/database/free:23.9.0.0",
52+
"type": "container.v0"
53+
},
54+
"oracle-password": {
55+
"inputs": {
56+
"value": {
57+
"default": {
58+
"generate": {
59+
"minLength": 22
60+
}
61+
},
62+
"secret": true,
63+
"type": "string"
64+
}
65+
},
66+
"type": "parameter.v0",
67+
"value": "{oracle-password.inputs.value}"
68+
},
69+
"oracle-password-uri-encoded": {
70+
"filter": "uri",
71+
"type": "annotated.string",
72+
"value": "{oracle-password.value}"
73+
}
74+
}
75+
}

0 commit comments

Comments
 (0)