summaryrefslogtreecommitdiffstats
path: root/src/ansiblelint/schemas/role-arg-spec.json
diff options
context:
space:
mode:
Diffstat (limited to 'src/ansiblelint/schemas/role-arg-spec.json')
-rw-r--r--src/ansiblelint/schemas/role-arg-spec.json178
1 files changed, 158 insertions, 20 deletions
diff --git a/src/ansiblelint/schemas/role-arg-spec.json b/src/ansiblelint/schemas/role-arg-spec.json
index 433993e..111fbe5 100644
--- a/src/ansiblelint/schemas/role-arg-spec.json
+++ b/src/ansiblelint/schemas/role-arg-spec.json
@@ -1,5 +1,73 @@
{
"$defs": {
+ "attribute": {
+ "additionalProperties": false,
+ "properties": {
+ "description": {
+ "description": "Detailed explanation of what this attribute does. It should be written in full sentences.",
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ }
+ ]
+ },
+ "details": {
+ "description": "Detailed explanation of what this attribute does. It should be written in full sentences.",
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ }
+ ]
+ },
+ "membership": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ }
+ ]
+ },
+ "platform": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ }
+ ]
+ },
+ "support": {
+ "enum": ["full", "partial", "none", "N/A"],
+ "type": "string"
+ },
+ "version_added": {
+ "type": "string"
+ }
+ },
+ "required": ["description", "support"],
+ "title": "Attribute"
+ },
"datatype": {
"enum": [
"str",
@@ -38,6 +106,12 @@
"entry_point": {
"additionalProperties": false,
"properties": {
+ "attributes": {
+ "additionalProperties": {
+ "$ref": "#/$defs/attribute"
+ },
+ "type": "object"
+ },
"author": {
"oneOf": [
{
@@ -64,6 +138,9 @@
}
]
},
+ "examples": {
+ "type": "string"
+ },
"options": {
"additionalProperties": {
"$ref": "#/$defs/option"
@@ -146,30 +223,27 @@
"title": "Entry Point",
"type": "object"
},
+ "full-jinja": {
+ "pattern": "^\\{[\\{%](.|[\r\n])*[\\}%]\\}$",
+ "type": "string"
+ },
"option": {
"additionalProperties": false,
- "aliases": {
- "items": {
+ "markdownDescription": "See [argument-spec](https://docs.ansible.com/ansible/latest/dev_guide/developing_program_flow_modules.html#argument-spec)",
+ "properties": {
+ "apply_defaults": {
"type": "string"
},
- "type": "array"
- },
- "apply_defaults": {
- "type": "string"
- },
- "deprecated_aliases": {
- "items": {
- "$ref": "#/$defs/deprecated_alias"
- },
- "type": "array"
- },
- "markdownDescription": "xxx",
- "options": {
- "$ref": "#/$defs/option"
- },
- "properties": {
"choices": {
- "type": "array"
+ "oneOf": [
+ {
+ "type": "array"
+ },
+ {
+ "$ref": "#/$defs/full-jinja",
+ "type": "string"
+ }
+ ]
},
"default": {
"default": "None"
@@ -213,6 +287,70 @@
"default": false,
"type": "boolean"
},
+ "mutually_exclusive": {
+ "type": "array",
+ "items": {
+ "items": {
+ "type": "string"
+ }
+ }
+ },
+ "required_together": {
+ "type": "array",
+ "items": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ },
+ "required_one_of": {
+ "type": "array",
+ "items": {
+ "items": {
+ "type": "string"
+ }
+ }
+ },
+ "required_if": {
+ "type": "array",
+ "items": {
+ "type": "array",
+ "prefixItems": [
+ {
+ "type": "string"
+ },
+ {},
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "boolean"
+ }
+ ],
+ "minItems": 3,
+ "maxItems": 4
+ }
+ },
+ "required_by": {
+ "type": "object",
+ "additionalProperties": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ ]
+ }
+ },
"type": {
"$ref": "#/$defs/datatype",
"markdownDescription": "See [argument-spec](https://docs.ansible.com/ansible/latest/dev_guide/developing_program_flow_modules.html#argument-spec"
@@ -237,7 +375,7 @@
"$schema": "http://json-schema.org/draft-07/schema",
"additionalProperties": false,
"examples": ["meta/argument_specs.yml"],
- "markdownDescription": "Add entry point, usually `main`.\nSee [role-argument-validation](https://docs.ansible.com/ansible/latest/user_guide/playbooks_reuse_roles.html#role-argument-validation)",
+ "markdownDescription": "See [role-argument-validation](https://docs.ansible.com/ansible/latest/user_guide/playbooks_reuse_roles.html#role-argument-validation)",
"properties": {
"argument_specs": {
"additionalProperties": {