diff --git a/.travis.yml b/.travis.yml index 1f251e1..2e63f66 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,7 +24,7 @@ env: before_script: - sleep 20 - python tests/load_es_data.py tests/data/ne_110m_populated_places_simple.geojson - - pygeoapi generate_openapi_document -c pygeoapi-config.yml > pygeoapi-openapi.yml + - pygeoapi generate-openapi-document -c pygeoapi-config.yml > pygeoapi-openapi.yml script: - pytest --cov=pygeoapi diff --git a/README.md b/README.md index 4852588..9196068 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ vi local.config.yml # TODO: what is most important to edit? export PYGEOAPI_CONFIG=/path/to/local.config.yml # generate OpenAPI Document -pygeoapi generate_openapi_document -c local.config.yml > openapi.yml +pygeoapi generate-openapi-document -c local.config.yml > openapi.yml export PYGEOAPI_OPENAPI=/path/to/openapi.yml pygeoapi serve ``` @@ -122,4 +122,4 @@ Unit tests are run using pytest on the top project folder: pytest tests ``` -Enviroment variable are set on file `pytest.ini` \ No newline at end of file +Enviroment variable are set on file `pytest.ini` diff --git a/docker/compose/pygeoapi/run_pygeoapi.sh b/docker/compose/pygeoapi/run_pygeoapi.sh index 1cb59ce..962dcad 100755 --- a/docker/compose/pygeoapi/run_pygeoapi.sh +++ b/docker/compose/pygeoapi/run_pygeoapi.sh @@ -4,7 +4,7 @@ set +e echo "Trying to generate openapi.yml" cd /pygeoapi -pygeoapi generate_openapi_document -c local.config.yml > openapi.yml +pygeoapi generate-openapi-document -c local.config.yml > openapi.yml if [ $? -ne 0 ] ; then echo "openapi.yml couldnt be generate ERROR, but carry on" diff --git a/docker/simple/run_pygeoapi.sh b/docker/simple/run_pygeoapi.sh index 1cb59ce..962dcad 100755 --- a/docker/simple/run_pygeoapi.sh +++ b/docker/simple/run_pygeoapi.sh @@ -4,7 +4,7 @@ set +e echo "Trying to generate openapi.yml" cd /pygeoapi -pygeoapi generate_openapi_document -c local.config.yml > openapi.yml +pygeoapi generate-openapi-document -c local.config.yml > openapi.yml if [ $? -ne 0 ] ; then echo "openapi.yml couldnt be generate ERROR, but carry on" diff --git a/pygeoapi/openapi.py b/pygeoapi/openapi.py index 317a961..f635b14 100644 --- a/pygeoapi/openapi.py +++ b/pygeoapi/openapi.py @@ -280,7 +280,7 @@ def get_oas(cfg, version='3.0'): raise RuntimeError('OpenAPI version not supported') -@click.command() +@click.command('generate-openapi-document') @click.pass_context @click.option('--config', '-c', 'config_file', help='configuration file') def generate_openapi_document(ctx, config_file):