apache / dubbo

The java implementation of Apache Dubbo. An RPC and microservice framework.
https://dubbo.apache.org/
Apache License 2.0
40.23k stars 26.34k forks source link

[Feature] Dubbo Triple OpenAPI Support Requirements #14307

Open oxsean opened 4 weeks ago

oxsean commented 4 weeks ago

Background

There is already a Metadata Service in Dubbo. Why consider introducing support for OpenAPI? There are several considerations:

Introducing OpenAPI support will greatly enhance the management and efficiency of Dubbo services, helping developers develop, test, and maintain API services more efficiently.

Development Directions

Code First Approach The Code First approach emphasizes defining the structure and logic of the API by writing code, rather than defining data structures or interface specifications first. In this approach, developers directly write code to implement business logic and convert it into a standard API description format using specific tools or frameworks.

Applicable Scenarios

Solution

Schema First Approach The Schema First approach emphasizes defining the data structure and interface specifications of the API first (usually using JSON or YAML format), and then implementing specific business logic based on these specifications. In this approach, developers can define API specifications to constrain the behavior and data format of the interface, and then generate corresponding code or documentation.

Applicable Scenarios

Solution

User Requirements

Export OpenAPI Schema For existing services, support exporting JSON-format OpenAPI descriptions. Specific requirements include:

Import and Generate Stub from OpenAPI Schema

Based on a local or network (configured URL) OpenAPI Schema, generate Java service interfaces and model objects (request, response, enum). Requirements include:

Implementation References Export OpenAPI Schema

elysium-w commented 1 week ago

@oxsean I'm deep learning dubbo recently,and I'm willing to contribute this feature.Could you assign this issue to me?

heliang666s commented 5 days ago

I'm very interested in this issue, please assign it to me @oxsean

oxsean commented 5 days ago

@elysium-w Sorry, @heliang666s was working on this feature.