From b956da9e8a3d53d7ef0dbbcbd78af8fa24a92951 Mon Sep 17 00:00:00 2001 From: James Baster Date: Fri, 5 Oct 2018 09:01:39 +0100 Subject: [PATCH] Add short option to --set-additional-properties-false-everywhere https://github.com/OpenDataServices/compile-to-json-schema/issues/5 --- compiletojsonschema/cli/__main__.py | 1 + docs/cli.rst | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/compiletojsonschema/cli/__main__.py b/compiletojsonschema/cli/__main__.py index a91f957..f00b251 100644 --- a/compiletojsonschema/cli/__main__.py +++ b/compiletojsonschema/cli/__main__.py @@ -7,6 +7,7 @@ def main(): parser.add_argument('input_file') parser.add_argument( + "-s", "--set-additional-properties-false-everywhere", action='store_true', help="Set Additional Properties False everywhere? This generates strict schemas that can be used for testing.") diff --git a/docs/cli.rst b/docs/cli.rst index adcfe9a..570061c 100644 --- a/docs/cli.rst +++ b/docs/cli.rst @@ -20,9 +20,10 @@ The output is printed. To save the output to file, simple redirect it: Set additional properties false everywhere ------------------------------------------ -To enable this mode, pass the `--set-additional-properties-false-everywhere` flag. +To enable this mode, pass the `--set-additional-properties-false-everywhere` or `-s` flag. .. code-block:: shell-session + compiletojsonschema -s input.json compiletojsonschema --set-additional-properties-false-everywhere input.json