From f9b2b7bb293d66a7ac374c78bffedd8c06bf0629 Mon Sep 17 00:00:00 2001 From: Nick Dimov <3619341+dimovnike@users.noreply.github.com> Date: Sat, 14 Aug 2021 14:05:21 +0300 Subject: [PATCH] issue-83: ObjectId.String() breaks swagger validation and CLI Signed-off-by: Nick Dimov <3619341+dimovnike@users.noreply.github.com> --- bson.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bson.go b/bson.go index c149612..727647b 100644 --- a/bson.go +++ b/bson.go @@ -95,7 +95,7 @@ func (id ObjectId) Value() (driver.Value, error) { } func (id ObjectId) String() string { - return bsonprim.ObjectID(id).String() + return bsonprim.ObjectID(id).Hex() } // MarshalJSON returns the ObjectId as JSON