Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbf98b0d

Browse files
authored
fix: correct swagger description for Insights API (#13442)
1 parentb723da9 commitbf98b0d

File tree

4 files changed

+177
-46
lines changed

4 files changed

+177
-46
lines changed

‎coderd/apidoc/docs.go

Lines changed: 68 additions & 12 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎coderd/apidoc/swagger.json

Lines changed: 65 additions & 12 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎coderd/insights.go

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ const insightsTimeLayout = time.RFC3339
3030
// @Security CoderSessionToken
3131
// @Produce json
3232
// @Tags Insights
33+
// @Param tz_offset query int true "Time-zone offset (e.g. -2)"
3334
// @Success 200 {object} codersdk.DAUsResponse
3435
// @Router /insights/daus [get]
3536
func (api*API)deploymentDAUs(rw http.ResponseWriter,r*http.Request) {
@@ -100,8 +101,9 @@ func (api *API) returnDAUsInternal(rw http.ResponseWriter, r *http.Request, temp
100101
// @Security CoderSessionToken
101102
// @Produce json
102103
// @Tags Insights
103-
// @Param before query int true "Start time"
104-
// @Param after query int true "End time"
104+
// @Param start_time query string true "Start time" format(date-time)
105+
// @Param end_time query string true "End time" format(date-time)
106+
// @Param template_ids query []string false "Template IDs" collectionFormat(csv)
105107
// @Success 200 {object} codersdk.UserActivityInsightsResponse
106108
// @Router /insights/user-activity [get]
107109
func (api*API)insightsUserActivity(rw http.ResponseWriter,r*http.Request) {
@@ -202,8 +204,9 @@ func (api *API) insightsUserActivity(rw http.ResponseWriter, r *http.Request) {
202204
// @Security CoderSessionToken
203205
// @Produce json
204206
// @Tags Insights
205-
// @Param before query int true "Start time"
206-
// @Param after query int true "End time"
207+
// @Param start_time query string true "Start time" format(date-time)
208+
// @Param end_time query string true "End time" format(date-time)
209+
// @Param template_ids query []string false "Template IDs" collectionFormat(csv)
207210
// @Success 200 {object} codersdk.UserLatencyInsightsResponse
208211
// @Router /insights/user-latency [get]
209212
func (api*API)insightsUserLatency(rw http.ResponseWriter,r*http.Request) {
@@ -294,8 +297,10 @@ func (api *API) insightsUserLatency(rw http.ResponseWriter, r *http.Request) {
294297
// @Security CoderSessionToken
295298
// @Produce json
296299
// @Tags Insights
297-
// @Param before query int true "Start time"
298-
// @Param after query int true "End time"
300+
// @Param start_time query string true "Start time" format(date-time)
301+
// @Param end_time query string true "End time" format(date-time)
302+
// @Param interval query string true "Interval" enums(week,day)
303+
// @Param template_ids query []string false "Template IDs" collectionFormat(csv)
299304
// @Success 200 {object} codersdk.TemplateInsightsResponse
300305
// @Router /insights/templates [get]
301306
func (api*API)insightsTemplates(rw http.ResponseWriter,r*http.Request) {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp