Skip to content

Commit a8643e4

Browse files
committed
improve schema
1 parent 0d26020 commit a8643e4

File tree

1 file changed

+59
-6
lines changed

1 file changed

+59
-6
lines changed

scripts/tests/schema.json

Lines changed: 59 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
}
7171
},
7272
"resources": {
73-
"testprovider:index/testResource:TestResource": {
73+
"testprovider:index/testResource:TestResourceCommentFence": {
7474
"description": "This is a test resource that demonstrates various property types and documentation features.\n\n## Example Usage\n\n<!--Start PulumiCodeChooser -->\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as testprovider from \"@pulumi/testprovider\";\n\nconst example = new testprovider.TestResource(\"example\", {\n name: \"test-resource\",\n tags: {\n environment: \"test\"\n },\n count: 42,\n enabled: true\n});\n```\n```python\nimport pulumi\nimport pulumi_testprovider as testprovider\n\nexample = testprovider.TestResource(\"example\",\n name=\"test-resource\",\n tags={\n \"environment\": \"test\"\n },\n count=42,\n enabled=True\n)\n```\n```csharp\nusing System.Collections.Generic;\nusing Pulumi;\nusing TestProvider = Pulumi.TestProvider;\n\nreturn await Deployment.RunAsync(() => \n{\n var example = new TestProvider.TestResource(\"example\", new TestProvider.TestResourceArgs\n {\n Name = \"test-resource\",\n Tags = \n {\n { \"environment\", \"test\" }\n },\n Count = 42,\n Enabled = true,\n });\n});\n```\n```go\npackage main\n\nimport (\n \"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n \"github.com/pulumi/registry/tests/testprovider/sdk/go/testprovider\"\n)\n\nfunc main() {\n pulumi.Run(func(ctx *pulumi.Context) error {\n _, err := testprovider.NewTestResource(ctx, \"example\", &testprovider.TestResourceArgs{\n Name: pulumi.String(\"test-resource\"),\n Tags: pulumi.StringMap{\n \"environment\": pulumi.String(\"test\"),\n },\n Count: pulumi.Int(42),\n Enabled: pulumi.Bool(true),\n })\n if err != nil {\n return err\n }\n return nil\n })\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.testprovider.TestResource;\nimport com.pulumi.testprovider.TestResourceArgs;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new TestResource(\"example\", TestResourceArgs.builder()\n .name(\"test-resource\")\n .tags(Map.of(\"environment\", \"test\"))\n .count(42)\n .enabled(true)\n .build());\n }\n}\n```\n```yaml\nresources:\n example:\n type: testprovider:index:TestResource\n properties:\n name: test-resource\n tags:\n environment: test\n count: 42\n enabled: true\n```\n<!--End PulumiCodeChooser -->",
7575
"properties": {
7676
"name": {
@@ -146,17 +146,43 @@
146146
}
147147
}
148148
},
149-
"testprovider:index/deprecatedResource:DeprecatedResource": {
150-
"description": "This is a deprecated resource to test deprecation notices in documentation.\n\n## Example Usage\n\n<!--Start PulumiCodeChooser -->\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as testprovider from \"@pulumi/testprovider\";\n\nconst example = new testprovider.DeprecatedResource(\"example\", {\n name: \"deprecated-resource\"\n});\n```\n```python\nimport pulumi\nimport pulumi_testprovider as testprovider\n\nexample = testprovider.DeprecatedResource(\"example\",\n name=\"deprecated-resource\"\n)\n```\n```csharp\nusing Pulumi;\nusing TestProvider = Pulumi.TestProvider;\n\nreturn await Deployment.RunAsync(() => \n{\n var example = new TestProvider.DeprecatedResource(\"example\", new TestProvider.DeprecatedResourceArgs\n {\n Name = \"deprecated-resource\",\n });\n});\n```\n```go\npackage main\n\nimport (\n \"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n \"github.com/pulumi/registry/tests/testprovider/sdk/go/testprovider\"\n)\n\nfunc main() {\n pulumi.Run(func(ctx *pulumi.Context) error {\n _, err := testprovider.NewDeprecatedResource(ctx, \"example\", &testprovider.DeprecatedResourceArgs{\n Name: pulumi.String(\"deprecated-resource\"),\n })\n if err != nil {\n return err\n }\n return nil\n })\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.testprovider.DeprecatedResource;\nimport com.pulumi.testprovider.DeprecatedResourceArgs;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new DeprecatedResource(\"example\", DeprecatedResourceArgs.builder()\n .name(\"deprecated-resource\")\n .build());\n }\n}\n```\n```yaml\nresources:\n example:\n type: testprovider:index:DeprecatedResource\n properties:\n name: deprecated-resource\n```\n<!--End PulumiCodeChooser -->",
151-
"deprecationMessage": "This resource is deprecated and will be removed in a future release. Use TestResource instead.",
149+
"testprovider:index/testResource:TestResourceExamplesFence": {
150+
"description": "This is a test resource that demonstrates various property types and documentation features.\n\n{{% examples %}}\n## Example Usage\n{{% example %}}\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as testprovider from \"@pulumi/testprovider\";\n\nconst example = new testprovider.TestResource(\"example\", {\n name: \"test-resource\",\n tags: {\n environment: \"test\"\n },\n count: 42,\n enabled: true\n});\n```\n```python\nimport pulumi\nimport pulumi_testprovider as testprovider\n\nexample = testprovider.TestResource(\"example\",\n name=\"test-resource\",\n tags={\n \"environment\": \"test\"\n },\n count=42,\n enabled=True\n)\n```\n```csharp\nusing System.Collections.Generic;\nusing Pulumi;\nusing TestProvider = Pulumi.TestProvider;\n\nreturn await Deployment.RunAsync(() => \n{\n var example = new TestProvider.TestResource(\"example\", new TestProvider.TestResourceArgs\n {\n Name = \"test-resource\",\n Tags = \n {\n { \"environment\", \"test\" }\n },\n Count = 42,\n Enabled = true,\n });\n});\n```\n```go\npackage main\n\nimport (\n \"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n \"github.com/pulumi/registry/tests/testprovider/sdk/go/testprovider\"\n)\n\nfunc main() {\n pulumi.Run(func(ctx *pulumi.Context) error {\n _, err := testprovider.NewTestResource(ctx, \"example\", &testprovider.TestResourceArgs{\n Name: pulumi.String(\"test-resource\"),\n Tags: pulumi.StringMap{\n \"environment\": pulumi.String(\"test\"),\n },\n Count: pulumi.Int(42),\n Enabled: pulumi.Bool(true),\n })\n if err != nil {\n return err\n }\n return nil\n })\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.testprovider.TestResource;\nimport com.pulumi.testprovider.TestResourceArgs;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new TestResource(\"example\", TestResourceArgs.builder()\n .name(\"test-resource\")\n .tags(Map.of(\"environment\", \"test\"))\n .count(42)\n .enabled(true)\n .build());\n }\n}\n```\n```yaml\nresources:\n example:\n type: testprovider:index:TestResource\n properties:\n name: test-resource\n tags:\n environment: test\n count: 42\n enabled: true\n```\n{{% /example %}}\n{{% /examples %}}",
152151
"properties": {
153152
"name": {
154153
"type": "string",
155-
"description": "The name of the deprecated resource."
154+
"description": "The name of the test resource."
155+
},
156+
"tags": {
157+
"type": "object",
158+
"additionalProperties": {
159+
"type": "string"
160+
},
161+
"description": "Tags to apply to the resource."
162+
},
163+
"count": {
164+
"type": "integer",
165+
"description": "A sample counter value."
166+
},
167+
"enabled": {
168+
"type": "boolean",
169+
"description": "Whether the resource is enabled.",
170+
"default": true
156171
},
157172
"id": {
158173
"type": "string",
159174
"description": "The unique identifier for the resource."
175+
},
176+
"nested": {
177+
"$ref": "#/types/testprovider:index/NestedType:NestedType",
178+
"description": "A nested object property."
179+
},
180+
"nestedList": {
181+
"type": "array",
182+
"items": {
183+
"$ref": "#/types/testprovider:index/NestedType:NestedType"
184+
},
185+
"description": "A list of nested objects."
160186
}
161187
},
162188
"required": [
@@ -165,7 +191,34 @@
165191
"inputProperties": {
166192
"name": {
167193
"type": "string",
168-
"description": "The name of the deprecated resource."
194+
"description": "The name of the test resource."
195+
},
196+
"tags": {
197+
"type": "object",
198+
"additionalProperties": {
199+
"type": "string"
200+
},
201+
"description": "Tags to apply to the resource."
202+
},
203+
"count": {
204+
"type": "integer",
205+
"description": "A sample counter value."
206+
},
207+
"enabled": {
208+
"type": "boolean",
209+
"description": "Whether the resource is enabled.",
210+
"default": true
211+
},
212+
"nested": {
213+
"$ref": "#/types/testprovider:index/NestedType:NestedType",
214+
"description": "A nested object property."
215+
},
216+
"nestedList": {
217+
"type": "array",
218+
"items": {
219+
"$ref": "#/types/testprovider:index/NestedType:NestedType"
220+
},
221+
"description": "A list of nested objects."
169222
}
170223
}
171224
}

0 commit comments

Comments
 (0)