Skip to content

docs(other): respect usage article#149

Open
DmitryAnansky wants to merge 14 commits into
mainfrom
chore/respect-simple-usage-blog-post
Open

docs(other): respect usage article#149
DmitryAnansky wants to merge 14 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, using Code Walkthrough.
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.

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 2 times, most recently 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?

Comment thread learn/arazzo/practical-example-series/api-contract-testing-01.md Outdated
Comment thread learn/arazzo/practical-example-series/oauth2-authorization-02.md Outdated
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?

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.

All of those needed to cover flow with Auth, but we can make smaller about reusable Arazzo.

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 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.

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.

I removed some, but maybe we can keep at least pointers started from workflow level?


</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.

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.

Its more detailed description compare to

Respect also runs additional automatic checks based on the connected OpenAPI description (see the next section).

Comment thread learn/arazzo/practical-example-series/api-contract-testing-01.md Outdated
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.

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.

Lets keep the Summary small.

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.

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

@DmitryAnansky DmitryAnansky force-pushed the chore/respect-simple-usage-blog-post branch from dc03d73 to 238d21b Compare May 14, 2026 19:21
@DmitryAnansky DmitryAnansky requested review from a team and tatomyr May 14, 2026 19:22
@DmitryAnansky DmitryAnansky marked this pull request as ready for review May 14, 2026 19:23
Copy link
Copy Markdown

@redocly redocly Bot left a comment

Choose a reason for hiding this comment

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

marketing-site AI Review: 🟢 Completed

Reunite Bot has reviewed your changes and found 6 potential issue(s).

Note

Low Risk

This PR contains only documentation updates. There are no changes to the application code, ensuring there is no impact on runtime behavior or system stability.

Overview

Adds the first two articles for the "Respect practical example series" using Code Walkthroughs:

  • API Contract Testing: Demonstrates how to automate testing and verify API behavior using Arazzo workflows.
  • OAuth2 Authorization: Explains how to test OAuth2-secured API endpoints, focusing on reusable workflows and passing values between them.

Additionally, this PR adds the required _filesets (Arazzo and OpenAPI YAML specifications for the Redocly Cafe API) and updates learn/arazzo/sidebars.yaml to include the new guides in the navigation.

The second step, `authorize-with-client_credentials`, calls `/oauth2/token` using the credentials returned by the previous step.

In a production application, the `/callback` URL is usually implemented by the client application.
In this example, the Redocly Cafe API provides the callback endpoint for demonstration purposes.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The comment about the /callback URL is misleading for the Client Credentials grant, as this flow is machine-to-machine and does not utilize a callback mechanism. This belongs to the Authorization Code grant.


To follow the examples in this article, you need:

- Basic familiarity with [Arazzo](https://redocly.com/learn/arazzo/what-is-arazzo).
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Use a relative link ../what-is-arazzo.md instead of the absolute URL https://redocly.com/learn/arazzo/what-is-arazzo to ensure the link works correctly in local preview and self-hosted environments.

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.

4 participants