test: add Xquik OpenAPI fixture and fix apiKey auth#30
Conversation
PR SummaryMedium Risk Overview Compiler: HTTP: Env lookups for tokens and OAuth2 client credentials use Cache: Tests: OAuth2 compiler cases, scoped OAuth2 HTTP test, Xquik YAML fixture, and integration test for dual auth, query enums, and response schemas. Reviewed by Cursor Bugbot for commit b8bb04f. Bugbot is set up for automated code reviews on this repo. Configure here. |
f0706b2 to
f3424f4
Compare
|
Addressed the two Devin readability notes in Validation after the update:
|
|
Addressed the current Devin finding by preserving the OpenAPI security-scheme key separately from the API key wire name. The compiler now keeps the scheme key for credential lookup and OpenAPI reconstruction while using Validation:
|
|
Addressed the new Devin OAuth2 prefix finding in Validation:
|
|
Addressed the Cursor compile-cache finding in Validation:
|
1 similar comment
|
Addressed the Cursor compile-cache finding in Validation:
|
|
Addressed the latest Devin OAuth2 flow finding in Validation:
|
|
Addressed the latest Cursor OAuth2 flow finding in Validation:
|
|
Addressed the latest Cursor OAuth2 scopes finding in Validation:
|
|
Addressed the latest Cursor OAuth2 grant finding in b8bb04f by limiting compiled token acquisition metadata to the clientCredentials flow, matching the runtime client_credentials grant. Non-client-credentials token URLs are now ignored so auth-code/password endpoints are not used for client-credentials token requests. Validation:
|
b8bb04f to
a23d880
Compare
|
Repair pass complete at a23d880. I rebased onto current main, added the requested apiKey key-versus-wire-name runtime regression, normalized the cache format version, replied to every review note, and resolved all addressed threads. Local validation is green: typecheck, build, 38 tests, smoke test, and dependency audit with 0 vulnerabilities. |
a23d880 to
2411640
Compare
|
Repair published as 2411640. I rebuilt the PR on current main as 1 signed commit and removed the unrelated OAuth expansion. The focused change adds the current Xquik OpenAPI 3.1 regression and fixes the independent apiKey component-key versus wire-name defect for all OpenAPI specs. Validation is green: typecheck, build, 34 tests, smoke test, dependency audit, diff check, and public-link verification. |
Summary
Independent Repository Fix
OpenAPI permits a security component key such as
apiKeyto differ from its wire name such asx-api-key. The compiler previously discarded the wire name, so runtime requests could send the credential through the wrong header. This repair preserves both values, uses the component key for environment lookup, uses the declared name on the request, and reconstructs normalized security requirements with the component key.Validation
npm run checknpm run buildnpm test(34 passing)npm run smokenpm audit --audit-level=critical(0 vulnerabilities)Xquik is an independent third-party service. Not affiliated with X Corp. "Twitter" and "X" are trademarks of X Corp.