From 6d99711ed887f1bf28cbd28f2b0d15c3e78fae66 Mon Sep 17 00:00:00 2001 From: Itamar Turner-Trauring Date: Wed, 6 Oct 2021 14:29:47 -0400 Subject: [PATCH 1/2] Make some fixes needed to make commands work 1. --json and --cbor no longer seem to exist (at least when trying with Docker image, perhaps that's out of date). 2. Mounting to `/cddl` doesn't work, I suspect that's where the binary gets stored by the Dockerfile? So switched to `/data`. --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 688b03ec..8294f160 100644 --- a/README.md +++ b/README.md @@ -76,13 +76,13 @@ docker run -it --rm -v $PWD:/cddl -w /cddl ghcr.io/anweiss/cddl-cli: he You can validate JSON documents: ```sh -cddl validate --cddl --json [FILE.json]... +cddl validate --cddl [FILE.json]... ``` You can validate CBOR files: ```sh -cddl validate --cddl --cbor [FILE.cbor]... +cddl validate --cddl [FILE.cbor]... ``` It also supports validating files from STDIN (if it detects the input as valid UTF-8, it will attempt to validate the input as JSON, otherwise it will treat it as CBOR): @@ -95,7 +95,7 @@ cat reputon.cbor | cddl validate --cddl reputon.cddl --stdin or using Docker: ```sh -docker run -i --rm -v $PWD:/cddl -w /cddl ghcr.io/anweiss/cddl-cli:latest validate --cddl reputon.cddl --stdin < reputon.json +docker run -i --rm -v $PWD:/data -w /data ghcr.io/anweiss/cddl-cli:latest validate --cddl reputon.cddl --stdin < reputon.json ``` ## Website From 9e819e7d21d528a31bbe942e87dc95ad2bc313c3 Mon Sep 17 00:00:00 2001 From: Itamar Turner-Trauring Date: Tue, 26 Oct 2021 10:32:54 -0400 Subject: [PATCH 2/2] Address review comments --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8294f160..c9db7d22 100644 --- a/README.md +++ b/README.md @@ -76,13 +76,13 @@ docker run -it --rm -v $PWD:/cddl -w /cddl ghcr.io/anweiss/cddl-cli: he You can validate JSON documents: ```sh -cddl validate --cddl [FILE.json]... +cddl validate --cddl --json [FILE.json]... ``` You can validate CBOR files: ```sh -cddl validate --cddl [FILE.cbor]... +cddl validate --cddl --cbor [FILE.cbor]... ``` It also supports validating files from STDIN (if it detects the input as valid UTF-8, it will attempt to validate the input as JSON, otherwise it will treat it as CBOR): @@ -95,7 +95,7 @@ cat reputon.cbor | cddl validate --cddl reputon.cddl --stdin or using Docker: ```sh -docker run -i --rm -v $PWD:/data -w /data ghcr.io/anweiss/cddl-cli:latest validate --cddl reputon.cddl --stdin < reputon.json +docker run -i --rm -v $PWD:/data -w /data ghcr.io/anweiss/cddl-cli:0.9.0-beta.0 validate --cddl reputon.cddl --stdin < reputon.json ``` ## Website