Skip to content

ci: report client requests that do not match the OpenAPI specification - #1175

Draft
Pijukatel wants to merge 6 commits into
masterfrom
claude/zealous-fermat-esyyfx
Draft

Pijukatel wants to merge 6 commits into
masterfrom
claude/zealous-fermat-esyyfx

Conversation

@Pijukatel

@Pijukatel Pijukatel commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor
  • Adds tools/openapi-request-validator: a request-only validator (no response checks) built on express-openapi-validator, with the same false-positive filters the API server uses.
  • Unit tests: the mock server mounts the validator when OPENAPI_SPEC_PATH is set; all 1175 tests still pass.
  • Integration tests: a validating reverse proxy forwards to the live API; 718 requests validated locally, 2 findings (pricingModel=FLAT_PRICE_PER_MONTH missing from the spec enum, plus one validator quirk now filtered).
  • Validation is opt-in: the Check workflow and local runs are unchanged, and a new manual Run tests workflow runs unit + integration tests with the validation option on by default, printing findings as ::warning:: annotations.
  • Prototype for a standalone tool shared by all API clients; see tools/openapi-request-validator/README.md.

🤖 Generated with Claude Code

https://claude.ai/code/session_017ocuALGHVYTScW9Ht9Ytjo

Add `tools/openapi-request-validator`, a request-only validator built on
`express-openapi-validator`: an Express middleware the unit-test mock server
mounts when `OPENAPI_SPEC_PATH` is set, a validating reverse proxy the
integration tests run through, and a report script that aggregates the
findings and emits GitHub Actions warning annotations.

Both CI jobs fetch the published specification, run the tests with
validation on, and print the report. Nothing is blocked or failed on a
finding; the result is a warning while the specification and the client
catch up with each other.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017ocuALGHVYTScW9Ht9Ytjo
@github-actions github-actions Bot added the t-tooling Issues with this label are in the ownership of the tooling team. label Oct 27, 2026
The report script prints only the warning lines, as GitHub Actions
annotations in CI, instead of a grouped text block followed by them.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017ocuALGHVYTScW9Ht9Ytjo
@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

✅ The link checker did not find any broken links.

See more at https://github.com/apify/apify-client-js/actions/runs/40516734837#summary-122232402278

…kflow

The Check workflow and local test runs behave as before. The new
workflow_dispatch workflow runs the unit and integration tests with the
validation option, on by default.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017ocuALGHVYTScW9Ht9Ytjo
The workflow cannot be started by hand before it exists on master. The
pull request trigger is a test aid and is removed before merging.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017ocuALGHVYTScW9Ht9Ytjo

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t-tooling Issues with this label are in the ownership of the tooling team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants