Skip to content

Commit fe0a483

Browse files
authored
docs: clarify the join command behavior (#2421)
1 parent 810ff31 commit fe0a483

2 files changed

Lines changed: 13 additions & 7 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ redocly lint openapi.yaml
9696
```
9797

9898
**Configure the rules** as you wish.
99-
Other API Linters use complicated identifiers like JSONPath, but Redocly makes life easy with simple expressions that understand the OpenAPI structure.
100-
You can either use the [built-in rules](https://redocly.com/docs/cli/rules) to mix-and-match your ideal API guidelines, or break out the tools to build your own.
99+
Other API Linters use complicated identifiers like JSONPath, but Redocly makes life easy with simple expressions that understand the API specification structure.
100+
You can either use the [built-in rules](https://redocly.com/docs/cli/rules) to mix-and-match your ideal API guidelines, or break out the tools to [build your own](https://redocly.com/docs/cli/rules#rule-ideas).
101101

102102
**Format the output** in whatever way you need.
103103
The `stylish` output is as good as it sounds, but if you need JSON, Markdown, Checkstyle and other outputs to integrate with other tools, the `lint` command can output those too.

docs/@v2/commands/join.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,8 @@ x-tagGroups:
108108
Use the [`--without-x-tag-groups`](#avoid-tag-duplication) option to skip the creation and population of `x-tagGroups` in the output file.
109109

110110
{% admonition type="info" %}
111-
If some operations in an input file don't have a tag assigned to them, the `join` command automatically adds the `other` tag to those operations in the output file. The `other` tag is also included in the `x-tagGroups` object.
111+
If some operations in an input file don't have a tag assigned to them, the `join` command automatically adds the `other` tag to those operations in the output file.
112+
The `other` tag is also included in the `x-tagGroups` object.
112113

113114
If any of the input files contain the `x-tagGroups` object, the content of this object is ignored by the `join` command and not included in the output file.
114115

@@ -117,12 +118,16 @@ If you need to adjust the `info.title` field, apply the [info-override decorator
117118

118119
{% /admonition %}
119120

120-
The `servers` object combines the content from all input files, starting with the content from the first file.
121+
The root `servers` object combines only the common content from all input files.
122+
If the servers are different for each input file, the `join` command puts the content inside the `servers` object under the corresponding `paths`.
123+
121124
Commented lines are not included in the output file.
122125

123-
Path names and component names must be unique in all input files, but their content doesn't have to be unique for the `join` command to produce the output file. For each path item object, only the operation ID must be unique.
126+
Path names and component names must be unique in all input files, but their content doesn't have to be unique for the `join` command to produce the output file.
127+
For each path item object, only the operation ID must be unique.
124128

125-
If the `join` command detects any conflicting content while trying to combine the input files, it displays informative messages about the conflicts and exits without creating an output file. To prevent this, use optional parameters to add prefixes to tags and components.
129+
If the `join` command detects any conflicting content while trying to combine the input files, it displays informative messages about the conflicts and exits without creating an output file.
130+
To prevent this, use optional parameters to add prefixes to tags and components.
126131

127132
<pre>
128133
Conflict on tags => all : tickets in files: museum.yaml,exhibition.yaml
@@ -190,7 +195,8 @@ The following is the example output:
190195

191196
### Avoid tag duplication
192197

193-
If you have the same tags in multiple API descriptions, you can avoid tag duplication by using the `without-x-tag-groups` option. In this case, the `x-tagGroups` property is not created in the joined file.
198+
If you have the same tags in multiple API descriptions, you can avoid tag duplication by using the `without-x-tag-groups` option.
199+
In this case, the `x-tagGroups` property is not created in the joined file.
194200

195201
This command sets the `--without-x-tag-groups` option:
196202

0 commit comments

Comments
 (0)