apache / dubbo-admin

The ops and reference implementation for Apache Dubbo
https://dubbo.apache.org
Apache License 2.0
3.99k stars 2.17k forks source link

add auto generate dubbo admin swagger #1099

Closed 2456868764 closed 1 year ago

2456868764 commented 1 year ago

What is the purpose of the change

add auto generate dubbo admin swagger which refer to issue Makefile tasks #1107

Brief changelog

  1. make help dubbo-admin-swagger Generate dubbo-admin swagger docs. swagger-install Download swagger locally if necessary.

  2. add swagger tags in mock_rule model and handler.

  3. three suggestions

    • Use struct instead of map in json output
    • Rule DTO & VO name for consistent usage
    • Directly output business data instead of wrapping ,demo code as follow:
    c.JSON(http.StatusOK, gin.H{
        "code": 1,
        "data": []model.TagRouteDto{tagRoute},
    })

Verifying this change

XXXX

Follow this checklist to help us incorporate your contribution quickly and easily:

2456868764 commented 1 year ago

i have updated , pls review it again

DMwangnima commented 1 year ago

LGTM

sonarcloud[bot] commented 1 year ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

2456868764 commented 1 year ago

i'v updated swagger struct according to what discussed in weekly meeting last night, pls review it again . If it is ok , pls merge into main branch.