Skip to content
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

feature request: unify _id and id fields #287

Open
QuantumToasted opened this issue Nov 17, 2023 · 0 comments
Open

feature request: unify _id and id fields #287

QuantumToasted opened this issue Nov 17, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@QuantumToasted
Copy link

What do you want to see?

Is it an internal implementation limitation that causes this discrepancy? It does seem like a deliberate design decision in certain case - root level "ID" keys on API models are almost always _id instead of id (while any nested objects or sub-objects use id instead). However this bothers me for two reasons: General inconsistency, but also how Bonfire events are documented.
Take the EmojiCreate event:
image
The "Emoji" model contains an _id key, so I assume the event would have the field serialized this way when sent over the websocket.
However, you see the EmojiDelete event right below it, and now the same identifying field is serialized as id instead.

It would be nice to unify their naming in one way or another. I am fine with _id everywhere, but consistency is the goal of this request.

@QuantumToasted QuantumToasted added the enhancement New feature or request label Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: 💬 Needs Discussion
Development

No branches or pull requests

1 participant