Skip to content

Commit

Permalink
Add generated configuration schema file (#1181)
Browse files Browse the repository at this point in the history
* Add generated configuration schema file

* Update dictionary.txt

* Update ansible-navigator.json

Co-authored-by: Bradley A. Thornton <bthornto@redhat.com>
  • Loading branch information
ssbarnea and cidrblock committed Apr 7, 2022
1 parent 0922b29 commit a87322a
Show file tree
Hide file tree
Showing 6 changed files with 510 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .config/dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ lintables
myproject
workdir
isatty
netconf
httpapi
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ share/ansible_navigator/themes/**/*.json
src/ansible_navigator/package_data/help.md
src/ansible_navigator/package_data/welcome.md

# generated
src/ansible_navigator/data/ansible-navigator.json

# WIP
docs/changelog-fragments.d/README.md
CHANGELOG.md
Expand Down
2 changes: 2 additions & 0 deletions src/ansible_navigator/configuration_subsystem/transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ def to_schema(settings: ApplicationConfiguration) -> Dict[str, Any]:
version = settings.application_version.value
else:
version = settings.application_version
# get only major.minor version info for the schema:
version = ".".join(version.split(".")[:2])

partial_schema["version"] = version
partial_schema["title"] = partial_schema["title"].format(version=version)
Expand Down
Empty file.
Loading

0 comments on commit a87322a

Please sign in to comment.