Showing 1 of 1 files from the diff.
@@ -80,6 +80,12 @@
Loading
80 | 80 | @Value("${dubbo.consumer.timeout:1000}") |
|
81 | 81 | private int timeout; |
|
82 | 82 | ||
83 | + | @Value("${dubbo.api.docs.group:apiDocsGroup}") |
|
84 | + | private String apiDocsGroup; |
|
85 | + | ||
86 | + | @Value("${dubbo.api.docs.version:v1}") |
|
87 | + | private String apiDocsVersion; |
|
88 | + | ||
83 | 89 | @InitBinder |
|
84 | 90 | public void initBinder(WebDataBinder binder) { |
|
85 | 91 | binder.registerCustomEditor(String.class, new StringTrimmerEditor(true)); |
@@ -164,22 +170,15 @@
Loading
164 | 170 | @ApiOperation(value = "Get basic information of all modules, excluding API parameter information", notes = "Get basic information of all modules, excluding API parameter information", httpMethod = "GET", produces = "application/json") |
|
165 | 171 | @GetMapping("/apiModuleList") |
|
166 | 172 | public String apiModuleList(ApiInfoRequest apiInfoRequest){ |
|
167 | - | CallDubboServiceRequest req = new CallDubboServiceRequest(); |
|
168 | - | req.setRegistryCenterUrl("dubbo://" + apiInfoRequest.getDubboIp() + ":" + apiInfoRequest.getDubboPort()); |
|
169 | - | req.setInterfaceClassName("org.apache.dubbo.apidocs.core.providers.IDubboDocProvider"); |
|
170 | - | req.setMethodName("apiModuleList"); |
|
171 | - | req.setAsync(false); |
|
173 | + | CallDubboServiceRequest req = createCallApiDocsServiceRequest("apiModuleList", apiInfoRequest); |
|
174 | + | ||
172 | 175 | return callDubboService(req, null); |
|
173 | 176 | } |
|
174 | 177 | ||
175 | 178 | @ApiOperation(value = "Get the parameter information of the specified API", notes = "Get the parameter information of the specified API", httpMethod = "GET", produces = "application/json") |
|
176 | 179 | @GetMapping("/apiParamsResp") |
|
177 | 180 | public String apiParamsResp(ApiInfoRequest apiInfoRequest){ |
|
178 | - | CallDubboServiceRequest req = new CallDubboServiceRequest(); |
|
179 | - | req.setRegistryCenterUrl("dubbo://" + apiInfoRequest.getDubboIp() + ":" + apiInfoRequest.getDubboPort()); |
|
180 | - | req.setInterfaceClassName("org.apache.dubbo.apidocs.core.providers.IDubboDocProvider"); |
|
181 | - | req.setMethodName("apiParamsResponseInfo"); |
|
182 | - | req.setAsync(false); |
|
181 | + | CallDubboServiceRequest req = createCallApiDocsServiceRequest("apiParamsResponseInfo", apiInfoRequest); |
|
183 | 182 | ||
184 | 183 | List<CallDubboServiceRequestInterfaceParam> methodparams = new ArrayList<>(1); |
|
185 | 184 | CallDubboServiceRequestInterfaceParam param = new CallDubboServiceRequestInterfaceParam(); |
@@ -205,4 +204,17 @@
Loading
205 | 204 | } |
|
206 | 205 | return false; |
|
207 | 206 | } |
|
207 | + | ||
208 | + | private CallDubboServiceRequest createCallApiDocsServiceRequest(String methodName, ApiInfoRequest apiInfoRequest) { |
|
209 | + | CallDubboServiceRequest req = new CallDubboServiceRequest(); |
|
210 | + | req.setRegistryCenterUrl("dubbo://" + apiInfoRequest.getDubboIp() + ":" + apiInfoRequest.getDubboPort()); |
|
211 | + | req.setMethodName(methodName); |
|
212 | + | ||
213 | + | req.setInterfaceClassName("org.apache.dubbo.apidocs.core.providers.IDubboDocProvider"); |
|
214 | + | req.setAsync(false); |
|
215 | + | req.setVersion(apiDocsVersion); |
|
216 | + | req.setGroup(apiDocsGroup); |
|
217 | + | ||
218 | + | return req; |
|
219 | + | } |
|
208 | 220 | } |
Files | Complexity | Coverage |
---|---|---|
dubbo-admin-server/src/main/java/org/apache/dubbo/admin | 20.29% | 21.98% |
Project Totals (98 files) | 20.29% | 21.98% |
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file.
The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files.
The size and color of each slice is representing the number of statements and the coverage, respectively.