Skip to content

fix(core): dotted path parameter names generate malformed request - #3741

Merged
melloware merged 1 commit into
orval-labs:masterfrom
daugvinasr:dotted-path-parameter-names-generate-malformed-request
Jul 19, 2026
Merged

fix(core): dotted path parameter names generate malformed request#3741
melloware merged 1 commit into
orval-labs:masterfrom
daugvinasr:dotted-path-parameter-names-generate-malformed-request

Conversation

@daugvinasr

@daugvinasr daugvinasr commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Closes: #3735

Refactor replaces three duplicated recursive-regex route parsers with shared helpers, also fixes dotted path parameter names generating malformed requests #3735

Summary by CodeRabbit

  • Bug Fixes

    • Improved generated client handling for dotted, underscored, dashed, wildcard, and nested path parameters.
    • Prevented malformed URLs and incorrect parameter references in generated clients.
    • Preserved template expressions and literal braces when converting routes.
    • Normalized routes that omit a leading slash.
  • New Features

    • Added consistent route conversion for Hono and MSW integrations.
    • Added safe property access for parameter names requiring bracket notation.
  • Tests

    • Expanded coverage for route formatting, parameter matching, escaping, collisions, and missing parameters.

@coderabbitai

coderabbitai Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: c1169282-5cc6-485c-907f-ca624d2f8059

📥 Commits

Reviewing files that changed from the base of the PR and between 2d90b05 and 18e9243.

⛔ Files ignored due to path filters (1)
  • tests/__snapshots__/fetch/dotted-path-params/endpoints.ts is excluded by !**/__snapshots__/**
📒 Files selected for processing (14)
  • packages/core/src/getters/keys.test.ts
  • packages/core/src/getters/keys.ts
  • packages/core/src/getters/params.test.ts
  • packages/core/src/getters/params.ts
  • packages/core/src/getters/route.test.ts
  • packages/core/src/getters/route.ts
  • packages/hono/src/index.ts
  • packages/hono/src/route.test.ts
  • packages/hono/src/route.ts
  • packages/mcp/src/index.ts
  • packages/mock/src/faker/getters/route.test.ts
  • packages/mock/src/faker/getters/route.ts
  • tests/configs/fetch.config.ts
  • tests/specifications/dotted-path-params.yaml

📝 Walkthrough

Walkthrough

The change centralizes OpenAPI path-parameter parsing and naming, adds collision and missing-parameter validation, and updates Hono, MSW, and MCP generators to use shared route and property-access helpers. Tests and a dotted-parameter fetch fixture cover the new behavior.

Changes

Route parameter generation

Layer / File(s) Summary
Core route parsing and naming
packages/core/src/getters/route.ts, packages/core/src/getters/route.test.ts
Shared helpers normalize paths, recognize dotted parameters, sanitize and camel-case names, preserve literal ${...} blocks, and emit template or colon routes.
Parameter resolution and property access
packages/core/src/getters/params.ts, packages/core/src/getters/params.test.ts, packages/core/src/getters/keys.ts, packages/core/src/getters/keys.test.ts
Parameter lookup uses shared generated identifiers, reports missing or colliding matches, and emits safe dot or bracket property access.
Generator route integrations
packages/hono/..., packages/mock/src/faker/getters/..., packages/mcp/src/index.ts
Hono, MSW, and MCP generation now use shared route, key, and accessor helpers for emitted paths, types, and runtime arguments.
Dotted-parameter integration fixture
tests/configs/fetch.config.ts, tests/specifications/dotted-path-params.yaml
Adds a fetch generation configuration and OpenAPI specification containing dotted path parameters.

Estimated code review effort: 4 (Complex) | ~45 minutes

Possibly related issues

Possibly related PRs

Suggested labels: openapi, fetch, hono, mcp, mock, msw

Suggested reviewers: aqeelat

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and matches the main change: dotted path parameters generating malformed requests.
Linked Issues check ✅ Passed The PR satisfies #3735 by parsing dotted path params, sanitizing them to valid identifiers, and wiring the fix through generated clients and tests.
Out of Scope Changes check ✅ Passed The added tests, spec, config, and shared route/accessor helpers all support the dotted-parameter fix and refactor.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install failed. For unrecoverable errors, disable the tool in CodeRabbit configuration.


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.

@pkg-pr-new

pkg-pr-new Bot commented Jul 18, 2026

Copy link
Copy Markdown

Open in StackBlitz

@orval/angular

bun add https://pkg.pr.new/@orval/angular@18e9243

@orval/axios

bun add https://pkg.pr.new/@orval/axios@18e9243

@orval/core

bun add https://pkg.pr.new/@orval/core@18e9243

@orval/effect

bun add https://pkg.pr.new/@orval/effect@18e9243

@orval/fetch

bun add https://pkg.pr.new/@orval/fetch@18e9243

@orval/hono

bun add https://pkg.pr.new/@orval/hono@18e9243

@orval/mcp

bun add https://pkg.pr.new/@orval/mcp@18e9243

@orval/mock

bun add https://pkg.pr.new/@orval/mock@18e9243

orval

bun add https://pkg.pr.new/orval@18e9243

@orval/query

bun add https://pkg.pr.new/@orval/query@18e9243

@orval/solid-start

bun add https://pkg.pr.new/@orval/solid-start@18e9243

@orval/swr

bun add https://pkg.pr.new/@orval/swr@18e9243

@orval/zod

bun add https://pkg.pr.new/@orval/zod@18e9243

commit: 18e9243

@daugvinasr
daugvinasr force-pushed the dotted-path-parameter-names-generate-malformed-request branch from f518304 to f207208 Compare July 18, 2026 09:19
@melloware melloware added the bug Something isn't working label Jul 18, 2026
@melloware

Copy link
Copy Markdown
Collaborator

@daugvinasr just let us know when its ready for review

@daugvinasr
daugvinasr force-pushed the dotted-path-parameter-names-generate-malformed-request branch 2 times, most recently from 82ddca4 to 5358c11 Compare July 19, 2026 16:07
@daugvinasr
daugvinasr force-pushed the dotted-path-parameter-names-generate-malformed-request branch from 5358c11 to 18e9243 Compare July 19, 2026 16:18
@daugvinasr
daugvinasr marked this pull request as ready for review July 19, 2026 16:28
@daugvinasr

Copy link
Copy Markdown
Contributor Author

@melloware should be good to go

@melloware
melloware merged commit f7c1113 into orval-labs:master Jul 19, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dotted path parameter names generate malformed request URLs

2 participants