You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now that we have /api/health, we'll be adding more endpoints soon. What convention should we standardize on — plural nouns for resources (/api/users), versioning (/api/v1/...), casing (kebab vs camelCase in paths), etc.? Looking for a concrete recommendation we can put in the README.
Recommendation: /api/v1/{plural-resource} with kebab-case for multi-word paths, e.g. /api/v1/order-items. Reasoning: plural nouns keep REST semantics consistent (collection vs. item), v1 prefix lets us version without breaking existing clients later, and kebab-case avoids ambiguity in URLs (camelCase/underscores are inconsistent across HTTP tooling and less readable in a URL bar). Query params and JSON body fields can stay camelCase since those follow JS/JSON conventions, not URL conventions.
Recommendation: /api/v1/{plural-resource} with kebab-case for multi-word paths, e.g. /api/v1/order-items. Reasoning: plural nouns keep REST semantics consistent (collection vs. item), v1 prefix lets us version without breaking existing clients later, and kebab-case avoids ambiguity in URLs (camelCase/underscores are inconsistent across HTTP tooling and less readable in a URL bar). Query params and JSON body fields can stay camelCase since those follow JS/JSON conventions, not URL conventions.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Recommendation:
/api/v1/{plural-resource}with kebab-case for multi-word paths, e.g./api/v1/order-items. Reasoning: plural nouns keep REST semantics consistent (collection vs. item),v1prefix lets us version without breaking existing clients later, and kebab-case avoids ambiguity in URLs (camelCase/underscores are inconsistent across HTTP tooling and less readable in a URL bar). Query params and JSON body fields can stay camelCase since those follow JS/JSON conventions, not URL conventions.