ObjectId.String() breaks swagger validation and CLI
dimovnike opened this issue · comments
dimovnike commented
Function ObjectId.String() at
Line 98 in ac88b91
bsonprim.ObjectID(id).Hex()
instead of string. The current version breaks swagger validation and CLI generation.
For swagger validation problems please see this issue: go-swagger/go-swagger#2616 (comment)
As for CLI - it sends values in the form of ObjectID("value") to server.
(NOTE: CLI doesn't support ObjectId yet but I tried to implement it and hit this problem)
Changing the String() function as suggested by @youyuanwu the issue above will solve both cases.