-
Notifications
You must be signed in to change notification settings - Fork 26.6k
Description
Pre-check
- I am sure that all the content I provide is in English.
Search before asking
- I had searched in the issues and found no similar issues.
Apache Dubbo Component
Java SDK (apache/dubbo)
Dubbo Version
dubbo 3.3.5 jdk21
Steps to reproduce this issue
When using Dubbo version 3.3.5 with the dubbo-rest-openapimodule, the generated OpenAPI JSON documentation does not include the schema definitions for the PageResponseand AccessLogResclasses used in the response type ApiResponse<PageResponse>. Additionally, the io.swagger.v3.oas.annotations.media.Schemaannotations appear to have no effect on the generated documentation.
This issue hinders the proper generation of API documentation and may affect service consumers who rely on accurate OpenAPI specs.
What you expected to happen
Based on your description, I'll help you create an issue template for Dubbo regarding the problem where PageResponseand AccessLogResclass structures are missing from the generated JSON, and @Schemaannotations aren't working with dubbo-rest-openapiin version 3.3.5. You can directly use or adapt this template when submitting the issue to the Dubbo GitHub repository.
Title: dubbo-rest-openapiin Dubbo 3.3.5: PageResponseand AccessLogResClass Structures Missing from Generated JSON and @SchemaAnnotations Ineffective
Problem Description:
When using Dubbo version 3.3.5 with the dubbo-rest-openapimodule, the generated OpenAPI JSON documentation does not include the schema definitions for the PageResponseand AccessLogResclasses used in the response type ApiResponse<PageResponse>. Additionally, the io.swagger.v3.oas.annotations.media.Schemaannotations appear to have no effect on the generated documentation.
This issue hinders the proper generation of API documentation and may affect service consumers who rely on accurate OpenAPI specs.
Expected Behavior:
The generated OpenAPI JSON should correctly include the schema structures for all classes involved in the API response, including PageResponseand AccessLogRes.
The @Schemaannotations should be properly processed and reflected in the generated OpenAPI documentation.
Actual Behavior:
The schemas for PageResponseand AccessLogResare missing from the generated OpenAPI JSON.
Any @Schemaannotations applied to the models or operations are ignored.
Steps to Reproduce:
Define a Dubbo service operation that returns ApiResponse<PageResponse>.
Annotate the relevant classes (e.g., PageResponse, AccessLogRes) or fields with io.swagger.v3.oas.annotations.media.Schema.
Configure the application to use dubbo-rest-openapifor generating the OpenAPI documentation (typically accessible via a path like /openapior /v3/api-docs).
Start the application and retrieve the generated OpenAPI JSON.
Observe that the components.schemassection lacks definitions for PageResponseand AccessLogRes, and any applied @Schemaannotations do not affect the output.
Anything else
No response
Are you willing to submit a pull request to fix on your own?
- Yes I am willing to submit a pull request on my own!
Code of Conduct
- I agree to follow this project's Code of Conduct
Metadata
Metadata
Assignees
Labels
Type
Projects
Status