eye-gu opened a new pull request, #6339:
URL: https://github.com/apache/shenyu/pull/6339

   <!-- Describe your PR here; e.g. Fixes #issueNo -->
   close #6338 
   
   Previously, API document generation only supported Spring Web 
annotation-based parameter parsing (`@RequestParam`, `@RequestPart`, path 
variables), which only works for HTTP/WebSocket/Spring Cloud. RPC types (Dubbo, 
SOFA, TARS, gRPC) had no request parameter information in generated documents.
   
   ### Changes
   
   **OpenApiUtils - RPC-aware document generation**
   - Add `buildDocumentJson()` that dispatches by RPC type:
     - **Dubbo/TARS**: parse request parameters from Java method signatures
     - **gRPC**: parse request/response from `StreamObserver` method pattern
     - **Dubbo + Protobuf**: parse protobuf message fields via reflection for 
both request and response
     - HTTP/WebSocket/Spring Cloud: unchanged Spring MVC annotation parsing
   - Unify document fields to `requestParameters` / `responseParameters`
   
   **SOFA - enable API document support**
   - Refactor `SofaServiceEventListener` to extend 
`AbstractContextRefreshedEventListener` common flow
   - Replace custom `handler()` / `onApplicationEvent()` with standard 
`getCorrectedClass()` + `buildApiPath()` hooks
   - SOFA services now go through the unified API doc registration pipeline
   
   **Examples**
   - Add `@ApiModule` / `@ApiDoc` annotations to Dubbo protobuf example services
   
   ### Impact
   
   - Dubbo/SOFA/TARS/gRPC API documents now include detailed request parameter 
schemas
   - SOFA module gains API document generation capability
   - No breaking change for HTTP/WebSocket/Spring Cloud document generation
   <!--
   Thank you for proposing a pull request. This template will guide you through 
the essential steps necessary for a pull request.
   -->
   Make sure that:
   
   - [x] You have read the [contribution 
guidelines](https://shenyu.apache.org/community/contributor-guide).
   - [x] You submit test cases (unit or integration tests) that back your 
changes.
   - [x] Your local test passed `./mvnw clean install 
-Dmaven.javadoc.skip=true`.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to