Skip to content

Commit

Permalink
issue-83: ObjectId.String() breaks swagger validation and CLI
Browse files Browse the repository at this point in the history
Signed-off-by: Nick Dimov <3619341+dimovnike@users.noreply.github.com>
  • Loading branch information
dimovnike committed Aug 14, 2021
1 parent ac88b91 commit f9b2b7b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bson.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f9b2b7b

Please sign in to comment.