@@ -18,6 +18,7 @@ We welcome all sorts of contributions: from fixing a typo, updating a documentat
18
18
- [ Contribution option 3 - code changes] ( #contribution-option-3---code-changes )
19
19
- [ For trivial changes] ( #for-trivial-changes )
20
20
- [ For non-trivial changes] ( #for-non-trivial-changes )
21
+ - [ Update API doc] ( #update-api-doc )
21
22
- [ Contributor resources] ( #contributor-resources )
22
23
- [ PR and commit guidelines] ( #pr-and-commit-guidelines )
23
24
- [ Growth path for contributors] ( #growth-path-for-contributors )
@@ -37,16 +38,16 @@ You should first **fork the specific repository** you want to contribute to. Ple
37
38
[ here] ( community/dev/contributor-workflow.md ) to set Zadig up for running.
38
39
39
40
Before submitting any new issues or proposing any new changes, please check the
40
- [ open issues] ( https://github.com/koderover/Zadig /issues ) to make sure the efforts aren't duplicated. There are
41
+ [ open issues] ( https://github.com/koderover/zadig /issues ) to make sure the efforts aren't duplicated. There are
41
42
a few labels that could help you navigate through the issues:
42
43
43
44
- If you are looking for some startup issues to get your hands on, you could follow the
44
- [ #good-first-issue] ( https://github.com/koderover/Zadig /labels/good%20first%20issue ) issues.
45
+ [ #good-first-issue] ( https://github.com/koderover/zadig /labels/good%20first%20issue ) issues.
45
46
46
47
- If you are looking for some more serious challenges, you could check out our
47
- [ #help-wanted] ( https://github.com/koderover/Zadig /labels/help%20wanted ) issues.
48
+ [ #help-wanted] ( https://github.com/koderover/zadig /labels/help%20wanted ) issues.
48
49
49
- - Or some random bugfix, check out [ #bugs] ( https://github.com/koderover/Zadig /labels/bug ) .
50
+ - Or some random bugfix, check out [ #bugs] ( https://github.com/koderover/zadig /labels/bug ) .
50
51
51
52
## Contribution option 1 - reporting an issue
52
53
@@ -55,14 +56,14 @@ issues, please read on.
55
56
56
57
There are 5 types of labels for issues that you need to think of:
57
58
58
- 1 . [ ` documentation ` ] ( https://github.com/koderover/Zadig /labels/documentation )
59
- 2 . [ ` bug ` ] ( https://github.com/koderover/Zadig /labels/bug )
60
- 3 . [ ` feature request ` ] ( https://github.com/koderover/Zadig /labels/feature%20request )
61
- 4 . [ ` question ` ] ( https://github.com/koderover/Zadig /labels/question )
62
- 5 . [ ` enhancement ` ] ( https://github.com/koderover/Zadig /labels/enhancement )
59
+ 1 . [ ` documentation ` ] ( https://github.com/koderover/zadig /labels/documentation )
60
+ 2 . [ ` bug ` ] ( https://github.com/koderover/zadig /labels/bug )
61
+ 3 . [ ` feature request ` ] ( https://github.com/koderover/zadig /labels/feature%20request )
62
+ 4 . [ ` question ` ] ( https://github.com/koderover/zadig /labels/question )
63
+ 5 . [ ` enhancement ` ] ( https://github.com/koderover/zadig /labels/enhancement )
63
64
64
65
If you understand which services are involved with the new issue, please also attach the relevant label(s) to it. You
65
- could [ search for ` service/ ` prefix] ( https://github.com/koderover/Zadig /labels?q=service%2F ) to find the correct label.
66
+ could [ search for ` service/ ` prefix] ( https://github.com/koderover/zadig /labels?q=service%2F ) to find the correct label.
66
67
If you aren't sure about this, feel free to leave it open, our maintainers will get to it.
67
68
68
69
If you have checked that no duplicated issues existed and decided to create a new issue, choose the label accordingly
@@ -76,12 +77,12 @@ All issues created will be triaged by our maintainers:
76
77
1 . The maintainers will double check the issues were created with the proper label, update them otherwise.
77
78
2 . They'll make decisions whether the issues will be accepted, see next point.
78
79
3 . Certain tags might be applied by our maintainers accordingly, there are mainly 4 of them:
79
- 1 ) [ ` duplicate ` ] ( https://github.com/koderover/Zadig /labels/duplicate )
80
- 2 ) [ ` wonfix ` ] ( https://github.com/koderover/Zadig /labels/wontfix ) :
80
+ 1 ) [ ` duplicate ` ] ( https://github.com/koderover/zadig /labels/duplicate )
81
+ 2 ) [ ` wonfix ` ] ( https://github.com/koderover/zadig /labels/wontfix ) :
81
82
rationales will be provided, e.g. work as intended, obsolete, infeasible, out of scope
82
- 3 ) [ ` good first issue ` ] ( https://github.com/koderover/Zadig /labels/good%20first%20issue ) : good candidates
83
+ 3 ) [ ` good first issue ` ] ( https://github.com/koderover/zadig /labels/good%20first%20issue ) : good candidates
83
84
suitable for onboarding.
84
- 4 ) [ ` good intermediate issue ` ] ( https://github.com/koderover/Zadig /labels/good%20intermediate%20issue ) : a more
85
+ 4 ) [ ` good intermediate issue ` ] ( https://github.com/koderover/zadig /labels/good%20intermediate%20issue ) : a more
85
86
serious challenge that is up for grabs to the community.
86
87
4 . The issues are open for grab now.
87
88
5 . Periodically, the maintainers will double check that all issues are up-to-date, stale ones will be removed.
@@ -112,6 +113,7 @@ For any code changes, you **need to have an associated issue**: either an existi
112
113
change, feel free to skip this step too.
113
114
2 . Work on the changes in your forked repository.
114
115
3 . Please follow our [ PR and commit guidelines] ( #pr-and-commit-guidelines ) , one of our maintainers will review your PR.
116
+ 4 . If you have changed the backend APIs in ` aslan ` microservice, you need to [ update our API doc accordingly] ( #update-api-doc ) .
115
117
116
118
### For non-trivial changes
117
119
@@ -125,6 +127,30 @@ For any code changes, you **need to have an associated issue**: either an existi
125
127
and create one PR for each.
126
128
5 . For each sub-task, follow the [ trivial-changes guidelines above] ( #for-trivial-changes ) .
127
129
130
+ ### Update API doc
131
+
132
+ If you only modified APIs from services other than ` aslan ` , you could ignore this since we don't have API docs for them
133
+ yet. For ` aslan ` service, we use [ Swag] ( https://github.com/swaggo/swag ) to automatically generate API docs hosted by
134
+ [ Swagger] ( https://swagger.io/ ) based on the [ swag declarative API comments] ( https://github.com/swaggo/swag#declarative-comments-format ) .
135
+
136
+ So if you have added or modified any API on ` aslan ` service, please:
137
+
138
+ 1 . Document your API Handler following [ swag declarative API comments] ( https://github.com/swaggo/swag#declarative-comments-format ) .
139
+
140
+ 2 . Update the swagger API doc with the following command:
141
+
142
+ ``` bash
143
+ cd [your root path of Zadig-X]
144
+
145
+ swag init -d ./lib/microservice/aslan/ -g server/rest/router.go -o ./lib/microservice/aslan/server/rest/doc
146
+ ```
147
+
148
+ Check out [ Swag CLI] ( https://github.com/swaggo/swag#swag-cli ) for more details.
149
+
150
+ > Note: If your generated doc/docs.go contains "github.com/alecthomas/template" (used by early swag versions), please change it to "text/template".
151
+
152
+ 3 . Double check the generated API doc works as expected in your testing environment under path ` /api/aslan/apidocs/index.html ` .
153
+
128
154
## Contributor resources
129
155
130
156
### PR and commit guidelines
@@ -153,4 +179,5 @@ more information.
153
179
154
180
### More resources
155
181
156
- - [ Current maintainers] ( GOVERNANCE.md#maintainers )
182
+ - [ Current maintainers] ( GOVERNANCE.md#maintainers )
183
+ - [ API docs] ( https://os.koderover.com/api/spock/apidocs/index.html )
0 commit comments