Skip to content

Commit 534c47d

Browse files
committed
updating readme
1 parent cfba599 commit 534c47d

File tree

1 file changed

+34
-4
lines changed

1 file changed

+34
-4
lines changed

README.md

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,15 @@ This is useful when you are working in a development team, and want to compare c
2020
The Content Type's Display Name, UID, Last Modified Date, and Version number is shown. The list can be ordered by `title` or `modified` date. When developing against Contentstack, Content Type UIDs are needed when requesting data.
2121

2222
1. The `csdx content-type:details` command provides useful information, such as:
23-
* Field UID and Data Types
24-
* Referenced Content Types
25-
* Options such as required, multiple, and unique
26-
* The full path to a field, useful when using the [include reference endpoint](https://www.contentstack.com/docs/developers/apis/content-delivery-api/#include-reference) or filtering operations, such as the [equality endpoint](https://www.contentstack.com/docs/developers/apis/content-delivery-api/#equals-operator).
23+
* Field UID and Data Types
24+
* Referenced Content Types
25+
* Options such as required, multiple, and unique
26+
* The full path to a field, useful when using the [include reference endpoint](https://www.contentstack.com/docs/developers/apis/content-delivery-api/#include-reference) or filtering operations, such as the [equality endpoint](https://www.contentstack.com/docs/developers/apis/content-delivery-api/#equals-operator).
27+
28+
1. The `csdx content-type:diagram` command creates a visual representation of a Stack's content model.
29+
* The ouput format can be either `svg` or `dot`.
30+
* The diagram's orientation can be changed, using the `-d landscape|portrait` flag.
31+
* The layout engine is [GraphViz](https://graphviz.org/). You can export the generated DOT Language, using the `-t dot` flag.
2732

2833
## How to install this plugin
2934

@@ -53,6 +58,7 @@ $ csdx content-type:details -a "management token" -c "content type" --no-path
5358
* [`csdx content-type:compare`](#csdx-content-typecompare)
5459
* [`csdx content-type:compare-remote`](#csdx-content-typecompare-remote)
5560
* [`csdx content-type:details`](#csdx-content-typedetails)
61+
* [`csdx content-type:diagram`](#csdx-content-typediagram)
5662
* [`csdx content-type:list`](#csdx-content-typelist)
5763

5864
## `csdx content-type:audit`
@@ -139,6 +145,30 @@ EXAMPLES
139145

140146
_See code: [src/commands/content-type/details.ts](https://github.com/Contentstack-Solutions/contentstack-cli-content-type/blob/v1.0.4/src/commands/content-type/details.ts)_
141147

148+
## `csdx content-type:diagram`
149+
150+
create a visual diagram of a Stack's Content Types
151+
152+
```
153+
USAGE
154+
$ csdx content-type:diagram
155+
156+
OPTIONS
157+
-a, --token-alias=token-alias management token alias
158+
-d, --direction=portrait|landscape (required) [default: portrait] graph orientation
159+
-o, --output=output (required) full path to output
160+
-s, --stack=stack Stack UID
161+
-t, --type=svg|dot (required) [default: svg] graph output file type
162+
163+
EXAMPLES
164+
$ csdx content-type:diagram -s "xxxxxxxxxxxxxxxxxxx" -o "./content-model.svg"
165+
$ csdx content-type:diagram -a "management token" -o "./content-model.svg"
166+
$ csdx content-type:diagram -a "management token" -o "./content-model.svg" -d "landscape"
167+
$ csdx content-type:diagram -a "management token" -o "./content-model.dot" -t "dot"
168+
```
169+
170+
_See code: [src/commands/content-type/diagram.ts](https://github.com/Contentstack-Solutions/contentstack-cli-content-type/blob/v1.0.4/src/commands/content-type/diagram.ts)_
171+
142172
## `csdx content-type:list`
143173

144174
list all Content Types in a Stack

0 commit comments

Comments
 (0)