Conversation
hiroTamada
commented
Oct 8, 2025
| description: The request body for the API call. | ||
|
|
||
| BatchResponse: | ||
| BatchItem: |
There was a problem hiding this comment.
Performed full review of aa0487f...e622f62
Analysis
- Build process lacks error handling for the oapi-codegen command, which may result in silent failures when the OpenAPI spec has validation issues
- Cleanup operations are inconsistent - the clean-client target only removes client.go while generate-client creates the entire lib/oapi directory structure
- The configuration file (oapi-codegen.client.yaml) would benefit from inline documentation explaining non-obvious choices like skip-prune: true
- Using skip-prune: true will generate larger client code by including unused types, which is a trade-off that should be evaluated for performance impact
Tip
⚡ Quick Actions
This review was generated by Mesa.
Actions:
Slash Commands:
/review- Request a full code review/review latest- Review only changes since the last review/describe- Generate PR description. This will update the PR body or issue comment depending on your configuration/help- Get help with Mesa commands and configuration options
5 files reviewed | 0 comments | Review on Mesa | Edit Reviewer Settings
Sayan-
approved these changes
Oct 8, 2025
Comment on lines
+13
to
+25
| generate-client: $(OAPI_CODEGEN) | ||
| @echo "Generating Go client from OpenAPI spec..." | ||
| mkdir -p lib/oapi | ||
| $(OAPI_CODEGEN) -config oapi-codegen.client.yaml openapi.yaml | ||
| @echo "Formatting generated code..." | ||
| go fmt ./lib/oapi/... | ||
| @echo "Client generated at ./lib/oapi/" | ||
|
|
||
| install-tools: $(OAPI_CODEGEN) | ||
| @echo "Tools installed to $(BIN_DIR)" | ||
|
|
||
| clean-client: | ||
| rm -rf lib/oapi/client.go |
Collaborator
There was a problem hiding this comment.
nit - I'd just call these {generate, install, clean} but ndb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TL;DR
Introduced a generated Go client for the project's OpenAPI specification using
oapi-codegen.Why we made these changes
To provide a type-safe, maintainable, and auto-generated way to interact with our API from internal Go services. This eliminates the need to write and maintain a manual HTTP client, reducing boilerplate and potential for bugs.
What changed?
server/lib/oapi/.oapi-codegen.client.yamlto configure the code generation process.server/Makefilewith agenerate-clienttarget to automate client generation.go.modandgo.sumto include the new code generation dependencies.Validation
make generate-clientcommand successfully generates the client code without errors.Description generated by Mesa. Update settings