-
Notifications
You must be signed in to change notification settings - Fork 162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: Use Museum API instead of Petstore examples #1386
Conversation
|
|
Coverage report
Test suite run success699 tests passing in 100 suites. Report generated by 🧪jest coverage report action from 86eb996 |
6f8826f
to
03e42c8
Compare
b082343
to
13fb555
Compare
### Format | ||
|
||
#### Codeframe (default) | ||
|
||
```bash | ||
redocly bundle pet.yaml store.yaml -o ./bundled --format=codeframe | ||
## equivalent to: redocly bundle pet.yaml store.yaml -o ./bundled | ||
``` | ||
|
||
Note: Errors display in the following format: `file:line:column`. For example, `petstore-with-errors.yaml:16:3`. | ||
|
||
Depending on the terminal emulator you use, it may be possible to directly click this indicator to edit the file in place. | ||
|
||
#### Stylish | ||
|
||
```bash | ||
redocly bundle pet.yaml store.yaml -o ./bundled --format=stylish | ||
``` | ||
|
||
In this format, `bundle` shows the filename, line number, and column where the problem occurred. | ||
|
||
The compressed output omits other contexts and suggestions. | ||
|
||
#### JSON | ||
|
||
{% tabs %} | ||
{% tab label="Command" %} | ||
|
||
```bash | ||
redocly bundle pet.yaml store.yaml -o ./bundled --format=json | ||
``` | ||
|
||
{% /tab %} | ||
{% tab label="Output" %} | ||
|
||
```bash | ||
bundling pet.yaml... | ||
{ | ||
"totals": { | ||
"errors": 0, | ||
"warnings": 0, | ||
"ignored": 0 | ||
}, | ||
"version": "1.0.0-beta.54", | ||
"problems": [] | ||
}📦 Created a bundle for pet.yaml at bundled/pet.yaml 28ms. | ||
bundling store.yaml... | ||
{ | ||
"totals": { | ||
"errors": 0, | ||
"warnings": 0, | ||
"ignored": 0 | ||
}, | ||
"version": "1.0.0-beta.54", | ||
"problems": [] | ||
}📦 Created a bundle for store.yaml at bundled/store.yaml 15ms. | ||
``` | ||
|
||
{% /tab %} | ||
{% /tabs %} | ||
|
||
In this format, `bundle` shows the result of bundling (including the number of errors and warnings and their descriptions) in JSON-like output. | ||
|
||
#### Checkstyle | ||
|
||
{% tabs %} | ||
{% tab label="Command" %} | ||
|
||
```bash | ||
redocly bundle pet.yaml -o ./bundled --lint --format=checkstyle | ||
``` | ||
|
||
{% /tab %} | ||
{% tab label="Output" %} | ||
|
||
```bash | ||
bundling pet.yaml... | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<checkstyle version="4.3"> | ||
<file name="pet.yaml"> | ||
</file> | ||
</checkstyle> | ||
📦 Created a bundle for pet.yaml at bundled/pet.yaml 35ms. | ||
``` | ||
|
||
{% /tab %} | ||
{% /tabs %} | ||
In this format, `bundle` uses the [Checkstyle](https://checkstyle.org/) XML report format. | ||
Due to the limitations of this format, the output _only_ includes the filename, line, column, severity, | ||
and rule ID (in the `source` attribute). | ||
All other information is omitted. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to confirm, did we remove these formats from the CLI?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's an open ticket to drop linting from the bundle command, which is what this is the output for. So I figured we'd be dropping this section soon.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 on the preference for code blocks because it's easier to copy. But it looks like we created an issue to update the code formatting, so this one LGTM.
What/Why/How?
Fixes #1374
Reference
https://github.com/Redocly/museum-openapi-example/
Check yourself
Security