diff --git a/f/ansible-meta.json b/f/ansible-meta.json index 156cf244..8644b044 100644 --- a/f/ansible-meta.json +++ b/f/ansible-meta.json @@ -1,7 +1,40 @@ { "$id": "https://raw.githubusercontent.com/ansible/schemas/main/f/ansible-meta.json", "$schema": "http://json-schema.org/draft-07/schema", - "additionalProperties": false, + "anyOf": [ + { + "type": "null" + }, + { + "additionalProperties": false, + "properties": { + "allow_duplicates": { + "title": "Allow Duplicates", + "type": "boolean" + }, + "collections": { + "items": { + "markdownDescription": "See [Using collections in roles](https://docs.ansible.com/ansible/latest/user_guide/collections_using.html#using-collections-in-roles) and [collection naming conventions](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_in_groups.html#naming-conventions)", + "pattern": "^[a-z_]+\\.[a-z_]+$", + "type": "string" + }, + "type": "array" + }, + "dependencies": { + "items": { + "$ref": "#/definitions/DependencyModel" + }, + "title": "Dependencies", + "type": "array" + }, + "galaxy_info": { + "$ref": "#/definitions/GalaxyInfoModel" + } + }, + "required": ["galaxy_info"], + "type": "object" + } + ], "definitions": { "AIXPlatformModel": { "properties": { @@ -1183,31 +1216,5 @@ } }, "examples": ["meta/main.yml"], - "properties": { - "allow_duplicates": { - "title": "Allow Duplicates", - "type": "boolean" - }, - "collections": { - "items": { - "markdownDescription": "See [Using collections in roles](https://docs.ansible.com/ansible/latest/user_guide/collections_using.html#using-collections-in-roles) and [collection naming conventions](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_in_groups.html#naming-conventions)", - "pattern": "^[a-z_]+\\.[a-z_]+$", - "type": "string" - }, - "type": "array" - }, - "dependencies": { - "items": { - "$ref": "#/definitions/DependencyModel" - }, - "title": "Dependencies", - "type": "array" - }, - "galaxy_info": { - "$ref": "#/definitions/GalaxyInfoModel" - } - }, - "required": ["galaxy_info"], - "title": "Ansible Meta Schema", - "type": "object" + "title": "Ansible Meta Schema" } diff --git a/test/roles/empty-meta/meta/main.yml b/test/roles/empty-meta/meta/main.yml new file mode 100644 index 00000000..27d5d2ac --- /dev/null +++ b/test/roles/empty-meta/meta/main.yml @@ -0,0 +1 @@ +# this should be considered valid