Skip to content

generateOperationId should transform path to an OpenApi path#213

Merged
MathurAditya724 merged 1 commit intorhinobase:mainfrom
matzehecht:fix/operationid-pathparams
Jan 20, 2026
Merged

generateOperationId should transform path to an OpenApi path#213
MathurAditya724 merged 1 commit intorhinobase:mainfrom
matzehecht:fix/operationid-pathparams

Conversation

@matzehecht
Copy link
Contributor

Currently generateOperationId gets passed the hono path but handles it as it would be a an OpenApi path without actually transforming it. Therefore, the operationId can contain colons for paths with path parameters as the implemented handling for path parameters never gets called.

This PR adds the transformation of the hono path to an OpenApi path before the special handling for path parameters is done and the path is transformed to an operationId.

This change also solves other edge cases like optional path parameters and RegExp as those are already handled by toOpenAPIPath (rather the extracted toOpenAPIPathSegment)

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 19, 2026

Open in StackBlitz

npm i https://pkg.pr.new/rhinobase/hono-openapi@213

commit: 373e63b

@MathurAditya724 MathurAditya724 merged commit 780d234 into rhinobase:main Jan 20, 2026
4 checks passed
@matzehecht matzehecht deleted the fix/operationid-pathparams branch January 26, 2026 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants