Skip to content

Commit

Permalink
Split out postgres schema
Browse files Browse the repository at this point in the history
  • Loading branch information
theory committed Jul 22, 2024
1 parent b68838d commit 3e66079
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 23 deletions.
24 changes: 1 addition & 23 deletions schema/v2/dependencies.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,29 +13,7 @@
"$ref": "platform.schema.json"
}
},
"postgres": {
"description": "Describes the versions of PostgreSQL supported by the package provided by the distribution.",
"type": "object",
"minProperties": 1,
"additionalProperties": false,
"properties": {
"version": {
"description": "A version range identifying the supported versions of PostgreSQL.",
"$ref": "version_range.schema.json"
},
"with": {
"description": "The features that are required to be compiled into PostgreSQL. Each corresponds to the appropriate `--with` configure flag. Omit if the package requires no features.",
"type": "array",
"items": { "$ref": "term.schema.json" }
}
},
"requires": ["version"],
"patternProperties": {
"^[xX]_.": {
"description": "Custom key"
}
}
},
"postgres": { "$ref": "postgres.schema.json" },
"pipeline": {
"description": "The build pipeline required to configure, build, test, and install the package provided by the distribution.",
"enum": [
Expand Down
33 changes: 33 additions & 0 deletions schema/v2/postgres.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://pgxn.org/meta/v2/postgres.schema.json",
"title": "Postgres",
"description": "Describes the versions of PostgreSQL supported by the package provided by the distribution.",
"type": "object",
"minProperties": 1,
"additionalProperties": false,
"properties": {
"version": {
"description": "A version range identifying the supported versions of PostgreSQL.",
"$ref": "version_range.schema.json"
},
"with": {
"description": "The features that are required to be compiled into PostgreSQL. Each corresponds to the appropriate `--with` configure flag. Omit if the package requires no features.",
"type": "array",
"items": { "$ref": "term.schema.json" }
}
},
"requires": ["version"],
"patternProperties": {
"^[xX]_.": {
"description": "Custom key"
}
},
"examples": [
{ "version": "14.0" },
{
"version": ">= 12.0, < 17.0",
"with": ["xml", "uuid", "perl"]
}
]
}

0 comments on commit 3e66079

Please sign in to comment.