Skip to content
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

Merged
merged 8 commits into from
Feb 12, 2024
Merged

Conversation

lornajane
Copy link
Collaborator

What/Why/How?

Fixes #1374

Reference

https://github.com/Redocly/museum-openapi-example/

Check yourself

  • Code is linted
  • Tested with redoc/reference-docs/workflows (internal)
  • All new/updated code is covered with tests

Security

  • Security impact of change has been considered
  • Code follows company security practices and guidelines

Copy link

changeset-bot bot commented Jan 10, 2024

⚠️ No Changeset found

Latest commit: 86eb996

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

github-actions bot commented Jan 10, 2024

Command Mean [s] Min [s] Max [s] Relative
redocly lint packages/core/src/benchmark/benches/rebilly.yaml 1.068 ± 0.013 1.050 1.097 1.00
redocly-next lint packages/core/src/benchmark/benches/rebilly.yaml 1.071 ± 0.017 1.050 1.105 1.00 ± 0.02

Copy link
Contributor

github-actions bot commented Jan 10, 2024

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements 76.1% 4302/5653
🟡 Branches 65.72% 2232/3396
🟡 Functions 68.81% 695/1010
🟡 Lines 76.31% 4045/5301

Test suite run success

699 tests passing in 100 suites.

Report generated by 🧪jest coverage report action from 86eb996

@lornajane lornajane marked this pull request as ready for review February 12, 2024 14:25
@lornajane lornajane requested a review from a team as a code owner February 12, 2024 14:25
@lornajane lornajane mentioned this pull request Feb 12, 2024
6 tasks
Comment on lines -93 to -184
### 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.

Copy link
Contributor

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?

Copy link
Collaborator Author

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.

Copy link
Contributor

@TaylorKrusen TaylorKrusen left a 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.

docs/commands/lint.md Outdated Show resolved Hide resolved
docs/commands/lint.md Outdated Show resolved Hide resolved
@lornajane lornajane merged commit fd79f7d into main Feb 12, 2024
29 checks passed
@lornajane lornajane deleted the use-museum-example branch February 12, 2024 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use Museum API as our example API description
5 participants