Skip to content

docs: document per-endpoint filter, sort, and search fields#18

Merged
rudi23 merged 3 commits into
mainfrom
docs/per-endpoint-filter-sort-search-fields
Jul 17, 2026
Merged

docs: document per-endpoint filter, sort, and search fields#18
rudi23 merged 3 commits into
mainfrom
docs/per-endpoint-filter-sort-search-fields

Conversation

@rudi23

@rudi23 rudi23 commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

What / Why

Ports the OpenAPI documentation changes from Redocly/redocly#25078 to this standalone cafe-api repo. Only the spec/docs portion of that PR applies here — the app-code changes (Prisma DMMF removal, config-driven pagination engine) live in the monorepo and have no counterpart in this docs-only mirror.

The upstream PR made cafe list pagination config-driven with an explicit per-endpoint field allow-list. This documents that behavior so the published spec matches what the API actually accepts.

Changes

  • components/parameters/Filter.yaml — generalized the shared description (points to each list endpoint for supported fields), scoped time ranges to date fields, and removed the orders-specific examples block (examples now live per-endpoint).
  • components/parameters/Search.yaml — replaced the hard-coded per-endpoint field lists with a generic description pointing to each list endpoint.
  • paths/menu.yaml — added sibling description overrides on Sort/Filter/Search plus a Filter example, documenting menu's sortable/filterable/searchable fields.
  • paths/orders.yaml — same pattern for orders' Filter/Sort/Search, with examples.
  • paths/order-items.yaml — documented that Filter is required and orderId-only, with an example.

Testing

  • redocly lint openapi/cafe.yaml — valid.
  • redocly bundle — each override resolves to its own path (Filterable/Sortable/Searchable field lists present per endpoint; order-items' orderId-only note resolved).

🤖 Generated with Claude Code

Port the OpenAPI documentation changes from Redocly/redocly#25078 to the
standalone cafe-api repo.

- Generalize the shared Filter and Search parameter descriptions, pointing
  readers to each list endpoint for the specific fields it supports.
- Add per-endpoint description overrides (and examples) documenting the
  filterable, sortable, and searchable fields for menu and orders.
- Document that order-items filtering is required and orderId-only.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

@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

Reunite Agent has reviewed your changes and found 10 potential issue(s).

Note

Low Risk

This is a documentation-only change to the OpenAPI specifications, introducing no operational or behavior changes to the application code.

Overview

Updates the OpenAPI specification to explicitly document per-endpoint filtering, sorting, and searching behaviors.

  • Generalizes the shared Filter and Search parameter descriptions, directing users to individual endpoints for field specifics.
  • Adds endpoint-specific parameter description overrides in paths/menu.yaml and paths/orders.yaml to list supported sortable, filterable, and searchable fields along with examples.
  • Updates paths/order-items.yaml to clarify that its Filter parameter is required and restricted to the orderId field only.

Comment thread openapi/components/parameters/Filter.yaml
Comment thread openapi/components/parameters/Search.yaml
Comment thread openapi/paths/orders.yaml
Comment thread openapi/paths/orders.yaml
Comment thread openapi/paths/menu.yaml
Comment thread openapi/paths/menu.yaml
Comment thread openapi/paths/order-items.yaml
@DmitryAnansky
DmitryAnansky requested a review from a team July 16, 2026 15:21
Address AI review feedback on #18:
- Add maxLength to the shared filter (512) and search (256) query
  parameters to bound query-string size.
- Add example values to the menu sort and search parameters for
  consistency with the orders endpoint.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Comment thread openapi/components/parameters/Filter.yaml Outdated
Comment thread openapi/components/parameters/Filter.yaml
Comment thread openapi/components/parameters/Search.yaml
@rudi23
rudi23 merged commit d543c71 into main Jul 17, 2026
7 checks passed
@rudi23
rudi23 deleted the docs/per-endpoint-filter-sort-search-fields branch July 17, 2026 15:21
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