Skip to content

Commit

Permalink
add blocknote to generate-docs readme
Browse files Browse the repository at this point in the history
add new flag to generate-docs readme
  • Loading branch information
kgal-pan committed May 28, 2024
1 parent bc69fd3 commit 60409dd
Showing 1 changed file with 27 additions and 20 deletions.
47 changes: 27 additions & 20 deletions demisto_sdk/commands/generate_docs/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
## generate-docs
# `generate-docs`

Generate a README file for an Integration, Script or a Playbook.
Generate a `README.md` file for an Integration, Script or a Playbook.

## Use Cases

**Use-Cases**
This command is used to create a documentation file for Cortex XSOAR content files.

**Arguments**:
## Arguments

* **-i, --input**
Path of the yml file.
Expand Down Expand Up @@ -35,34 +36,40 @@ Path of the old integration version yml file.
Skip generating of breaking changes section.
* **-ngr, --no-graph**
Whether to use the content graph or not.
* **-f, --force**
Whether to force the generation of documentation (rather than update when it exists in version control).

**Notes**

* If `command_permissions` wil not be given, a generic message regarding the need of permissions will be given.
* If no `output` given, the README.md file will be generated in the `input` file repository.
* If no `additionalinfo` is provided for a commonly-used parameter (for example, `API Key`), a matching default value
> [!NOTE]
>
> * If `command_permissions` wil not be given, a generic message regarding the need of permissions will be given.
>
> * If no `output` given, the `README.md` file will be generated in the `input` file repository.
>
> * If no `additionalinfo` is provided for a commonly-used parameter (for example, `API Key`), a matching default value
will be used, see the parameters and defaults in `default_additional_information.json`.
* In order to generate an **incident mirroring** section, make sure that the *isremotesyncin* and/or *isremotesyncout* parameters are set to true in the YML file. In addition, the following configuration parameters (if used) should be named as stated:
* incidents_fetch_query
* Mirroring tags - the available names are 'comment_tag', 'work_notes_tag' and 'file_tag'
* mirror_direction
* close_incident
* close_out - (opposite to close_incident)
* If the Integration/Script/Playbook exists in version control, the version
from the main branch (e.g. `master`) will be used to only render the modified sections (e.g. configuration, command).
>
> In order to generate an **incident mirroring** section, make sure that the `isremotesyncin` and/or `isremotesyncout` parameters are set to `true` in the YML file. In addition, the following configuration parameters (if used) should be named as stated:
>
> * `incidents_fetch_query`
> * Mirroring tags - the available names are `comment_tag`, `work_notes_tag` and `file_tag`
> * `mirror_direction`
> * `close_incident`
> * `close_out` - (opposite to `close_incident`)
>
> * If the Integration/Script/Playbook exists in version control, the version from the main branch (e.g. `master`) will be used to only render the modified sections (e.g. configuration, command) unless the `--force` flag is specified.
### Examples

```bash
demisto-sdk generate-docs -i Packs/MyPack/Integrations/MyInt/MyInt.yml -e Packs/MyPack/Integrations/MyInt/command_example.txt
```

This will generate a documentation for the MyInt integration using the command examples found in the .txt file in the MyInt integration.
This will generate a documentation for the `MyInt` integration using the command examples found in the .txt file in the `MyInt` integration.

```bash
demisto-sdk generate-docs -i Packs/MyPack/Integrations/MyInt/MyInt_v2.yml --old-version Packs/MyPack/Integrations/MyInt/MyInt.yml
```

This will generate a documentation for MyInt_v2 integration including a section about changes compared the MyInt integration.
This will generate a documentation for `MyInt_v2` integration including a section about changes compared the `MyInt` integration.
The command will automatically detect if the given integration is a v2 using the integration's display name and create the changes section.
If no '--old-version' is supplied a prompt will appear asking for the path to the old integration.
If no `--old-version` is supplied a prompt will appear asking for the path to the old integration.

0 comments on commit 60409dd

Please sign in to comment.