CLI(typebox): Type Singular name #2969
Replies: 3 comments 1 reply
-
I've been trying to leave the naming to the end user. In this case if you pick |
Beta Was this translation helpful? Give feedback.
-
Ok, I oversaw that 🤦♂️ But in export const services = (app: Application) => {
app.configure(messages)
app.configure(user)
// All services will be registered here
} At least that was my understanding of feathers v4:
What do you think about that? So in my head (and I remember it was the case in the old cli) the Don't get me wrong, this is such a tiny detail which anyone can easily change. But I think it's worth to think about the convention. What do you think about adding another question? For example:
|
Beta Was this translation helpful? Give feedback.
-
Next question: naming-convention for the services folder and containing files? It's |
Beta Was this translation helpful? Give feedback.
-
See the two typebox schemas generated by the cli. On the left, it's a 'custom'
messages
service that I created withfeathers g service
. On the right it's the defaultusers
service that got created byfeathers g app
:See the difference between the namings. In almost every variable name it's plural (left) vs. singular (right):
messagesSchema
vsuserSchema
$id: 'Messages'
(plural) vs.$id: 'User'
(singular)export type Messages
vs.export type User
messagesResolver
...We should make it singular by default, right? Popular solutions:
Beta Was this translation helpful? Give feedback.
All reactions