Commit 4b60af7
fix: Address valid Gemini Code Assist feedback
Fixes 4 valid issues identified in PR #8 code review:
1. HIGH PRIORITY - Fixed constant re-assignment in couchbase.rb
- Changed DB_USERNAME, DB_PASSWORD, DB_CONN_STR to local variables
- Eliminates Ruby "already initialized constant" warnings
- Constants at top of file remain for CI environment
- Local variables used only in dev environment
2. Fixed rswag spec grammar (line 5)
- Changed "Retrieve suggestion" → "Retrieve suggestions"
- Matches plural array return type
3. Fixed misleading response description (line 22)
- Changed "No suggestion" → "List of hotel name suggestions"
- 200 status should describe success case, not edge case
4. Fixed incorrect response descriptions (lines 73 & 93)
- Changed "only one Hotels found" → "List of hotels matching the filter criteria"
- Fixed grammar and made description generic for filter endpoint
Note: Rejected Gemini's metaprogramming suggestion for search index
assignment as it adds unnecessary complexity without benefit.
Regenerated swagger.yaml from updated rswag specs.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent 8d0b810 commit 4b60af7
File tree
3 files changed
+13
-13
lines changed- config/initializers
- spec/requests/api/v1
- swagger/v1
3 files changed
+13
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
34 | | - | |
| 33 | + | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
| 73 | + | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
| 93 | + | |
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
443 | 443 | | |
444 | 444 | | |
445 | 445 | | |
446 | | - | |
| 446 | + | |
447 | 447 | | |
448 | 448 | | |
449 | 449 | | |
| |||
454 | 454 | | |
455 | 455 | | |
456 | 456 | | |
457 | | - | |
| 457 | + | |
458 | 458 | | |
459 | 459 | | |
460 | 460 | | |
| |||
469 | 469 | | |
470 | 470 | | |
471 | 471 | | |
472 | | - | |
| 472 | + | |
473 | 473 | | |
474 | 474 | | |
475 | 475 | | |
| |||
0 commit comments