Skip to content

Commit dad0d54

Browse files
committed
add suggestions
thanks to @bagasme @techknowlogick @davidsvantesson
1 parent bbbac82 commit dad0d54

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

CONTRIBUTING.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ the same change, be it a bugfix or a feature addition.
9898

9999
The `vendor/` update needs to be justified as part of the PR description,
100100
and must be verified by the reviewers and/or merger to always reference
101-
an existing upstream commit.
101+
an existsing upstream commit.
102102

103103
You can find more information on how to get started with it on the [Modules Uncyclo](https://github.com/golang/go/wiki/Modules).
104104

@@ -180,19 +180,19 @@ To maintain understandable code and avoid circular dependencies it is important
180180
## API v1
181181

182182
The API is documented by [swagger](http://gitea.com/api/swagger) and is based on [GitHub API v3](https://developer.github.com/v3/).
183-
So if there exist a endpoint on GitHub API it should be the same for gitea. If GitHub dont provide a functionality Gitea does, a own endpoint can cover this. If a information is on Gitea but not on GitHub API a new field is used wich doesnt coldie with GitHub ones.
183+
Thus, Gitea´s API should use the same endpoints and fields as GitHub´s API as far as possible, unless there are good reasons to deviate. If GitHub doesn't provide...
184184

185185
All expected results (errors, success, fail messages) should be documented ([example](https://github.com/go-gitea/gitea/blob/master/routers/api/v1/repo/issue.go#L319-L327)).
186186

187-
All JSON input types must be defined as struct in `models/structs/` ([example](https://github.com/go-gitea/gitea/blob/master/modules/structs/issue.go#L76-L91)) and reverenced in [routers/api/v1/swagger/options.go](https://github.com/go-gitea/gitea/blob/master/routers/api/v1/swagger/options.go), they can be used then as follow: ([example](https://github.com/go-gitea/gitea/blob/master/routers/api/v1/repo/issue.go#L318)).
187+
All JSON input types must be defined as struct in `models/structs/` ([example](https://github.com/go-gitea/gitea/blob/master/modules/structs/issue.go#L76-L91)) and referenced in [routers/api/v1/swagger/options.go](https://github.com/go-gitea/gitea/blob/master/routers/api/v1/swagger/options.go), they can be used then as following: ([example](https://github.com/go-gitea/gitea/blob/master/routers/api/v1/repo/issue.go#L318)).
188188

189-
All JSON responces must be defined as struct in `models/structs/` ([example](https://github.com/go-gitea/gitea/blob/master/modules/structs/issue.go#L36-L68)) and reverenced in its category in `routers/api/v1/swagger/` ([example](https://github.com/go-gitea/gitea/blob/master/routers/api/v1/swagger/issue.go#L11-L16)), they can be used the as follow: ([example](https://github.com/go-gitea/gitea/blob/master/routers/api/v1/repo/issue.go#L277-L279))
189+
All JSON responses must be defined as struct in `models/structs/` ([example](https://github.com/go-gitea/gitea/blob/master/modules/structs/issue.go#L36-L68)) and referenced in its category in `routers/api/v1/swagger/` ([example](https://github.com/go-gitea/gitea/blob/master/routers/api/v1/swagger/issue.go#L11-L16)), they can be used as following: ([example](https://github.com/go-gitea/gitea/blob/master/routers/api/v1/repo/issue.go#L277-L279))
190190

191191
* GET endpoints return status `OK (200)`,
192192
* POST endpoints return status `Created (201)` and
193193
* DELETE endpoints return status `No Content (204)`
194194

195-
A endpoint wich change/edit a object expect all fields to be optional (expect ones to identify the object).
195+
An endpoint which changes/edits a object expects all fields to be optional (except ones to identify the object, which is required).
196196

197197

198198
## Developer Certificate of Origin (DCO)

0 commit comments

Comments
 (0)