Skip to content

Commit

Permalink
Update schemas (#2250)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssbarnea authored Jul 27, 2022
1 parent 4ea4460 commit 39914da
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 16 deletions.
1 change: 1 addition & 0 deletions src/ansiblelint/schemas/galaxy.json
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,7 @@
"type": "array"
},
"version": {
"markdownDescription": "Version must use [SemVer](https://semver.org/) format, which is more restrictive than [PEP-440](https://peps.python.org/pep-0440/). For example `1.0.0-rc1` is valid but `1.0.0rc` is not.",
"minLength": 5,
"pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$",
"title": "Version",
Expand Down
33 changes: 31 additions & 2 deletions src/ansiblelint/schemas/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@
"type": "object"
},
"DependencyModel": {
"additionalProperties": false,
"additionalProperties": true,
"anyOf": [
{
"required": ["role"]
Expand All @@ -211,7 +211,7 @@
"required": ["name"]
}
],
"markdownDescription": "See https://docs.ansible.com/ansible/latest/user_guide/playbooks_reuse_roles.html#role-dependencies and https://github.com/ansible/ansible/blob/devel/lib/ansible/playbook/role/metadata.py#L79",
"markdownDescription": "See https://docs.ansible.com/ansible/latest/user_guide/playbooks_reuse_roles.html#role-dependencies and https://github.com/ansible/ansible/blob/devel/lib/ansible/playbook/role/metadata.py#L79\n\nOther keys are treated as role [parameters](https://docs.ansible.com/ansible/latest/user_guide/playbooks_reuse_roles.html#passing-different-parameters).",
"properties": {
"become": {
"title": "Become",
Expand Down Expand Up @@ -854,6 +854,35 @@
"title": "OpenWRTPlatformModel",
"type": "object"
},
"OracleLinuxPlatformModel": {
"properties": {
"name": {
"const": "OracleLinux",
"title": "Name",
"type": "string"
},
"versions": {
"default": "all",
"items": {
"enum": [
"8.0",
"8.1",
"8.2",
"8.3",
"8.4",
"8.5",
"8.6",
"9.0",
"all"
],
"type": "string"
},
"type": "array"
}
},
"title": "OracleLinuxPlatformModel",
"type": "object"
},
"PAN-OSPlatformModel": {
"properties": {
"name": {
Expand Down
31 changes: 17 additions & 14 deletions src/ansiblelint/schemas/playbook.json
Original file line number Diff line number Diff line change
Expand Up @@ -473,23 +473,11 @@
"serial": {
"anyOf": [
{
"type": "integer"
},
{
"pattern": "^\\d+\\.?\\d*%?$",
"type": "string"
"$ref": "#/$defs/templated-integer-or-percent"
},
{
"items": {
"anyOf": [
{
"type": "integer"
},
{
"pattern": "^\\d+\\.?\\d*%?$",
"type": "string"
}
]
"$ref": "#/$defs/templated-integer-or-percent"
},
"type": "array"
}
Expand Down Expand Up @@ -986,6 +974,21 @@
}
]
},
"templated-integer-or-percent": {
"oneOf": [
{
"type": "integer"
},
{
"pattern": "^\\d+\\.?\\d*%?$",
"type": "string"
},
{
"$ref": "#/$defs/full-jinja",
"type": "string"
}
]
},
"templated-object": {
"oneOf": [
{
Expand Down

0 comments on commit 39914da

Please sign in to comment.