-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace (or remove) id
field description
#79
Comments
Solution to hide this description described in #75 (comment) |
Bad news, it's not a solution.
|
My solution was specific to that issue. The user wanted to use their own strings for |
Replacing the default example is totally good to me.
Unfortunately, it's a bit linked. Since we perform ObjectId validation, passing an invalid id (like a non hex string) will raise a validation error. We can still remove the description since it's overriding everything right now though. |
Feature request
Context
Now the
id
field is printed in documents with information about the used database:MongoDB ObjectId string
I'm not sure if showing this information is a good idea.
What kind of database and what kind of identifier generation are used to store the data is not a client's business.
Solution
I suggest removing the description of the
id
field. This will hide unnecessary information from the user.Alternative solutions
It will also be great if
odmantic
will be able to specify a custom description and parameters forid
fieldAdditional context
It would also be great to make the example look more similar.
I.e. replace
ffffffffffffffffffffffff
with5f85f36d6dfecacc68428a46
The text was updated successfully, but these errors were encountered: