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

Emit json tags for sqlc generated structs #341

Merged
merged 1 commit into from
Jan 17, 2025
Merged

Conversation

juancwu
Copy link
Contributor

@juancwu juancwu commented Jan 17, 2025

Description

Emit json tags for the generate structs by sqlc. Make all the responses that use the structs directly follow the naming scheme for json fields (using underscore).

Linked Issues

Checklist

Before opening this PR, make sure the PR:

  • Has an assignee or group of assignees.
  • Has a reviewer or a group of reviewers.
  • Is labelled properly.
  • Has the SPUR project assigned to it.
  • Has an assigned milestone.

Additionally, make sure that:

  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • Any dependent changes have been merged and published in downstream modules.

@juancwu juancwu added enhancement New feature or request backend Related to the backend of the project api Related to the backend routes and endpoints db Related to the PostgreSQL database labels Jan 17, 2025
@juancwu juancwu added this to the Complete the project MVP milestone Jan 17, 2025
@juancwu juancwu self-assigned this Jan 17, 2025
@juancwu juancwu linked an issue Jan 17, 2025 that may be closed by this pull request
4 tasks
Copy link
Member

@aidantrabs aidantrabs left a comment

Choose a reason for hiding this comment

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

lgtm

@juancwu juancwu merged commit 6ed14e1 into main Jan 17, 2025
4 checks passed
@juancwu juancwu deleted the feat/340/emit-json-tags branch January 17, 2025 02:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Related to the backend routes and endpoints backend Related to the backend of the project db Related to the PostgreSQL database enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[BE Feat] Add json tag to sqlc generated structs
2 participants