Open AndrewO opened 6 months ago
Hmm, this seems like an error in the schema.json file
items
object, it also works "development": {
"id": "#/definitions/development",
"type": ["object", "null"],
"properties": {
"watch": {
"type": "array",
"items": {
"type": "object",
"required": ["path", "action"],
"properties": {
"ignore": {"type": "array", "items": {"type": "string"}},
"path": {"type": "string"},
"action": {"type": "string", "enum": ["rebuild", "sync", "sync+restart"]},
"target": {"type": "string"}
},
"additionalProperties": false,
"patternProperties": {"^x-": {}}
}
}
}
},
Doing so matches another type on line 577
"generic_resources": {
"id": "#/definitions/generic_resources",
"type": "array",
"items": {
"type": "object",
"properties": {
"discrete_resource_spec": {
"type": "object",
"properties": {
"kind": {"type": "string"},
"value": {"type": "number"}
},
"additionalProperties": false,
"patternProperties": {"^x-": {}}
}
},
"additionalProperties": false,
"patternProperties": {"^x-": {}}
}
},
So maybe this is a win for CUE?
I'd ask on the source repository, show them this issue, and see what they say.
Following the Convert JSON Schema with the current compose schema (as of this commit),
cue import
raises the following error:The offending JSON Schema section is below, specifically the
"patternProperties": {"^x-": {}}
.Removing that line (and the comma on the line above) worked around the issue. I'm not sure what a more correct fix would be.