Skip to content

refactor(codemode): name only supported operations - #46082

Open
kitlangton wants to merge 1 commit into
v2from
openapi-names
Open

refactor(codemode): name only supported operations#46082
kitlangton wants to merge 1 commit into
v2from
openapi-names

Conversation

@kitlangton

Copy link
Copy Markdown
Contributor

Why

OpenAPI conversion generates operation names before checking whether their transport semantics are supported. Skipped operations discard that identifier sanitization and collision-search work without ever reserving the name.

What Changes

Move operationPath immediately before name registration, after the existing output, base URL, input, and security checks. Accepted names and collision suffixes remain identical because the naming sets do not change across the relocated code.

Scope

One line moved and one focused test. Skip reasons/order, supported transport semantics, schemas, and execution are unchanged.

Verification

cd packages/codemode
bun run test test/openapi.test.ts
bun typecheck
cd ../..
bunx prettier --check packages/codemode/src/openapi/index.ts packages/codemode/test/openapi.test.ts
git diff --check HEAD^ HEAD

42 tests passed with 187 assertions before and after the move. The added case places an unsupported operation between accepted operations sharing an ID and checks exact names and the skipped record. Package typechecking, formatting, and whitespace checks passed.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant