File tree Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ $ infrahubctl object [OPTIONS] COMMAND [ARGS]...
1717** Commands** :
1818
1919* ` load ` : Load one or multiple objects files into...
20+ * ` validate ` : Validate one or multiple objects files.
2021
2122## ` infrahubctl object load `
2223
@@ -38,3 +39,24 @@ $ infrahubctl object load [OPTIONS] PATHS...
3839* ` --branch TEXT ` : Branch on which to load the objects.
3940* ` --config-file TEXT ` : [ env var: INFRAHUBCTL_CONFIG; default: infrahubctl.toml]
4041* ` --help ` : Show this message and exit.
42+
43+ ## ` infrahubctl object validate `
44+
45+ Validate one or multiple objects files.
46+
47+ ** Usage** :
48+
49+ ``` console
50+ $ infrahubctl object validate [OPTIONS] PATHS...
51+ ```
52+
53+ ** Arguments** :
54+
55+ * ` PATHS... ` : [ required]
56+
57+ ** Options** :
58+
59+ * ` --debug / --no-debug ` : [ default: no-debug]
60+ * ` --branch TEXT ` : Branch on which to validate the objects.
61+ * ` --config-file TEXT ` : [ env var: INFRAHUBCTL_CONFIG; default: infrahubctl.toml]
62+ * ` --help ` : Show this message and exit.
Original file line number Diff line number Diff line change @@ -22,14 +22,23 @@ def _generate_infrahubctl_documentation(context: Context) -> None:
2222
2323 output_dir = DOCUMENTATION_DIRECTORY / "docs" / "infrahubctl"
2424 output_dir .mkdir (parents = True , exist_ok = True )
25+
26+ # Delete any existing infrahubctl- files in output dir
27+ for file in output_dir .glob ("infrahubctl-*" ):
28+ file .unlink ()
29+
2530 print (" - Generate infrahubctl CLI documentation" )
2631 for cmd in app .registered_commands :
32+ if cmd .hidden :
33+ continue
2734 exec_cmd = f'poetry run typer --func { cmd .name } infrahub_sdk.ctl.cli_commands utils docs --name "infrahubctl { cmd .name } "'
2835 exec_cmd += f" --output docs/docs/infrahubctl/infrahubctl-{ cmd .name } .mdx"
2936 with context .cd (MAIN_DIRECTORY_PATH ):
3037 context .run (exec_cmd )
3138
3239 for cmd in app .registered_groups :
40+ if cmd .hidden :
41+ continue
3342 exec_cmd = f"poetry run typer infrahub_sdk.ctl.{ cmd .name } utils docs"
3443 exec_cmd += f' --name "infrahubctl { cmd .name } " --output docs/docs/infrahubctl/infrahubctl-{ cmd .name } .mdx'
3544 with context .cd (MAIN_DIRECTORY_PATH ):
You can’t perform that action at this time.
0 commit comments