Skip to content

Commit 1a768e5

Browse files
authored
[Docs] fix typos and reference to structs package (#13856)
1 parent d8c2c6c commit 1a768e5

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
@@ -158,7 +158,7 @@ import (
158158
To maintain understandable code and avoid circular dependencies it is important to have a good structure of the code. The gitea code is divided into the following parts:
159159

160160
- **integration:** Integrations tests
161-
- **models:** Contains the data structures used by xorm to construct database tables. It also contains supporting functions to query and update the database. Dependecies to other code in Gitea should be avoided although some modules might be needed (for example for logging).
161+
- **models:** Contains the data structures used by xorm to construct database tables. It also contains supporting functions to query and update the database. Dependencies to other code in Gitea should be avoided although some modules might be needed (for example for logging).
162162
- **models/fixtures:** Sample model data used in integration tests.
163163
- **models/migrations:** Handling of database migrations between versions. PRs that changes a database structure shall also have a migration step.
164164
- **modules:** Different modules to handle specific functionality in Gitea.
@@ -181,16 +181,16 @@ The same applies to status responses. If you notice a problem, feel free to leav
181181
All expected results (errors, success, fail messages) should be documented
182182
([example](https://github.com/go-gitea/gitea/blob/c620eb5b2d0d874da68ebd734d3864c5224f71f7/routers/api/v1/repo/issue.go#L319-L327)).
183183

184-
All JSON input types must be defined as a struct in `models/structs/`
184+
All JSON input types must be defined as a struct in [modules/structs/](modules/structs/)
185185
([example](https://github.com/go-gitea/gitea/blob/c620eb5b2d0d874da68ebd734d3864c5224f71f7/modules/structs/issue.go#L76-L91))
186186
and referenced in
187187
[routers/api/v1/swagger/options.go](https://github.com/go-gitea/gitea/blob/c620eb5b2d0d874da68ebd734d3864c5224f71f7/routers/api/v1/swagger/options.go).
188188
They can then be used like the following:
189189
([example](https://github.com/go-gitea/gitea/blob/c620eb5b2d0d874da68ebd734d3864c5224f71f7/routers/api/v1/repo/issue.go#L318)).
190190

191-
All JSON responses must be defined as a struct in `models/structs/`
191+
All JSON responses must be defined as a struct in [modules/structs/](modules/structs/)
192192
([example](https://github.com/go-gitea/gitea/blob/c620eb5b2d0d874da68ebd734d3864c5224f71f7/modules/structs/issue.go#L36-L68))
193-
and referenced in its category in `routers/api/v1/swagger/`
193+
and referenced in its category in [routers/api/v1/swagger/](routers/api/v1/swagger/)
194194
([example](https://github.com/go-gitea/gitea/blob/c620eb5b2d0d874da68ebd734d3864c5224f71f7/routers/api/v1/swagger/issue.go#L11-L16))
195195
They can be used like the following:
196196
([example](https://github.com/go-gitea/gitea/blob/c620eb5b2d0d874da68ebd734d3864c5224f71f7/routers/api/v1/repo/issue.go#L277-L279))
@@ -199,7 +199,7 @@ In general, HTTP methods are chosen as follows:
199199
* **GET** endpoints return requested object and status **OK (200)**
200200
* **DELETE** endpoints return status **No Content (204)**
201201
* **POST** endpoints return status **Created (201)**, used to **create** new objects (e.g. a User)
202-
* **PUT** endpoints return status **No Content (204)**, used to **add/assign** existing Obejcts (e.g. User) to something (e.g. Org-Team)
202+
* **PUT** endpoints return status **No Content (204)**, used to **add/assign** existing Objects (e.g. User) to something (e.g. Org-Team)
203203
* **PATCH** endpoints return changed object and status **OK (200)**, used to **edit/change** an existing object
204204

205205

0 commit comments

Comments
 (0)