Skip to content

Commit

Permalink
Merge pull request #84 from dimovnike/83-objectid-hex
Browse files Browse the repository at this point in the history
issue-83: ObjectId.String() breaks swagger validation and CLI
  • Loading branch information
casualjim committed Aug 19, 2021
2 parents ac88b91 + f9b2b7b commit 583b813
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bson.go
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 583b813

Please sign in to comment.