Skip to content

Fix inconsistent json naming#39

Merged
LightJack05 merged 2 commits intomainfrom
fix-inconsistent-json-naming
Feb 10, 2026
Merged

Fix inconsistent json naming#39
LightJack05 merged 2 commits intomainfrom
fix-inconsistent-json-naming

Conversation

@LightJack05
Copy link
Member

Closes #28

BREAKING CHANGE: Update to swagger api schema
@LightJack05 LightJack05 self-assigned this Feb 10, 2026
Copilot AI review requested due to automatic review settings February 10, 2026 17:26
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request fixes inconsistent JSON field naming in the userPatchBody struct by changing from camelCase to snake_case, ensuring consistency with other user-related structures (userBody and userGetResponse). The issue was identified in PR #27 where displayName and activityLevel used camelCase while all other user fields and API structures in the codebase use snake_case.

Changes:

  • Updated userPatchBody struct in patch.go to use snake_case for display_name and activity_level
  • Updated Swagger/OpenAPI documentation files to reflect the corrected field names

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
internal/handlers/userhandler/patch.go Changed JSON tags from camelCase (displayName, activityLevel) to snake_case (display_name, activity_level)
docs/swagger.yaml Updated OpenAPI schema to reflect snake_case field names
docs/swagger.json Updated OpenAPI schema to reflect snake_case field names
docs/docs.go Updated embedded OpenAPI schema to reflect snake_case field names

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@LightJack05 LightJack05 merged commit 2bbaac4 into main Feb 10, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants