-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Issue Summary
When using the echoopenapi adaptor, endpoints with path parameters fail to generate a default schema if option.Request is not provided. This breaks the expected behavior where a default schema should be generated for path parameters even without explicitly specifying a request option.
Example
type JustForDubugging struct {
ID string `path:"id"`
}
router.DELETE("/:id", deleteHandler).With(
option.Request(new(JustForDubugging)),
)Expected:
- When
option.Requestis not specified, the adaptor should still generate a default schema for the path parameter.
Actual:
- The schema is not generated, causing issues with OpenAPI documentation and potentially client integrations.
Proposed Solution
- Update the echoopenapi adaptor to detect path parameters and generate a default schema, even when
option.Requestis omitted. - Ensure backward compatibility so existing routes without explicit request options do not break.
Additional Context
- This affects routes using path parameters when no request struct is provided via
option.Request. - Might impact automated documentation and client code generation.
Metadata
Metadata
Assignees
Labels
No labels