You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already)
Issue details
As I am building an AWS codegen for a new Pulumi language I encountered a peculiarity that's not obvious.
curl https://raw.githubusercontent.com/pulumi/pulumi-aws/v4.37.3/provider/cmd/pulumi-resource-aws/schema.json -o ~/schemas/pulumi-aws-v4.37.3.json
jq '.resources["aws:iam/instanceProfile:InstanceProfile"].stateInputs.properties.role' ~/schemas/pulumi-aws-v4.37.3.json
{
"type": "string",
"oneOf": [
{
"type": "string"
},
{
"type": "string",
"$ref": "#/types/aws:iam/role:Role"
}
],
"description": "Name of the role to add to the profile.\n"
}
jq '.types["aws:iam/role:Role"]' ~/schemas/pulumi-aws-v4.37.3.json
null
jq '.resources["aws:iam/role:Role"].properties.uniqueId' ~/schemas/pulumi-aws-v4.37.3.json
{
"type": "string",
"description": "Stable and unique string identifying the role.\n"
}
You may notice that the "$ref" in the example does not have a corresponding entry in the .types; it does have a corresponding entry in .resources though. I wonder if this is a mistake in the schema - should we catch these by the schema checker? Or something meaningful is intended here?
Also, if the reference was not dangling but the type was defined, I'm wondering what the form that uses both "type" and "$ref" signify. That seemed malformed and I could not find docs about this.
OK I think this may be something slightly undocumented referred to as "relaxed enums". The form is relaxed enum form. Still I think the dangling ref is an error.
Hello!
Issue details
As I am building an AWS codegen for a new Pulumi language I encountered a peculiarity that's not obvious.
You may notice that the "$ref" in the example does not have a corresponding entry in the .types; it does have a corresponding entry in .resources though. I wonder if this is a mistake in the schema - should we catch these by the schema checker? Or something meaningful is intended here?
Also, if the reference was not dangling but the type was defined, I'm wondering what the form that uses both "type" and "$ref" signify. That seemed malformed and I could not find docs about this.
The C# codegen simply deals with this as Input which is also what I can do, but it's confusing.
Steps to reproduce
Expected:
Actual:
The text was updated successfully, but these errors were encountered: