Skip to content

Example PR reivew#2

Open
quocbao19982009 wants to merge 7 commits into
mainfrom
thesis/room-booking-feature
Open

Example PR reivew#2
quocbao19982009 wants to merge 7 commits into
mainfrom
thesis/room-booking-feature

Conversation

@quocbao19982009

Copy link
Copy Markdown
Owner

Summary

Test Plan

Checklist

  • Backend builds (dotnet build)
  • Frontend lints (npm run lint) and type-checks (npx tsc --noEmit -p tsconfig.app.json)
  • Feature spec updated (if behavior changed)
  • Translations updated in both en.json and fi.json (if UI text changed)

Bao Nguyen added 7 commits March 20, 2026 14:08
Add a CamelCaseQueryParameterFilter to rewrite query parameter names to camelCase in the generated OpenAPI spec and register it with Swagger. Configure controllers to use System.Text.Json camelCase naming for properties and dictionary keys so API payloads are consistently camelCase. Fix frontend assetUrl to ensure a slash separates API base URL and the relative path. Changed files: added Backend.Common.Swagger.CamelCaseQueryParameterFilter, updated backend Program.cs, and updated frontend/src/lib/utils.ts.
Rename API query parameters from PascalCase to camelCase across swagger and generated client types (page, pageSize, roomId, fromDate, toDate, search, locationId, sortBy, sortDir). Update generated zod schemas and model types to match. Replace manual API base URL concatenation with assetUrl helper in room form and rooms table. Add frontend typecheck script to package.json and include a new room image upload asset. Miscellaneous UI/formatting tweaks in the rooms calendar (layout/spacing, reduce pageSize to 100, adjust query options). These changes align parameter naming and asset handling between backend and frontend.
Replace local inline Zod schemas in room and booking form dialogs with generated PostApi*Body-based schemas and wire up i18n validation messages. Add imports for PostApiRoomsBody and PostApiBookingsBody, infer form value types from the extended schemas, and keep the same refinement for start/end times. Also change a query param fallback to undefined in rooms calendar and add corresponding validation message keys to en.json and fi.json.
Switch frontend TypeScript checks to the project tsconfig (tsconfig.app.json) across docs, CI/skill definitions and PR template. Add a convenient "typecheck" npm script in frontend/package.json that runs npx tsc --noEmit -p tsconfig.app.json. Also add frontend form validation guidance (Zod v4 notes, .extend() usage and cross-field .refine()) to feature-generation docs, update the workflow visual to reflect the new typecheck command, and expand .claude/settings.local.json permissions (mode: bypassPermissions) to allow local tooling commands. Minor PR template formatting/whitespace adjustments included.
Add src/api/generated/** to ESLint global ignores to avoid linting generated API client code. Update package.json format scripts to run Prettier only on ./src (format and format:check) to prevent formatting generated or unrelated files.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Example: This is not correct, double check this

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.

1 participant