Skip to content

Commit

Permalink
Variations is an array
Browse files Browse the repository at this point in the history
  • Loading branch information
theory committed Jul 23, 2024
1 parent 5864788 commit 9e29bf7
Showing 1 changed file with 51 additions and 26 deletions.
77 changes: 51 additions & 26 deletions schema/v2/variations.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,39 +3,64 @@
"$id": "https://pgxn.org/meta/v2/variations.schema.json",
"title": "Dependency Variations",
"description": "*Variations* describe rule-based dependency variations.",
"type": "object",
"properties": {
"where": {
"description": "Contains the subset of dependencies to identify a variation",
"$ref": "dependencies.schema.json",
"patternProperties": { "^variations$": false }
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"properties": {
"where": {
"description": "Contains the subset of dependencies to identify a variation",
"$ref": "dependencies.schema.json",
"patternProperties": { "^variations$": false }
},
"dependencies": {
"description": "Contains the subset of dependencies required for the `where` property’s configuration.",
"$ref": "dependencies.schema.json",
"patternProperties": { "^variations$": false }
}
},
"dependencies": {
"description": "Contains the subset of dependencies required for the `where` property’s configuration.",
"$ref": "dependencies.schema.json",
"patternProperties": { "^variations$": false }
}
"required": ["where", "dependencies"],
"patternProperties": { "^[xX]_.": { "description": "Custom key" } },
"additionalProperties": false
},
"required": ["where", "dependencies"],
"examples": [
{
"where": { "platforms": ["linux"] },
"dependencies": {
"packages": {
"configure": {
"requires": {
"pkg:generic/libelf": 0,
"pkg:generic/libbsd": 0
[
{
"where": { "platforms": ["linux"] },
"dependencies": {
"packages": {
"configure": {
"requires": {
"pkg:generic/libelf": 0,
"pkg:generic/libbsd": 0
}
}
}
}
}
},
{
"where": { "postgres": { "version": ">= 16.0" } },
"dependencies": {
"postgres": { "version": ">= 16.0", "with": ["zstd"] }
],
[
{
"where": { "postgres": { "version": ">= 16.0" } },
"dependencies": {
"postgres": { "version": ">= 16.0", "with": ["zstd"] }
}
},
{
"where": {
"platforms": ["linux"]
},
"dependencies": {
"packages": {
"run": {
"recommends": {
"pkg:pypi/auto-gptq": 0,
"pkg:pypi/xformers": 0
}
}
}
}
}
}
]
]
}

0 comments on commit 9e29bf7

Please sign in to comment.