diff --git a/README.md b/README.md index 3b12f673..b0900fba 100644 --- a/README.md +++ b/README.md @@ -554,7 +554,7 @@ models: ``` Usage: datacontract export [OPTIONS] [LOCATION] - Convert data contract to a specific format. console.prints to stdout. + Convert data contract to a specific format. Prints to stdout or to the specified output file. ╭─ Arguments ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │ location [LOCATION] The location (url or path) of the data contract yaml. [default: datacontract.yaml] │ @@ -732,7 +732,7 @@ Available import options: Usage: datacontract catalog [OPTIONS] - Create a html catalog of data contracts. + Create an html catalog of data contracts. ╭─ Options ────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │ --files TEXT Glob pattern for the data contract files to include in the catalog. [default: *.yaml] │ diff --git a/datacontract/cli.py b/datacontract/cli.py index 6233508f..09716f46 100644 --- a/datacontract/cli.py +++ b/datacontract/cli.py @@ -3,17 +3,16 @@ from pathlib import Path from typing import Iterable, Optional - import typer from click import Context - from rich import box from rich.console import Console from rich.table import Table from typer.core import TyperGroup from typing_extensions import Annotated -from datacontract.catalog.catalog import create_index_html, create_data_contract_html +from datacontract.catalog.catalog import create_index_html, \ + create_data_contract_html from datacontract.data_contract import DataContract from datacontract.init.download_datacontract_file import \ download_datacontract_file, FileExistsException @@ -225,7 +224,7 @@ def catalog( output: Annotated[Optional[str], typer.Option(help="Output directory for the catalog html files.")] = "catalog/", ): """ - Create a html catalog of data contracts. + Create an html catalog of data contracts. """ path = Path(output) path.mkdir(parents=True, exist_ok=True) diff --git a/datacontract/templates/datacontract.html b/datacontract/templates/datacontract.html index 120f7780..3cc86384 100644 --- a/datacontract/templates/datacontract.html +++ b/datacontract/templates/datacontract.html @@ -19,7 +19,7 @@
@@ -54,15 +54,10 @@+ {{contract.spec.info.description}} +
+The data contract catalog is empty.
++ Learn more on data contracts on http://datacontract.com. +
+ {% endif %} -Title | -ID | -Version | -Owner | -
---|---|---|---|
- {{contract.spec.info.title}} - | -- {{contract.spec.id}} - | -- {{contract.spec.info.version}} - | -- {{contract.spec.info.owner}} - | -