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

1-1-1 Best Practice #215

Open
git-torrent opened this issue Jan 9, 2025 · 2 comments
Open

1-1-1 Best Practice #215

git-torrent opened this issue Jan 9, 2025 · 2 comments

Comments

@git-torrent
Copy link

git-torrent commented Jan 9, 2025

Your example shows

message StudentID {
  string value = 1;
}

Later on subsequent example:

message Student {
  StudentId id = 1;
  FullName name = 2;
}

Where StudentID suddenly changes to StudenId.

I guess the correct one is StudentId, because it is safe for various CamelCase to snake_case converters (including your own in JSON Formatter, e.g. C# FromJsonName) would produce student_id instead of student_i_d.

@git-torrent git-torrent closed this as not planned Won't fix, can't repro, duplicate, stale Jan 9, 2025
@git-torrent git-torrent reopened this Jan 9, 2025
@git-torrent
Copy link
Author

Later on

message GetStudentRequest {
  StudentID id = 1;
}

Should also be StudentId

@Logofile
Copy link
Member

Oh, good catch! I've submitted a code change for review by my teammate. The docs in this repo should be updated within the next week or two.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants