Skip to content

feat(EN-994): expose v3 list-endpoint filters as typed OpenAPI components#702

Draft
Quentin-David-24 wants to merge 3 commits into
mainfrom
feat/EN-994-typed-list-endpoint-filters
Draft

feat(EN-994): expose v3 list-endpoint filters as typed OpenAPI components#702
Quentin-David-24 wants to merge 3 commits into
mainfrom
feat/EN-994-typed-list-endpoint-filters

Conversation

@Quentin-David-24

Copy link
Copy Markdown
Contributor

Each v3 list endpoint now references a per-resource V3{Resource}Filter component listing its filterable property names with their types, and a V3{Resource}QueryBuilder request-body wrapper that $refs it via $match. SDK consumers get typed enums per endpoint; the frontend can introspect the spec to discover queryable fields.

The new internal/storage/filters package is the single source of truth: each *QueryContext switch now gates incoming keys via filters..Allows and tools/compile-filters emits openapi/v3/v3-filters.generated.yaml from the same declarations, so the storage allow-list and the OpenAPI surface can no longer drift. Wire format is unchanged — the wrapper keeps additionalProperties: true to preserve existing $match/$or/$and bodies.

…ents

Each v3 list endpoint now references a per-resource V3{Resource}Filter
component listing its filterable property names with their types, and a
V3{Resource}QueryBuilder request-body wrapper that $refs it via $match.
SDK consumers get typed enums per endpoint; the frontend can introspect
the spec to discover queryable fields.

The new internal/storage/filters package is the single source of truth:
each *QueryContext switch now gates incoming keys via filters.<Spec>.Allows
and tools/compile-filters emits openapi/v3/v3-filters.generated.yaml from
the same declarations, so the storage allow-list and the OpenAPI surface
can no longer drift. Wire format is unchanged — the wrapper keeps
additionalProperties: true to preserve existing $match/$or/$and bodies.
@coderabbitai

coderabbitai Bot commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c835ed49-fc7f-4090-aa03-8f76eedfef51

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/EN-994-typed-list-endpoint-filters

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Comment thread docs/api/README.md
```json
{}
{
"$match": {

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.

Here's the rationale to have it like this:

 OpenAPI code generators only emit types for schemas reachable from an operation (request body, response, parameter). Components that sit unused in                  
  components/schemas are inconsistently emitted by Speakeasy — sometimes yes, sometimes no, no guarantees.

additionalProperties: true still allows to use the query DSL

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 did the test, indeed if there a components is unreachable from a path, it's not emitted and will not generate anything.

However, as we can see from the generated files, we now have a breaking change (from RequestBody to thefilter)

@codecov

codecov Bot commented Apr 29, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.24088% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 65.69%. Comparing base (4a57d29) to head (510e2ed).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
internal/storage/filters/spec.go 87.23% 4 Missing and 2 partials ⚠️
internal/storage/connectors.go 50.00% 1 Missing and 1 partial ⚠️
internal/storage/open_banking_connections.go 84.61% 1 Missing and 1 partial ⚠️
internal/storage/conversions.go 85.71% 1 Missing ⚠️
internal/storage/orders.go 85.71% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #702      +/-   ##
==========================================
- Coverage   65.73%   65.69%   -0.04%     
==========================================
  Files         872      874       +2     
  Lines       40702    40691      -11     
==========================================
- Hits        26754    26733      -21     
- Misses      12210    12219       +9     
- Partials     1738     1739       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@thierrycoopman thierrycoopman added the enhancement New feature or request label May 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants