Skip to content

Commit

Permalink
docs(version schema): require version or fall back to latest (#863)
Browse files Browse the repository at this point in the history
  • Loading branch information
zepatrik committed Mar 30, 2022
1 parent d64ae29 commit 5306c93
Showing 1 changed file with 45 additions and 10 deletions.
55 changes: 45 additions & 10 deletions .schema/version.schema.json
Expand Up @@ -4,14 +4,30 @@
"title": "All Versions of the ORY Keto Configuration",
"type": "object",
"oneOf": [
{
"allOf": [
{
"properties": {
"version": {
"const": "v0.8.0-alpha.2"
}
},
"required": ["version"]
},
{
"$ref": "https://raw.githubusercontent.com/ory/keto/v0.8.0-alpha.2/.schema/config.schema.json"
}
]
},
{
"allOf": [
{
"properties": {
"version": {
"const": "v0.6.0-alpha.1"
}
}
},
"required": ["version"]
},
{
"$ref": "https://raw.githubusercontent.com/ory/keto/v0.6.0-alpha.1/internal/driver/config/config.schema.json"
Expand All @@ -25,7 +41,8 @@
"version": {
"const": "v0.6.0-alpha.3"
}
}
},
"required": ["version"]
},
{
"$ref": "https://raw.githubusercontent.com/ory/keto/v0.6.0-alpha.3/internal/driver/config/config.schema.json"
Expand All @@ -39,7 +56,8 @@
"version": {
"const": "v0.7.0-alpha.0"
}
}
},
"required": ["version"]
},
{
"$ref": "https://raw.githubusercontent.com/ory/keto/v0.7.0-alpha.0/.schema/config.schema.json"
Expand All @@ -53,7 +71,8 @@
"version": {
"const": "v0.7.0-alpha.1"
}
}
},
"required": ["version"]
},
{
"$ref": "https://raw.githubusercontent.com/ory/keto/v0.7.0-alpha.1/.schema/config.schema.json"
Expand All @@ -67,24 +86,40 @@
"version": {
"const": "v0.8.0-alpha.1"
}
}
},
"required": ["version"]
},
{
"$ref": "https://raw.githubusercontent.com/ory/keto/v0.8.0-alpha.1/.schema/config.schema.json"
}
]
},
{
"description": "This is the fallback to the latest version (the first one in this schema) in case no version is specified.",
"allOf": [
{
"properties": {
"version": {
"const": "v0.8.0-alpha.2"
"oneOf": [
{
"properties": {
"version": {
"type": "string",
"maxLength": 0
}
},
"required": ["version"]
},
{
"not": {
"properties": {
"version": {}
},
"required": ["version"]
}
}
}
]
},
{
"$ref": "https://raw.githubusercontent.com/ory/keto/v0.8.0-alpha.2/.schema/config.schema.json"
"$ref": "#/oneOf/0/allOf/1"
}
]
}
Expand Down

0 comments on commit 5306c93

Please sign in to comment.