pulumi/pkg/codegen/testing/test/testdata
Sean Holung bf251932ef
Fix enum rendering issue (#15415)
Fixes: https://github.com/pulumi/registry/issues/3724
Fixes: https://github.com/pulumi/registry/issues/2966

This PR is to resolve the enum rendering issue. The enums were not being
rendered on the page at all due to a misconfigured language choosable
(i.e. `<pulumi-choosable>`) that wraps the enum section. I found out
this had to do with the lang property being set as `nodejs` when instead
the choosable expects `javascript` or `typescript` as the valid values.
I then followed the pattern of what we seem to be doing for the other
pulumi-choosables which have this issue, which is to have an if
statement that sets it to `javascript,typescript` if `nodejs` is given.

This is how the rendering looks now. I have not adjusted any layouts of
the template or anything along those lines, only fixed the choosable. I
am wondering if this is actually what was intended for these, as we have
a display name in the left column that is ~useless IMO and the right
column has the value. I am assuming this was done to match the
formatting of the other nested types that are displayed since these
enums are treated as such. Though I don't think it is optimal for what
we are trying to present given that we do not have descriptions for any
of the individual enum values and what they represent.

Should we consider doing something like having a separate enum section
that is more purpose built for the data we can display where we just
have the enum type in the left column, followed by the valid enum values
in the right column. For example:

| Instance Type | a1.2xlarge, a1.4xlarge , a1.large.... |


Should we consider moving to something like this or continue following
the current pattern we have? Thoughts welcome!

Also, we can consider shipping this as it is as it is still an
improvement over what we have now and file a follow up issue to
re-assess the way this is presented.

This is the current render that this PR fix will produce:

<img width="795" alt="Screen Shot 2024-02-09 at 8 35 21 AM"
src="https://github.com/pulumi/pulumi/assets/16751381/352462b7-720c-4495-bdfe-f62cfdd946c0">
2024-02-12 21:25:36 +00:00
..
array-of-enum-map [sdk-gen/go] Remove pulumix references from generated enums in non-generic SDKs (#15280) 2024-01-27 18:57:16 +00:00
assets-and-archives [sdkgen/python] Require Python >=3.8 (#15368) 2024-02-04 19:07:53 +00:00
assets-and-archives-go-generics-only [go/sdk-gen] Fixes plain and optional properties for generated types for Go SDKs using generics (#14616) 2023-11-21 16:43:51 +00:00
assets-archives-pp Add generated System.Linq usings 2023-03-24 12:43:46 +01:00
aws-eks-pp [program-gen] Emit missing trivia for resources and local variables (#15419) 2024-02-11 17:02:12 +00:00
aws-fargate-output-versioned-pp [program-gen] Emit missing trivia for resources and local variables (#15419) 2024-02-11 17:02:12 +00:00
aws-fargate-pp [program-gen] Emit missing trivia for resources and local variables (#15419) 2024-02-11 17:02:12 +00:00
aws-iam-policy-pp [program-gen] Emit missing trivia for resources and local variables (#15419) 2024-02-11 17:02:12 +00:00
aws-lambda-pp Update test results 2022-09-27 17:15:10 -07:00
aws-optionals-pp Fix incorrect pointers for array of objects [go/codegen] 2022-12-19 12:45:27 -08:00
aws-resource-options-4.26-pp Add generated System.Linq usings 2023-03-24 12:43:46 +01:00
aws-resource-options-5.16.2-pp Add generated System.Linq usings 2023-03-24 12:43:46 +01:00
aws-s3-folder-pp [program-gen] Emit missing trivia for resources and local variables (#15419) 2024-02-11 17:02:12 +00:00
aws-s3-logging-pp Add generated System.Linq usings 2023-03-24 12:43:46 +01:00
aws-secret-pp Add generated System.Linq usings 2023-03-24 12:43:46 +01:00
aws-webserver-pp [program-gen] Emit missing trivia for resources and local variables (#15419) 2024-02-11 17:02:12 +00:00
azure-native-nested-types [sdkgen/python] Require Python >=3.8 (#15368) 2024-02-04 19:07:53 +00:00
azure-native-pp codegen/go: output correct array type (#14299) 2023-10-20 16:12:25 +00:00
azure-sa-pp Add generated System.Linq usings 2023-03-24 12:43:46 +01:00
components-pp [program-gen] Emit missing trivia for resources and local variables (#15419) 2024-02-11 17:02:12 +00:00
config-variables-pp [program-gen/go] Fix required config variables of type bool and number (#14958) 2023-12-20 13:16:37 +00:00
csharp-plain-lists-pp Fixes list initializer for plain lists in resource properties 2023-08-07 18:43:37 +02:00
csharp-typed-for-expressions-pp Fixes code generation of ForExpressions 2023-07-28 20:30:00 +02:00
cyclic-types [sdkgen/python] Require Python >=3.8 (#15368) 2024-02-04 19:07:53 +00:00
dash-named-schema [sdkgen/python] Require Python >=3.8 (#15368) 2024-02-04 19:07:53 +00:00
dashed-import-schema Fix enum rendering issue (#15415) 2024-02-12 21:25:36 +00:00
different-enum Fix enum rendering issue (#15415) 2024-02-12 21:25:36 +00:00
different-package-name-conflict Remove dotnet 2022-12-13 16:13:53 +00:00
discriminated-union-pp Examples of iterating lists and maps of objects in components 2023-03-24 10:40:18 +01:00
docs-collision [docsgen] Fix rendering of deprecated messages and text in description lists (#13773) 2023-08-26 17:36:28 +00:00
dynamic-entries-pp Allow iterating dynamic entries in TypeScript 2023-05-16 20:11:57 +02:00
embedded-crd-types [sdkgen/python] Require Python >=3.8 (#15368) 2024-02-04 19:07:53 +00:00
empty-list-property-pp [programgen/csharp] Fixes compiling an empty list of expressions from object properties (#14027) 2023-09-28 12:43:35 +00:00
entries-function-pp Fixes code generation of ForExpressions 2023-07-28 20:30:00 +02:00
enum-reference [sdkgen/python] Require Python >=3.8 (#15368) 2024-02-04 19:07:53 +00:00
enum-reference-python [sdkgen/python] Require Python >=3.8 (#15368) 2024-02-04 19:07:53 +00:00
external-enum Fix enum rendering issue (#15415) 2024-02-12 21:25:36 +00:00
external-go-import-aliases Support returning plain values from methods (#13592) 2023-11-18 06:02:06 +00:00
external-node-compatibility Support returning plain values from methods (#13592) 2023-11-18 06:02:06 +00:00
external-python-same-module-name [sdkgen/python] Require Python >=3.8 (#15368) 2024-02-04 19:07:53 +00:00
external-resource-schema [sdkgen/python] Require Python >=3.8 (#15368) 2024-02-04 19:07:53 +00:00
functions-pp [program-gen] Emit missing trivia for resources and local variables (#15419) 2024-02-11 17:02:12 +00:00
functions-secrets [sdkgen/python] Require Python >=3.8 (#15368) 2024-02-04 19:07:53 +00:00
go-nested-collections Support returning plain values from methods (#13592) 2023-11-18 06:02:06 +00:00
go-overridden-internal-module-name Support returning plain values from methods (#13592) 2023-11-18 06:02:06 +00:00
go-plain-ref-repro Support returning plain values from methods (#13592) 2023-11-18 06:02:06 +00:00
hyphen-url [sdkgen/python] Require Python >=3.8 (#15368) 2024-02-04 19:07:53 +00:00
hyphenated-symbols [sdkgen/python] Require Python >=3.8 (#15368) 2024-02-04 19:07:53 +00:00
inline-invokes-pp [go/program-gen] Fix using inline invoke expressions inside resources, objects and arrays (#14484) 2023-11-03 14:22:43 +00:00
internal-dependencies-go Support returning plain values from methods (#13592) 2023-11-18 06:02:06 +00:00
interpolated-string-keys-pp regen example 2023-07-18 09:25:19 +02:00
invalid-go-sprintf-pp [program-gen] Emit missing trivia for resources and local variables (#15419) 2024-02-11 17:02:12 +00:00
invoke-inside-conditional-range-pp Fix typing for optional and complex config variables in main program 2023-07-26 13:37:53 +02:00
iterating-optional-range-expressions-pp Support range expressions that are of type output 2023-05-02 16:07:58 +02:00
kubernetes-operator-pp Add generated System.Linq usings 2023-03-24 12:43:46 +01:00
kubernetes-pod-pp [program-gen] Emit missing trivia for resources and local variables (#15419) 2024-02-11 17:02:12 +00:00
kubernetes-template-pp Add generated System.Linq usings 2023-03-24 12:43:46 +01:00
kubernetes-template-quoted-pp [program-gen/pcl] Fixes type-annotating nested resource properties when these have quoted keys (#15001) 2023-12-27 12:42:52 +00:00
logical-name-pp Check PCL outputs can have arbitrary labels (#15180) 2024-01-18 22:07:02 +00:00
methods-return-plain-resource [sdkgen/python] Require Python >=3.8 (#15368) 2024-02-04 19:07:53 +00:00
modpath-pp programgen(go): Handle conflicting names in imported packages 2023-07-25 12:49:37 -07:00
multiline-string-pp fix(codegen/go): Use raw string literals for multiline-strings 2023-06-22 10:55:45 -07:00
naming-collisions [sdkgen/python] Require Python >=3.8 (#15368) 2024-02-04 19:07:53 +00:00
nested-module [sdkgen/python] Require Python >=3.8 (#15368) 2024-02-04 19:07:53 +00:00
nested-module-thirdparty [sdkgen/python] Require Python >=3.8 (#15368) 2024-02-04 19:07:53 +00:00
optional-complex-config-pp Fix typing for optional and complex config variables in main program 2023-07-26 13:37:53 +02:00
other-owned Fix enum rendering issue (#15415) 2024-02-12 21:25:36 +00:00
output-funcs [sdkgen/python] Require Python >=3.8 (#15368) 2024-02-04 19:07:53 +00:00
output-funcs-aws-pp [program-gen] Emit missing trivia for resources and local variables (#15419) 2024-02-11 17:02:12 +00:00
output-funcs-edgeorder [sdkgen/python] Require Python >=3.8 (#15368) 2024-02-04 19:07:53 +00:00
output-funcs-go-generics-only [go/sdk-gen] Fixes plain and optional properties for generated types for Go SDKs using generics (#14616) 2023-11-21 16:43:51 +00:00
output-funcs-tfbridge20 [sdkgen/python] Require Python >=3.8 (#15368) 2024-02-04 19:07:53 +00:00
output-literals-pp Test for literals in output places 2023-05-12 16:00:25 +01:00
output-name-conflict-pp Allow output variables to have the same identifier as other program nodes 2023-06-07 02:37:40 +02:00
plain-and-default Fix enum rendering issue (#15415) 2024-02-12 21:25:36 +00:00
plain-and-default-go-generics-only Use camelCase for schema names (#15373) 2024-02-05 10:42:32 +00:00
plain-object-defaults [sdkgen/python] Require Python >=3.8 (#15368) 2024-02-04 19:07:53 +00:00
plain-object-disable-defaults [sdkgen/python] Require Python >=3.8 (#15368) 2024-02-04 19:07:53 +00:00
plain-schema-gh6957 [sdkgen/python] Require Python >=3.8 (#15368) 2024-02-04 19:07:53 +00:00
provider-config-schema Fix enum rendering issue (#15415) 2024-02-12 21:25:36 +00:00
provider-type-schema [sdkgen/python] Require Python >=3.8 (#15368) 2024-02-04 19:07:53 +00:00
pulumi-stack-reference-pp Add generated System.Linq usings 2023-03-24 12:43:46 +01:00
python-regress-10914-pp recursively annotate expressions under invoke calls with their associated schema types 2022-10-07 14:02:12 +02:00
python-regress-14037-pp [python/program-gen] Fix panic in python program-gen when rewriting index expressions (#14099) 2023-10-06 22:26:04 +00:00
python-reserved-pp Escape import names for python 2023-03-16 14:44:13 +00:00
python-resource-names-pp [import/python] use init param name for programgen (#9359) 2022-04-07 12:00:19 +02:00
random-pet-pp Add generated System.Linq usings 2023-03-24 12:43:46 +01:00
read-file-func-pp [typescrypt/program-gen] Fix generated readFile function so that it includes the encoding (#14633) 2023-11-23 00:26:41 +00:00
regress-8403 [sdkgen/python] Require Python >=3.8 (#15368) 2024-02-04 19:07:53 +00:00
regress-11176-pp programgen(go): Handle conflicting names in imported packages 2023-07-25 12:49:37 -07:00
regress-go-8664 Support returning plain values from methods (#13592) 2023-11-18 06:02:06 +00:00
regress-go-10527 Support returning plain values from methods (#13592) 2023-11-18 06:02:06 +00:00
regress-go-12971 Support returning plain values from methods (#13592) 2023-11-18 06:02:06 +00:00
regress-node-8110 [sdkgen/python] Require Python >=3.8 (#15368) 2024-02-04 19:07:53 +00:00
regress-node-12507-pp Fixes parseProxyApply to handle nested outputs within index expressions 2023-08-07 21:08:54 +02:00
regress-py-12546 [sdkgen/python] Require Python >=3.8 (#15368) 2024-02-04 19:07:53 +00:00
regress-py-12980 [sdkgen/python] Require Python >=3.8 (#15368) 2024-02-04 19:07:53 +00:00
regress-py-14012 Use camelCase for schema names (#15373) 2024-02-05 10:42:32 +00:00
regress-py-14539 [sdkgen/python] Require Python >=3.8 (#15368) 2024-02-04 19:07:53 +00:00
regress-py-tfbridge-611 [sdkgen/python] Require Python >=3.8 (#15368) 2024-02-04 19:07:53 +00:00
replace-on-change [sdkgen/python] Require Python >=3.8 (#15368) 2024-02-04 19:07:53 +00:00
resource-args-python [sdkgen/python] Require Python >=3.8 (#15368) 2024-02-04 19:07:53 +00:00
resource-args-python-case-insensitive [sdkgen/python] Require Python >=3.8 (#15368) 2024-02-04 19:07:53 +00:00
resource-property-overlap [sdkgen/python] Require Python >=3.8 (#15368) 2024-02-04 19:07:53 +00:00
retain-on-delete-pp Examples of iterating lists and maps of objects in components 2023-03-24 10:40:18 +01:00
schema Temporarily revert validation of urn/id output properties (#15025) 2024-01-03 03:21:23 +00:00
secrets [sdkgen/python] Require Python >=3.8 (#15368) 2024-02-04 19:07:53 +00:00
secrets-go-generics-only Support returning plain values from methods (#13592) 2023-11-18 06:02:06 +00:00
simple-enum-schema Fix enum rendering issue (#15415) 2024-02-12 21:25:36 +00:00
simple-enum-schema-go-generics-only Revert "[sdk-gen/go] Fix compiling plain element type with plain maps" (#15059) 2024-01-05 15:22:41 +00:00
simple-methods-schema [sdkgen/python] Require Python >=3.8 (#15368) 2024-02-04 19:07:53 +00:00
simple-methods-schema-single-value-returns [sdkgen/python] Require Python >=3.8 (#15368) 2024-02-04 19:07:53 +00:00
simple-plain-schema [sdkgen/python] Require Python >=3.8 (#15368) 2024-02-04 19:07:53 +00:00
simple-plain-schema-go-generics-only [go/sdk-gen] Fixes plain and optional properties for generated types for Go SDKs using generics (#14616) 2023-11-21 16:43:51 +00:00
simple-plain-schema-with-root-package [sdkgen/python] Require Python >=3.8 (#15368) 2024-02-04 19:07:53 +00:00
simple-range-pp Add generated System.Linq usings 2023-03-24 12:43:46 +01:00
simple-resource-schema Fix enum rendering issue (#15415) 2024-02-12 21:25:36 +00:00
simple-resource-schema-custom-pypackage-name [sdkgen/python] Require Python >=3.8 (#15368) 2024-02-04 19:07:53 +00:00
simple-resource-with-aliases [sdkgen/python] Require Python >=3.8 (#15368) 2024-02-04 19:07:53 +00:00
simple-schema-pyproject [sdkgen/python] Require Python >=3.8 (#15368) 2024-02-04 19:07:53 +00:00
simple-splat-pp Fix panic in go program-gen when encountering splat expressions 2023-06-07 13:22:41 +02:00
simple-yaml-schema Fix enum rendering issue (#15415) 2024-02-12 21:25:36 +00:00
simplified-invokes Support returning plain values from methods (#13592) 2023-11-18 06:02:06 +00:00
simplified-invokes-pp Add generated System.Linq usings 2023-03-24 12:43:46 +01:00
single-or-none-pp [programgen/dotnet,go] Implement singleOrNone intrinsic 2023-06-11 16:23:33 -07:00
snowflake-python-12998-pp Fixes python panic when emiting code for index expressions that aren't typechecked 2023-06-09 01:44:09 +02:00
synthetic-resource-properties-pp programgen(go): Handle conflicting names in imported packages 2023-07-25 12:49:37 -07:00
third-party-package-pp programgen(go): Handle conflicting names in imported packages 2023-07-25 12:49:37 -07:00
throw-not-implemented-pp [program-gen] Fix generated utility functions for filebase64, filebase64sha256, sha1 and mimeType (#14857) 2023-12-15 11:26:00 +00:00
transpiled_examples Use camelCase for schema names (#15373) 2024-02-05 10:42:32 +00:00
traverse-union-repro-pp Examples of iterating lists and maps of objects in components 2023-03-24 10:40:18 +01:00
typed-enum-pp Add generated System.Linq usings 2023-03-24 12:43:46 +01:00
unions-inline [sdkgen/python] Require Python >=3.8 (#15368) 2024-02-04 19:07:53 +00:00
unions-inside-arrays [sdkgen/python] Require Python >=3.8 (#15368) 2024-02-04 19:07:53 +00:00
unknown-invoke-pp Allow generating code for unknown invokes in non-strict mode 2023-07-10 15:05:18 +02:00
unknown-resource-pp Extend SkipResourceTypechecking to allow generating unknown resources 2023-06-14 19:02:56 +02:00
urn-id-properties [sdkgen/python] Require Python >=3.8 (#15368) 2024-02-04 19:07:53 +00:00
using-dashes-pp Fix aliasing package names using dashes when schema doesn't include go package info override 2023-06-20 18:11:47 +02:00
.gitignore [codegen/python] fix invalid codegen on empty outputs functions (#9649) 2022-05-23 14:43:38 -07:00
auto-deploy-0.0.1.json Fix panic in GenerateProject when version is not set in schema 2023-07-14 01:23:27 +02:00
aws-4.15.0.json Standardize pkg loading for TestReferenceRenderer 2022-11-03 16:46:41 -07:00
aws-4.26.0.json feat(ci): Enable fully offline codegen tests with versioned plugins cont'deleted 2022-10-11 05:16:46 -07:00
aws-4.36.0.json Add missing schemas 2022-10-24 16:47:54 -07:00
aws-4.37.1.json Add missing schemas 2022-10-24 16:47:54 -07:00
aws-5.4.0.json Test YAML PCL examples 2022-10-24 10:33:48 -07:00
aws-5.16.2.json feat(ci): Enable fully offline codegen tests with versioned plugins cont'deleted 2022-10-11 05:16:46 -07:00
aws-native-0.13.0.json Test YAML PCL examples 2022-10-24 10:33:48 -07:00
awsx-1.0.0-beta.5.json Test YAML PCL examples 2022-10-24 10:33:48 -07:00
azure-4.18.0.json feat(ci): Enable fully offline codegen tests with versioned plugins cont'deleted 2022-10-11 05:16:46 -07:00
azure-native-1.28.0.json Add missing schemas 2022-10-24 16:47:54 -07:00
azure-native-1.29.0.json feat(ci): Enable fully offline codegen tests with versioned plugins cont'deleted 2022-10-11 05:16:46 -07:00
azure-native-1.56.0.json Test YAML PCL examples 2022-10-24 10:33:48 -07:00
docker-3.1.0.json Test YAML PCL examples 2022-10-24 10:33:48 -07:00
docker-4.0.0-alpha.0.json testdata: add missing docker-4.0.0-alpha.0 schema 2023-03-03 08:20:22 -08:00
eks-0.37.1.json feat(ci): Enable fully offline codegen tests with versioned plugins cont'deleted 2022-10-11 05:16:46 -07:00
eks-0.40.0.json Test YAML PCL examples 2022-10-24 10:33:48 -07:00
enum-1.0.0.json Correctly roundtrip enums in schema marshalling (#13932) 2023-09-12 18:34:40 +00:00
google-native-0.18.2.json Add missing schemas 2022-10-24 16:47:54 -07:00
google-native-0.27.0.json Add test covering codegen expectations in #12009 2023-08-01 10:47:17 -07:00
kubernetes-3.0.0.json Test YAML PCL examples 2022-10-24 10:33:48 -07:00
kubernetes-3.7.0.json Add missing schemas 2022-10-24 16:47:54 -07:00
kubernetes-3.7.2.json feat(ci): Enable fully offline codegen tests with versioned plugins cont'deleted 2022-10-11 05:16:46 -07:00
lambda-0.1.0.json Escape import names for python 2023-03-16 14:44:13 +00:00
localref-1.0.0.json Correctly roundtip overlay type tokens in schema marshalling 2023-08-08 19:28:51 +01:00
other-0.1.0.json feat(ci): Enable fully offline codegen tests with versioned plugins cont'deleted 2022-10-11 05:16:46 -07:00
plain-properties-1.0.0.json [schema] Fix package get-schema marking resource properties as plain (#14689) 2023-12-01 19:41:51 +00:00
random-4.2.0.json feat(ci): Enable fully offline codegen tests with versioned plugins cont'deleted 2022-10-11 05:16:46 -07:00
random-4.3.1.json Add missing schemas 2022-10-24 16:47:54 -07:00
random-4.11.2.json testdata/schema: Add random 4.11.2 2023-03-03 09:13:55 -08:00
range-1.0.0.json Support range expressions that are of type output 2023-04-26 20:00:32 +02:00
remoteref-1.0.0.json Fix version number in typerefs when marshalling schemas 2023-05-24 08:16:20 +01:00
snowflake-0.66.1.json Fixes python panic when emiting code for index expressions that aren't typechecked 2023-06-09 01:44:09 +02:00
splat-1.0.0.json Fix panic in go program-gen when encountering splat expressions 2023-06-07 13:22:41 +02:00
std-1.0.0.json Only await promise-returning invokes in typescript program-gen 2023-06-02 18:33:18 +02:00
synthetic-1.0.0.json feat(ci): Enable fully offline codegen tests with versioned plugins cont'deleted 2022-10-11 05:16:46 -07:00
tls-4.10.0.json Support returning plain values from methods (#13592) 2023-11-18 06:02:06 +00:00
types.json modify codegen/python to generate valid python code for non-string secrets 2022-12-07 11:36:15 -08:00
using-dashes-1.0.0.json Fix aliasing package names using dashes when schema doesn't include go package info override 2023-06-20 18:11:47 +02:00