generated from edwinhern/express-typescript
-
Notifications
You must be signed in to change notification settings - Fork 0
[skip ci] Front integration #1
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
Open
lucioserra
wants to merge
8
commits into
master
Choose a base branch
from
front-integration
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
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
- Update PetSchema to use nested lookup objects (species, sex, status, size) - Add Zod schemas for lookup objects (PetSpeciesSchema, SexSchema, etc.) - Modify petRepository queries to join lookup tables - Update findAllAsync, findByIdAsync, createAsync, updateAsync, archiveAsync - Maintain consistent pattern with existing colors implementation
- Change LEFT JOIN to INNER JOIN for pet_species, sexes, pet_statuses, pet_sizes - These are required foreign keys, so INNER JOIN prevents null values - Fixes TypeScript compilation errors
- Add export:openapi script to package.json - Create script to export OpenAPI specification to JSON file - Enables frontend type generation from backend spec
## Lookup API Endpoints - Add GET /lookups/pet-species - Fetch all pet species - Add GET /lookups/sexes - Fetch all sexes - Add GET /lookups/pet-statuses - Fetch all pet statuses - Add GET /lookups/pet-sizes - Fetch all pet sizes - Add GET /lookups/pet-colors - Fetch all pet colors ## Implementation - Create lookup controller, service, repository, and models - Mount lookup router at /lookups endpoint - Register lookup endpoints in OpenAPI specification - All endpoints return dynamic data from database lookup tables ## Documentation - Fix external docs URL in OpenAPI spec (/swagger.json → /api-docs/swagger.json) - Add lookup schemas to OpenAPI registry ## Code Quality - Fix unused variable warning in seed.ts - Remove unused import in healthCheck test These endpoints provide dynamic dropdown data for the frontend, complementing the type-safe API integration. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Change ServiceResponse.failure to return empty arrays instead of null to match the expected return type. - getPetSpecies: null → [] - getSexes: null → [] - getPetStatuses: null → [] - getPetSizes: null → [] - getPetColors: null → [] This fixes CI build failures while maintaining correct error handling. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Major API refactoring: - Renamed `responseObject` to `data` globally across all endpoints - Simplified pet list/detail responses to return strings instead of nested objects - Added photo integration with S3 signed URLs (profile + all photos) - Integrated events and vaccinations into pet detail response - Maintained numeric pet IDs while removing lookup ID exposure - Updated all tests to reflect new response structure Changes affect: - ServiceResponse class and all API responses - Pet schemas: PetListItemSchema, PetDetailResponseSchema - Pet repository: findAllForListAsync, findByIdForDetailAsync - Pet service: S3 URL generation for photos - All middleware and service tests All 48 tests passing ✅ 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Fixed all Biome linting issues to pass CI checks: - Fixed unused error variable in petRepository (prepended with _) - Changed clientConfig from `any` to proper S3ClientConfig type - Changed error types from `any` to `unknown` with proper type guards - Added biome-ignore comments for necessary test mocks - Fixed migration types to use `Kysely<unknown>` instead of `Kysely<any>` - Updated logger.error call to handle unknown error type safely All checks now passing: - ✅ Biome linting (0 errors, 0 warnings) - ✅ TypeScript compilation - ✅ All 48 tests passing - ✅ Build successful 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Disabled rate limiting for local development to prevent "Too many requests" errors during development and testing. Changes: - Added `skip: () => env.isDevelopment` to rate limiter config - Rate limiting still active in production (NODE_ENV=production) - Removed unused imports (Response, NextFunction) Previous behavior: - 20 requests per 15 minutes (too restrictive for dev) - Caused 429 errors during rapid testing/development New behavior: - Development: Unlimited requests (rate limiting skipped) - Production: 20 requests per 15 minutes (unchanged) Tested with 25 rapid requests - all returned 200 ✅ All tests passing ✅ 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
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.
No description provided.