Skip to content

feat: add Prefix option for sub-path mounted APIs - #42

Merged
mromaszewicz merged 1 commit into
oapi-codegen:mainfrom
mromaszewicz:feat/prefix-option
Feb 7, 2026
Merged

mromaszewicz merged 1 commit into
oapi-codegen:mainfrom
mromaszewicz:feat/prefix-option

Conversation

@mromaszewicz

Copy link
Copy Markdown
Member

Add a Prefix field to Options that strips a path prefix before OpenAPI validation. This allows APIs mounted under a sub-path (e.g. "/api") to validate correctly against specs whose paths don't include the prefix.

The request is cloned before modification so downstream handlers still see the original path.

Closes #11
Supersedes #15

Add a Prefix field to Options that strips a path prefix before OpenAPI
validation. This allows APIs mounted under a sub-path (e.g. "/api") to
validate correctly against specs whose paths don't include the prefix.

The request is cloned before modification so downstream handlers still
see the original path.

Closes oapi-codegen#11
Supersedes oapi-codegen#15

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mromaszewicz
mromaszewicz requested a review from a team as a code owner February 7, 2026 17:39
@mromaszewicz
mromaszewicz merged commit f3f6b0c into oapi-codegen:main Feb 7, 2026
26 checks passed
@mromaszewicz
mromaszewicz deleted the feat/prefix-option branch February 7, 2026 17:41
@mromaszewicz mromaszewicz added the bug Something isn't working label Jul 19, 2026
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.

Sub path support

2 participants