From 5fa405782b60a6796a2e563182df93631ce35a41 Mon Sep 17 00:00:00 2001 From: Dmitry Ng <19asdek91@gmail.com> Date: Mon, 3 Aug 2026 14:49:51 +0300 Subject: [PATCH] fix(docs): remove maxLength constraint for password fields in API documentation - Updated the API documentation in `docs.go`, `swagger.json`, and `swagger.yaml` to remove the maxLength constraint for password fields, simplifying the validation requirements. - Added `github.com/docker/go-units` as a direct dependency in `go.mod` to support updated functionality. --- backend/go.mod | 2 +- backend/pkg/server/docs/docs.go | 6 ++---- backend/pkg/server/docs/swagger.json | 8 +++----- backend/pkg/server/docs/swagger.yaml | 2 -- 4 files changed, 6 insertions(+), 12 deletions(-) diff --git a/backend/go.mod b/backend/go.mod index b34c16b1..d0e27329 100644 --- a/backend/go.mod +++ b/backend/go.mod @@ -22,6 +22,7 @@ require ( github.com/digitalocean/go-smbios v0.0.0-20180907143718-390a4f403a8e github.com/docker/docker v28.3.3+incompatible github.com/docker/go-connections v0.5.0 + github.com/docker/go-units v0.5.0 github.com/fatih/color v1.17.0 github.com/gin-contrib/cors v1.7.2 github.com/gin-contrib/sessions v1.0.1 @@ -126,7 +127,6 @@ require ( github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/distribution/reference v0.6.0 // indirect github.com/dlclark/regexp2 v1.11.4 // indirect - github.com/docker/go-units v0.5.0 // indirect github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/gabriel-vasile/mimetype v1.4.9 // indirect diff --git a/backend/pkg/server/docs/docs.go b/backend/pkg/server/docs/docs.go index c8b1e29b..b357f563 100644 --- a/backend/pkg/server/docs/docs.go +++ b/backend/pkg/server/docs/docs.go @@ -9217,8 +9217,7 @@ const docTemplate = `{ "minLength": 5 }, "password": { - "type": "string", - "maxLength": 100 + "type": "string" } } }, @@ -10107,8 +10106,7 @@ const docTemplate = `{ "maxLength": 70 }, "password": { - "type": "string", - "maxLength": 100 + "type": "string" }, "password_change_required": { "type": "boolean" diff --git a/backend/pkg/server/docs/swagger.json b/backend/pkg/server/docs/swagger.json index bbd77b86..598e31f2 100644 --- a/backend/pkg/server/docs/swagger.json +++ b/backend/pkg/server/docs/swagger.json @@ -9209,8 +9209,7 @@ "minLength": 5 }, "password": { - "type": "string", - "maxLength": 100 + "type": "string" } } }, @@ -10099,8 +10098,7 @@ "maxLength": 70 }, "password": { - "type": "string", - "maxLength": 100 + "type": "string" }, "password_change_required": { "type": "boolean" @@ -10640,4 +10638,4 @@ "in": "header" } } -} +} \ No newline at end of file diff --git a/backend/pkg/server/docs/swagger.yaml b/backend/pkg/server/docs/swagger.yaml index 762edd91..f28b861f 100644 --- a/backend/pkg/server/docs/swagger.yaml +++ b/backend/pkg/server/docs/swagger.yaml @@ -1067,7 +1067,6 @@ definitions: minLength: 5 type: string password: - maxLength: 100 type: string required: - current_password @@ -1691,7 +1690,6 @@ definitions: maxLength: 70 type: string password: - maxLength: 100 type: string password_change_required: type: boolean