From 337c6394578057f0d69da1372ed861b85ad93131 Mon Sep 17 00:00:00 2001 From: McKayla Washburn Date: Mon, 7 Apr 2025 19:11:15 +0000 Subject: [PATCH 1/2] chore: fix swagger type of AuditLog AdditionalFields --- codersdk/audit.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codersdk/audit.go b/codersdk/audit.go index 1df5bd2d10e2c..12a35904a8af4 100644 --- a/codersdk/audit.go +++ b/codersdk/audit.go @@ -171,7 +171,7 @@ type AuditLog struct { Action AuditAction `json:"action"` Diff AuditDiff `json:"diff"` StatusCode int32 `json:"status_code"` - AdditionalFields json.RawMessage `json:"additional_fields"` + AdditionalFields json.RawMessage `json:"additional_fields" swaggertype:"object"` Description string `json:"description"` ResourceLink string `json:"resource_link"` IsDeleted bool `json:"is_deleted"` From d41b89c79dcfb26dca719e1068302eaf761038c1 Mon Sep 17 00:00:00 2001 From: McKayla Washburn Date: Mon, 7 Apr 2025 19:17:38 +0000 Subject: [PATCH 2/2] gen --- coderd/apidoc/docs.go | 5 +---- coderd/apidoc/swagger.json | 5 +---- docs/reference/api/audit.md | 4 +--- docs/reference/api/schemas.md | 10 +++------- 4 files changed, 6 insertions(+), 18 deletions(-) diff --git a/coderd/apidoc/docs.go b/coderd/apidoc/docs.go index acd93fc7180cf..d4dfb80cd13b5 100644 --- a/coderd/apidoc/docs.go +++ b/coderd/apidoc/docs.go @@ -10734,10 +10734,7 @@ const docTemplate = `{ "$ref": "#/definitions/codersdk.AuditAction" }, "additional_fields": { - "type": "array", - "items": { - "type": "integer" - } + "type": "object" }, "description": { "type": "string" diff --git a/coderd/apidoc/swagger.json b/coderd/apidoc/swagger.json index 622c3865e0a6e..7e28bf764d9e7 100644 --- a/coderd/apidoc/swagger.json +++ b/coderd/apidoc/swagger.json @@ -9543,10 +9543,7 @@ "$ref": "#/definitions/codersdk.AuditAction" }, "additional_fields": { - "type": "array", - "items": { - "type": "integer" - } + "type": "object" }, "description": { "type": "string" diff --git a/docs/reference/api/audit.md b/docs/reference/api/audit.md index 3fc6e746f17c8..c717a75d51e54 100644 --- a/docs/reference/api/audit.md +++ b/docs/reference/api/audit.md @@ -30,9 +30,7 @@ curl -X GET http://coder-server:8080/api/v2/audit?limit=0 \ "audit_logs": [ { "action": "create", - "additional_fields": [ - 0 - ], + "additional_fields": {}, "description": "string", "diff": { "property1": { diff --git a/docs/reference/api/schemas.md b/docs/reference/api/schemas.md index fa9604cff6c9b..35f9f61f7c640 100644 --- a/docs/reference/api/schemas.md +++ b/docs/reference/api/schemas.md @@ -629,9 +629,7 @@ ```json { "action": "create", - "additional_fields": [ - 0 - ], + "additional_fields": {}, "description": "string", "diff": { "property1": { @@ -695,7 +693,7 @@ | Name | Type | Required | Restrictions | Description | |---------------------|--------------------------------------------------------------|----------|--------------|----------------------------------------------| | `action` | [codersdk.AuditAction](#codersdkauditaction) | false | | | -| `additional_fields` | array of integer | false | | | +| `additional_fields` | object | false | | | | `description` | string | false | | | | `diff` | [codersdk.AuditDiff](#codersdkauditdiff) | false | | | | `id` | string | false | | | @@ -721,9 +719,7 @@ "audit_logs": [ { "action": "create", - "additional_fields": [ - 0 - ], + "additional_fields": {}, "description": "string", "diff": { "property1": { pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy