Skip to content

docs(other): respect usage article#149

Draft
DmitryAnansky wants to merge 12 commits into
mainfrom
chore/respect-simple-usage-blog-post
Draft

docs(other): respect usage article#149
DmitryAnansky wants to merge 12 commits into
mainfrom
chore/respect-simple-usage-blog-post

Conversation

@DmitryAnansky
Copy link
Copy Markdown
Contributor

@DmitryAnansky DmitryAnansky commented Oct 27, 2025

What/Why/How?

Added two first articles related to practical usage of the Respect command.
The idea is to provide a set of ready-to-use articles/templates connected to the Redocly Cafe API, allowing users to easily explore how it works and adopt them for similar use cases.

Alternative Code Walkthrough Version => #300

Reference

Testing

Screenshots (optional)

Check yourself

  • Code is linted
  • Tested
  • All new/updated code is covered with tests

Security

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

Comment thread learn/arazzo/arazzo-crud-practical-example.md Outdated
Comment thread learn/arazzo/arazzo-crud-practical-example.md Outdated
@DmitryAnansky DmitryAnansky self-assigned this Oct 31, 2025
@DmitryAnansky DmitryAnansky force-pushed the chore/respect-simple-usage-blog-post branch from c28f30f to 12e7702 Compare April 27, 2026 14:42
@DmitryAnansky DmitryAnansky force-pushed the chore/respect-simple-usage-blog-post branch from 12e7702 to 9f2c0e4 Compare April 27, 2026 14:43
@DmitryAnansky DmitryAnansky changed the title WIP: respect usage article docs(other): respect usage article Apr 29, 2026
@DmitryAnansky DmitryAnansky requested review from a team April 29, 2026 12:06
<b>IMPORTANT: the API description intentionally contains discrepancies for demonstration purposes.</b>

```yaml
openapi: 3.1.0
Copy link
Copy Markdown
Contributor Author

@DmitryAnansky DmitryAnansky Apr 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using the 3.1.0 example, as VSCE currently doesn’t support rendering 3.2.0 and we would like to allow users to have valid preview.

- page: ./linting-arazzo-workflows.md
- page: ./testing-arazzo-workflows.md
- page: ./documenting-multiple-apis-using-arazzo.md
- group: Respect practical example series
Copy link
Copy Markdown
Contributor Author

@DmitryAnansky DmitryAnansky Apr 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it ok to keep it as learn/arazzo articles or should we transform them into blog posts?

Comment thread learn/arazzo/practical-example-series/api-contract-testing-01.md Outdated
Comment thread learn/arazzo/practical-example-series/api-contract-testing-01.md Outdated
Comment thread learn/arazzo/practical-example-series/api-contract-testing-01.md Outdated
Comment thread learn/arazzo/practical-example-series/api-contract-testing-01.md Outdated
Comment thread learn/arazzo/practical-example-series/api-contract-testing-01.md Outdated
Comment thread learn/arazzo/practical-example-series/api-contract-testing-01.md Outdated
Comment thread learn/arazzo/practical-example-series/api-contract-testing-01.md Outdated
Comment thread learn/arazzo/practical-example-series/api-contract-testing-01.md Outdated
Comment thread learn/arazzo/practical-example-series/api-contract-testing-01.md

Arazzo provides a standard way to describe API workflows declaratively. Respect uses those workflows to run API contract tests against real API behavior.

With this approach, teams can maintain API test coverage, detect documentation drift earlier, and share executable API workflows across engineering, QA, and documentation teams. No newline at end of file
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to put a link to the next part of this tutorial somewhere here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc: @Redocly/technical-writers

- The status code and content type checks pass because the response matches the documented response metadata.
- The schema check fails because the response body shape does not match the documented schema.

<details>
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Redocly/technical-writers is it better to use terminal output screenshot here?

@DmitryAnansky DmitryAnansky requested a review from a team May 14, 2026 14:04

To follow the examples in this article, you need:

- Basic familiarity with [Arazzo](../what-is-arazzo.md).
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add a link to this article from '../what-is-arazzo.md'?

Comment on lines +17 to +21
You will learn how to define reusable workflows in separate files, pass values between workflows, and use those values to authorize API requests.

You will cover the following topics:

Practical applications of Arazzo:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
You will learn how to define reusable workflows in separate files, pass values between workflows, and use those values to authorize API requests.
You will cover the following topics:
Practical applications of Arazzo:
You will cover the following topics:

Comment on lines +14 to +25
This article shows how to use Respect, powered by Arazzo workflows, for API contract testing.
You will learn how to describe an API workflow, execute it with Redocly CLI, and use the results to find mismatches between an OpenAPI description and the real API behavior.

You will cover the following topics:

Practical applications of Arazzo:

- Automating repetitive API workflows.
- Adding API contract tests to CI/CD routines.
- Keeping API documentation synchronized with actual API behavior.
- Sharing described workflows across teams.
- Using the open-source [@redocly/cli](https://www.npmjs.com/package/@redocly/cli) `respect` command to execute Arazzo workflows, inspect contract test results, and fix mismatches between the OpenAPI description and the actual API response.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This article shows how to use Respect, powered by Arazzo workflows, for API contract testing.
You will learn how to describe an API workflow, execute it with Redocly CLI, and use the results to find mismatches between an OpenAPI description and the real API behavior.
You will cover the following topics:
Practical applications of Arazzo:
- Automating repetitive API workflows.
- Adding API contract tests to CI/CD routines.
- Keeping API documentation synchronized with actual API behavior.
- Sharing described workflows across teams.
- Using the open-source [@redocly/cli](https://www.npmjs.com/package/@redocly/cli) `respect` command to execute Arazzo workflows, inspect contract test results, and fix mismatches between the OpenAPI description and the actual API response.
This article shows how to use Respect, powered by Arazzo workflows, for API contract testing.
You will cover the following topics:
- Automating repetitive API workflows.
- Adding API contract tests to CI/CD routines.
- Keeping API documentation synchronized with actual API behavior.
- Sharing described workflows across teams.
- Using the open-source Redocly CLI to execute Arazzo workflows, inspect contract test results, and fix mismatches between the OpenAPI description and the actual API response.

BTW, This is a lot of topics. Maybe split them into two articles?

Whichever approach you choose, validate the Arazzo file with Redocly CLI:

```bash
npx @redocly/cli@latest lint redocly-cafe-api.arazzo.yaml
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
npx @redocly/cli@latest lint redocly-cafe-api.arazzo.yaml
npx @redocly/cli lint redocly-cafe-api.arazzo.yaml

Let's save some space...

npx @redocly/cli@latest lint redocly-cafe-api.arazzo.yaml
```

```bash
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd not put several bash sections one after another. Either add a screenshot or just say something like this:

The tool will let you know that the description is valid.

Comment on lines +89 to +90
Every Arazzo file begins with a version declaration.
The latest stable version is `1.0.1`.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is definitely redundant if you have basic familiarity with Arazzo. Either remove this or do add a separate guide on creating the Arazzo description itself.


</details>

In addition to the success criterion declared in the Arazzo file, Respect performed three additional checks automatically:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


## Fix the schema

In `redocly-cafe-api.yaml`, change `MenuItemList` from an `array` to an `object` with `object`, `page`, and `items` properties so the schema matches the response the API actually returns:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's link this as a step to redocly-cafe-api.yaml's MenuItemList so we can see the difference between the schemas.

Comment on lines +290 to +291
npm install @redocly/cli@latest -g
redocly respect products.arazzo.yaml --verbose
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's not confuse readers with different running options. Let's use the npx ... way everywhere.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And that could be put into the Summary section anyway.

After the schema is updated, the response body matches the documented contract.
This demonstrates the core value of contract testing with Respect: when the API and its OpenAPI description drift apart, the workflow highlights the mismatch immediately.

## Practical applications
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not even sure we have to explain practical cases in this article. I'd restrict that to saying that from now on it could be used in a CI/CD pipeline to check if there's no divergency between the docs and the server.

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.

3 participants