From 5d24a2998b412159295feca40421b8b11cf02274 Mon Sep 17 00:00:00 2001 From: zepatrik Date: Tue, 13 Oct 2020 11:24:44 +0200 Subject: [PATCH] docs: added sidebar cli label `clidoc.Generate` expects to find an entry under `sidebar.json/Reference` that contains the substring "CLI" in it's label. Because that was missing, a new entry was appended on every regeneration of the file. --- docs/docs/cli/kratos-identities-delete.md | 11 ++----- docs/docs/cli/kratos-identities-get.md | 11 ++----- docs/docs/cli/kratos-identities-import.md | 13 +++----- docs/sidebar.json | 38 ++--------------------- 4 files changed, 13 insertions(+), 60 deletions(-) diff --git a/docs/docs/cli/kratos-identities-delete.md b/docs/docs/cli/kratos-identities-delete.md index 1d6fdc69e17..804e77d7df0 100644 --- a/docs/docs/cli/kratos-identities-delete.md +++ b/docs/docs/cli/kratos-identities-delete.md @@ -17,6 +17,9 @@ Delete identities by ID ### Synopsis This command deletes one or more identities by ID. To delete an identity by some selector, e.g. the recovery email address, use the list command in combination with jq. +Example: delete the identity with the recovery email address "foo@bar.com": + +kratos identities delete \$(kratos identities list --format json | jq -r 'map(select(.recovery_addresses[].value == "foo@bar.com")) | .[].id') We have to admit, this is not easy if you don't speak jq fluently. What about opening an issue and telling us what predefined selectors you want to have? https://github.com/ory/kratos/issues/new/choose @@ -24,14 +27,6 @@ We have to admit, this is not easy if you don't speak jq fluently. What about op kratos identities delete [flags] ``` -### Examples - -``` -To delete the identity with the recovery email address "foo@bar.com", run: - - $ kratos identities delete $(kratos identities list --format json | jq -r 'map(select(.recovery_addresses[].value == "foo@bar.com")) | .[].id') -``` - ### Options ``` diff --git a/docs/docs/cli/kratos-identities-get.md b/docs/docs/cli/kratos-identities-get.md index 2ddceeefc4e..3a4322bdd8a 100644 --- a/docs/docs/cli/kratos-identities-get.md +++ b/docs/docs/cli/kratos-identities-get.md @@ -17,6 +17,9 @@ Get one or more identities by ID ### Synopsis This command gets all the details about an identity. To get an identity by some selector, e.g. the recovery email address, use the list command in combination with jq. +Example: get the identities with the recovery email address at the domain "ory.sh": + +kratos identities get \$(kratos identities list --format json | jq -r 'map(select(.recovery_addresses[].value | endswith("@ory.sh"))) | .[].id') We have to admit, this is not easy if you don't speak jq fluently. What about opening an issue and telling us what predefined selectors you want to have? https://github.com/ory/kratos/issues/new/choose @@ -24,14 +27,6 @@ We have to admit, this is not easy if you don't speak jq fluently. What about op kratos identities get [flags] ``` -### Examples - -``` -To get the identities with the recovery email address at the domain "ory.sh", run: - - $ kratos identities get $(kratos identities list --format json | jq -r 'map(select(.recovery_addresses[].value | endswith("@ory.sh"))) | .[].id') -``` - ### Options ``` diff --git a/docs/docs/cli/kratos-identities-import.md b/docs/docs/cli/kratos-identities-import.md index 3eb07b898b9..e0d29b0b5d8 100644 --- a/docs/docs/cli/kratos-identities-import.md +++ b/docs/docs/cli/kratos-identities-import.md @@ -16,7 +16,11 @@ Import identities from files or STD_IN ### Synopsis -Import identities from files or STD_IN. +Import identities from files or STD_IN: + + kratos identities import file.json + + cat file.json | kratos identities import Files can contain only a single or an array of identities. The validity of files can be tested beforehand using "... identities validate". @@ -26,13 +30,6 @@ WARNING: Importing credentials is not yet supported. kratos identities import [flags] ``` -### Examples - -``` -$ kratos identities import file.json -$ cat file.json | kratos identities import -``` - ### Options ``` diff --git a/docs/sidebar.json b/docs/sidebar.json index 37fe1608ddb..794acfa6739 100644 --- a/docs/sidebar.json +++ b/docs/sidebar.json @@ -52,42 +52,8 @@ "reference/html-forms", "reference/api", { - "items": [ - "cli/kratos", - "cli/kratos-identities", - "cli/kratos-identities-delete", - "cli/kratos-identities-get", - "cli/kratos-identities-import", - "cli/kratos-identities-list", - "cli/kratos-identities-patch", - "cli/kratos-identities-validate", - "cli/kratos-jsonnet", - "cli/kratos-jsonnet-format", - "cli/kratos-jsonnet-lint", - "cli/kratos-remote", - "cli/kratos-remote-status", - "cli/kratos-remote-version" - ] - }, - { - "items": [ - "cli/kratos", - "cli/kratos-identities", - "cli/kratos-identities-delete", - "cli/kratos-identities-get", - "cli/kratos-identities-import", - "cli/kratos-identities-list", - "cli/kratos-identities-patch", - "cli/kratos-identities-validate", - "cli/kratos-jsonnet", - "cli/kratos-jsonnet-format", - "cli/kratos-jsonnet-lint", - "cli/kratos-remote", - "cli/kratos-remote-status", - "cli/kratos-remote-version" - ] - }, - { + "type": "category", + "label": "Command Line Interface (CLI)", "items": [ "cli/kratos", "cli/kratos-identities",