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.Request is 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.Request is 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.
Issue Summary
When using the echoopenapi adaptor, endpoints with path parameters fail to generate a default schema if
option.Requestis 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
Expected:
option.Requestis not specified, the adaptor should still generate a default schema for the path parameter.Actual:
Proposed Solution
option.Requestis omitted.Additional Context
option.Request.