Skip to content

fix(openapi): resolve redocly lint warnings - #25

Merged
vadyvas merged 5 commits into
mainfrom
fix/redocly-lint-ref-siblings
Oct 14, 2026
Merged

vadyvas merged 5 commits into
mainfrom
fix/redocly-lint-ref-siblings

Conversation

@vadyvas

@vadyvas vadyvas commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This PR fixes the lint warnings that Redocly CLI 2.60 reports. It changes only the API description.

  • spec-ref-siblings: OpenAPI does not allow example or required next to a $ref.
    • The parameter examples move into the shared parameter components, as OAS 3.2 examples with dataValue.
    • GET /order-items gets its own required filter component, OrderItemsFilter.
  • operation-4xx-response: GET /.well-known/oauth-authorization-server documents a 404 response.
  • Order.status and OrderItem.menuItem use $ref with sibling keywords instead of an allOf with one item.

The PR also adds a changelog page and sets the version to 1.0.1. No endpoint changes.

Verification

npm run lint reports 0 problems with recommended and with recommended-strict.

@redocly redocly Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

cafe

AI Review: 🟢 Completed

Redocly Agent has reviewed your changes and found 1 potential issue(s).

Note

Low Risk

Documentation and schema refinement only. Resolves Redocly CLI lint warnings without altering backend code or runtime endpoint behavior.

Overview

Addresses Redocly CLI lint rules (spec-ref-siblings, operation-4xx-response) across the OpenAPI 3.2 specification:

  • Removes illegal sibling keywords next to parameter $ref entries, migrating examples into parameter components using OAS 3.2 examples.<name>.dataValue.
  • Introduces a dedicated OrderItemsFilter component with required: true for GET /order-items.
  • Simplifies single-element allOf references in Order and OrderItem schemas to direct $ref with sibling keywords.
  • Documents the 404 response on GET /.well-known/oauth-authorization-server.
  • Adds CHANGELOG.md, registers it in sidebars.yaml, and bumps the API version to 1.0.1.

Changed pages

* /openapi/cafe
+ /changelog (new)

⚙️ Configuration or theme changed

Open preview

@vadyvas
vadyvas requested review from a team and DmitryAnansky October 9, 2026 11:39
@vadyvas vadyvas self-assigned this Oct 9, 2026
@vadyvas
vadyvas marked this pull request as ready for review October 9, 2026 11:40
Comment thread openapi/cafe.yaml
Comment thread openapi/cafe.yaml Outdated
@vadyvas
vadyvas requested a review from RomanHotsiy October 14, 2026 13:44
@vadyvas
vadyvas marked this pull request as draft October 14, 2026 14:22
@vadyvas vadyvas changed the title fix(openapi): resolve redocly lint warnings and nest order items under orders fix(openapi): resolve redocly lint warnings Oct 14, 2026
@vadyvas
vadyvas requested review from DmitryAnansky and removed request for RomanHotsiy October 14, 2026 14:37
@vadyvas
vadyvas marked this pull request as ready for review October 14, 2026 14:39
…r orders

Redocly CLI 2.60 validates Reference Objects per OAS 3.2: only `summary`
and `description` may sit next to `$ref`. Remove the `example` and
`required` siblings, keep the description overrides, and move examples
into the parameter components as `examples` + `dataValue`.

- replace `GET /order-items` (required `filter=orderId:…`) with
  `GET /orders/{orderId}/items`, reusing the `OrderId` parameter
- add `examples` to every parameter, including a new one for `menuItemId`
- add a `404` response to the RFC 8414 metadata endpoint
  (operation-4xx-response)
- flatten single-branch `allOf` in `Order.status` and `OrderItem.menuItem`
  to `$ref` with sibling keywords (JSON Schema 2020-12)

Note: the live server does not serve `/orders/{orderId}/items` yet.
@vadyvas
vadyvas force-pushed the fix/redocly-lint-ref-siblings branch from 6edc71b to 83ce9fa Compare October 14, 2026 14:41
The release only fixes lint warnings and documents existing behavior, so it is a patch, not a minor bump.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@vadyvas
vadyvas merged commit b0240c1 into main Oct 14, 2026
5 of 7 checks passed
@vadyvas
vadyvas deleted the fix/redocly-lint-ref-siblings branch October 14, 2026 15:23
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.

2 participants