Skip to content

Swag adjustments and other tweaks #64

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

Merged
merged 8 commits into from
Jun 15, 2025
Merged

Swag adjustments and other tweaks #64

merged 8 commits into from
Jun 15, 2025

Conversation

TheJolman
Copy link
Collaborator

@TheJolman TheJolman commented Jun 13, 2025

This pr

  • adjusts the generation of swag docs
  • fixes some naming inconsistencies
  • a few other minor QOL changes

(this pr is smaller than it seems, most line diffs are from generated files)

@TheJolman TheJolman requested review from Copilot and sidvasu June 13, 2025 18:17
Copy link
Contributor

@Copilot 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 PR primarily adjusts the generation of Swagger documentation and fixes a few naming inconsistencies while introducing some minor quality-of-life improvements. Key changes include updates to the DB initialization logic (adding a closer function), revisions to API route definitions (using PUT for updates and consistent pluralized endpoints), and regenerated Swagger docs.

Reviewed Changes

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

Show a summary per file
File Description
internal/db/db.go Updated function signature to return a closer function alongside DB.
internal/api/routes/routes.go Revised route definitions with updated HTTP verbs and pluralized endpoints.
internal/api/handlers/*.go Modified Swagger annotations to reflect new routes and improved documentation.
go.mod Adjusted dependencies to support updated Swagger generation.
flake.nix Added go-swag to the list of shell dependencies.
docs/swagger.yaml Regenerated Swagger documentation with new model definitions and endpoints.
cmd/api/main.go Updated usage of db.New with the closer function and corrected Swagger info.
Comments suppressed due to low confidence (1)

docs/swagger.yaml:177

  • The GET announcement endpoint defines an 'id' path parameter but is declared under '/announcements'. Consider using '/announcements/{id}' to align the path with the parameter.
    get:

@sidvasu sidvasu merged commit 8384184 into main Jun 15, 2025
2 checks passed
Copy link
Contributor

@EthanThatOneKid EthanThatOneKid left a comment

Choose a reason for hiding this comment

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

Swagalicious 😎

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

Successfully merging this pull request may close these issues.

3 participants