Skip to content

Commit

Permalink
docs: document projects query parameter as optional (resolve muety#653)
Browse files Browse the repository at this point in the history
  • Loading branch information
muety committed Jul 6, 2024
1 parent 89550ee commit afe8634
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion routes/compat/wakatime/v1/projects.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func (h *ProjectsHandler) RegisterRoutes(router chi.Router) {
// @Tags wakatime
// @Produce json
// @Param user path string true "User ID to fetch data for (or 'current')"
// @Param q query string true "Query to filter projects by"
// @Param q query string false "Query to filter projects by"
// @Security ApiKeyAuth
// @Success 200 {object} v1.ProjectsViewModel
// @Router /compat/wakatime/v1/users/{user}/projects [get]
Expand Down
3 changes: 1 addition & 2 deletions static/docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,7 @@ const docTemplate = `{
"type": "string",
"description": "Query to filter projects by",
"name": "q",
"in": "query",
"required": true
"in": "query"
}
],
"responses": {
Expand Down
3 changes: 1 addition & 2 deletions static/docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -326,8 +326,7 @@
"type": "string",
"description": "Query to filter projects by",
"name": "q",
"in": "query",
"required": true
"in": "query"
}
],
"responses": {
Expand Down
1 change: 0 additions & 1 deletion static/docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,6 @@ paths:
- description: Query to filter projects by
in: query
name: q
required: true
type: string
produces:
- application/json
Expand Down

0 comments on commit afe8634

Please sign in to comment.