You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When following the example provided by @hono/zod-openapi and using the path parameter syntax '{id}' in Swagger to define an endpoint path like '/users/{id}', an issue arises where the defined endpoint cannot be found. This results in a 404 error when testing the endpoint with Postman or any. However, when the path is manually changed to '/users/:id', the endpoint functions correctly.
Steps to Reproduce:
Utilize the example provided by @hono/zod-openapi for defining an endpoint path with a path parameter using '{id}' syntax.
Try to access the defined endpoint using Postman or any other API testing tool.
Expected Behavior:
The endpoint defined with the '{id}' syntax should be successfully recognized and accessible both in Swagger documentation and when tested.
Actual Behavior:
When using the defined '{id}' path parameter syntax in Swagger, the endpoint cannot be found, and a 404 error is returned when testing the endpoint api call. However, changing the path parameter syntax to '/users/:id' makes the endpoint work as expected.
Additional Information:
This issue seems to be specific to the use of the '{id}' path parameter syntax in Swagger, as manually changing it to '/users/:id' in both the Swagger documentation and the testing tool resolves the issue.
When modifying the OpenAPI documentation directly to use '/users/{id}' and accessing the endpoint, it functions correctly.
It appears that the inconsistency lies in how the '{id}' syntax is interpreted when used within the Swagger documentation.
Environment Details:
Library: @hono/zod-openapi
OpenAPI Definition: (Provide the relevant OpenAPI definition excerpt where the endpoint is defined)
Testing Tool: Postman (or specify the testing tool used)
API Endpoint Path: '/users/{id}'
HTTP Method: GET (or specify the method)
Screenshots when i use :id in postman and swagger
Screenshots when i use {id} in postman and swagger
Labels:
Bug
Swagger
OpenAPI
Path Parameter
Your prompt attention to this issue would be greatly appreciated. If additional information is required, please let me know. Thank you for your assistance in resolving this matter.
The text was updated successfully, but these errors were encountered:
Issue Description:
When following the example provided by @hono/zod-openapi and using the path parameter syntax '{id}' in Swagger to define an endpoint path like '/users/{id}', an issue arises where the defined endpoint cannot be found. This results in a 404 error when testing the endpoint with Postman or any. However, when the path is manually changed to '/users/:id', the endpoint functions correctly.
Steps to Reproduce:
Utilize the example provided by @hono/zod-openapi for defining an endpoint path with a path parameter using '{id}' syntax.
Try to access the defined endpoint using Postman or any other API testing tool.
Expected Behavior:
The endpoint defined with the '{id}' syntax should be successfully recognized and accessible both in Swagger documentation and when tested.
Actual Behavior:
When using the defined '{id}' path parameter syntax in Swagger, the endpoint cannot be found, and a 404 error is returned when testing the endpoint api call. However, changing the path parameter syntax to '/users/:id' makes the endpoint work as expected.
Additional Information:
This issue seems to be specific to the use of the '{id}' path parameter syntax in Swagger, as manually changing it to '/users/:id' in both the Swagger documentation and the testing tool resolves the issue.
When modifying the OpenAPI documentation directly to use '/users/{id}' and accessing the endpoint, it functions correctly.
It appears that the inconsistency lies in how the '{id}' syntax is interpreted when used within the Swagger documentation.
Environment Details:
Library: @hono/zod-openapi
OpenAPI Definition: (Provide the relevant OpenAPI definition excerpt where the endpoint is defined)
Testing Tool: Postman (or specify the testing tool used)
API Endpoint Path: '/users/{id}'
HTTP Method: GET (or specify the method)
Screenshots when i use :id in postman and swagger
Screenshots when i use {id} in postman and swagger
Labels:
Bug
Swagger
OpenAPI
Path Parameter
Your prompt attention to this issue would be greatly appreciated. If additional information is required, please let me know. Thank you for your assistance in resolving this matter.
The text was updated successfully, but these errors were encountered: