Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/pip/ansible-compat-2.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ssbarnea committed Sep 30, 2022
2 parents dfbd149 + be175c5 commit 3f81aa6
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 551 deletions.
1 change: 1 addition & 0 deletions src/molecule/data/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Module containing molecule data files."""
19 changes: 13 additions & 6 deletions src/molecule/data/molecule.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,8 @@
"type": "object"
},
"MoleculeDependencyModel": {
"additionalProperties": false,
"unevaluatedProperties": false,
"properties": {
"command": {
"title": "Command",
"type": ["string", "null"]
},
"enabled": {
"default": true,
"title": "Enabled",
Expand All @@ -38,6 +34,17 @@
"type": "object"
}
},
"if": {
"properties": { "name": { "const": "galaxy" } }
},
"then": {
"properties": {
"command": { "title": "Command", "type": ["string", "null"] }
}
},
"else": {
"properties": { "command": { "title": "Command", "type": "string" } }
},
"required": ["name"],
"title": "MoleculeDependencyModel",
"type": "object"
Expand Down Expand Up @@ -509,7 +516,7 @@
"type": "object"
}
},
"$id": "https://raw.githubusercontent.com/ansible/schemas/main/f/molecule.json",
"$id": "https://raw.githubusercontent.com/ansible-community/molecule/main/src/molecule/data/molecule.json",
"$schema": "http://json-schema.org/draft-07/schema",
"additionalProperties": false,
"examples": ["molecule/*/molecule.yml"],
Expand Down
4 changes: 2 additions & 2 deletions src/molecule/model/schema_v3.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@
from jsonschema import validate as jsonschema_validate
from jsonschema.exceptions import ValidationError

from molecule.schemas import __file__ as schemas_module
from molecule.data import __file__ as data_module


def validate(c):
"""Perform schema validation."""
result = []
schema_file = os.path.dirname(schemas_module) + "/molecule.json"
schema_file = os.path.dirname(data_module) + "/molecule.json"
with open(schema_file, encoding="utf-8") as f:
schema = json.load(f)

Expand Down
1 change: 0 additions & 1 deletion src/molecule/schemas/__init__.py

This file was deleted.

0 comments on commit 3f81aa6

Please sign in to comment.