Strip periods from OperationIds - #84
Conversation
SummaryNormalizes OpenAPI operation IDs by removing periods, spaces, and parentheses before generating JavaScript identifiers and matching selected operations. Adds utility and integration coverage for normalization and selective generation, updates snapshots and OAS2/CLI tests, and replaces the Blockscout fixture with an expanded OpenAPI 3 specification. Changes
Walkthrough by kanri |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #84 +/- ##
==========================================
+ Coverage 97.36% 97.45% +0.08%
==========================================
Files 21 22 +1
Lines 3608 3652 +44
==========================================
+ Hits 3513 3559 +46
+ Misses 95 93 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Move keyword mapping out of zenko.ts and unit-test every branch so codecov/patch can measure the new switch arms.
There was a problem hiding this comment.
Issues
1. Normalization is non-injective: valid IDs such as `foo.bar` and `foobar` both...
Location: packages/zenko/src/zenko.ts:166
Severity: warning
Normalization is non-injective: valid IDs such as foo.bar and foobar both match a selected foobar, so both operations are generated and can produce duplicate exports/object keys. Prefer an exact raw-ID match first; otherwise only accept a normalized match when it resolves to one operation, and report ambiguity.
Verdict
Status: APPROVED
Normalization coverage is solid, but ambiguous normalized operation IDs need deterministic handling.
The effective status was recalculated from current findings and prior Kanri threads: APPROVED.
Reviewed by kanri | 0 new inline comments
What this PR does
Normalizes OpenAPI operation IDs by removing periods, spaces, and parentheses before generating JavaScript identifiers and matching selected operations. Adds utility and integration coverage for normalization and selective generation, updates snapshots and OAS2/CLI tests, and replaces the Blockscout fixture with an expanded OpenAPI 3 specification.