Skip to content

Commit 39914da

Browse files
authored
Update schemas (#2250)
1 parent 4ea4460 commit 39914da

File tree

3 files changed

+49
-16
lines changed

3 files changed

+49
-16
lines changed

src/ansiblelint/schemas/galaxy.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,7 @@
528528
"type": "array"
529529
},
530530
"version": {
531+
"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.",
531532
"minLength": 5,
532533
"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-]+)*))?$",
533534
"title": "Version",

src/ansiblelint/schemas/meta.json

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@
199199
"type": "object"
200200
},
201201
"DependencyModel": {
202-
"additionalProperties": false,
202+
"additionalProperties": true,
203203
"anyOf": [
204204
{
205205
"required": ["role"]
@@ -211,7 +211,7 @@
211211
"required": ["name"]
212212
}
213213
],
214-
"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",
214+
"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).",
215215
"properties": {
216216
"become": {
217217
"title": "Become",
@@ -854,6 +854,35 @@
854854
"title": "OpenWRTPlatformModel",
855855
"type": "object"
856856
},
857+
"OracleLinuxPlatformModel": {
858+
"properties": {
859+
"name": {
860+
"const": "OracleLinux",
861+
"title": "Name",
862+
"type": "string"
863+
},
864+
"versions": {
865+
"default": "all",
866+
"items": {
867+
"enum": [
868+
"8.0",
869+
"8.1",
870+
"8.2",
871+
"8.3",
872+
"8.4",
873+
"8.5",
874+
"8.6",
875+
"9.0",
876+
"all"
877+
],
878+
"type": "string"
879+
},
880+
"type": "array"
881+
}
882+
},
883+
"title": "OracleLinuxPlatformModel",
884+
"type": "object"
885+
},
857886
"PAN-OSPlatformModel": {
858887
"properties": {
859888
"name": {

src/ansiblelint/schemas/playbook.json

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -473,23 +473,11 @@
473473
"serial": {
474474
"anyOf": [
475475
{
476-
"type": "integer"
477-
},
478-
{
479-
"pattern": "^\\d+\\.?\\d*%?$",
480-
"type": "string"
476+
"$ref": "#/$defs/templated-integer-or-percent"
481477
},
482478
{
483479
"items": {
484-
"anyOf": [
485-
{
486-
"type": "integer"
487-
},
488-
{
489-
"pattern": "^\\d+\\.?\\d*%?$",
490-
"type": "string"
491-
}
492-
]
480+
"$ref": "#/$defs/templated-integer-or-percent"
493481
},
494482
"type": "array"
495483
}
@@ -986,6 +974,21 @@
986974
}
987975
]
988976
},
977+
"templated-integer-or-percent": {
978+
"oneOf": [
979+
{
980+
"type": "integer"
981+
},
982+
{
983+
"pattern": "^\\d+\\.?\\d*%?$",
984+
"type": "string"
985+
},
986+
{
987+
"$ref": "#/$defs/full-jinja",
988+
"type": "string"
989+
}
990+
]
991+
},
989992
"templated-object": {
990993
"oneOf": [
991994
{

0 commit comments

Comments
 (0)