Open johnallen3d opened 4 months ago
While working on my pkl GitHub Action module I ran into the same(?) problem. See also https://github.com/apple/pkl/discussions/263#discussioncomment-8642807
Looks like this is because of a recursive reference:
"configuration": {
"oneOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/configuration"
}
},
{
"type": "array",
"items": {
"$ref": "#/definitions/configuration"
}
}
]
},
At the moment, Pkl's typealiases cannot be cyclic. Ideally, this turns into:
typealias Configuration = String|Boolean|Mapping<String, Configuration>|Listing<Configuration>
Side note: this means that arbitrarily nested values are accepted Configuration
values, e.g. [[[[[[[1]]]]]]]
.
I'm trying to use the latest version of
org.json_schema.contrib
to generate a Pkl template from the GitHub Workflow Json Schema.When I execute:
I see the following error report:
I'm not quite fluent enough with Pkl to understand where the error is occurring but I thought I'd share in case others are running into this.