From 6ed69005b5c2cbd09a8836b39cf744d717698d1f Mon Sep 17 00:00:00 2001 From: John O'Keefe Date: Thu, 29 Jan 2026 10:06:00 -0500 Subject: [PATCH] refactor(bruno): standardize all variables to snake_case naming convention MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Standardize all Bruno environment variables to use snake_case convention (aligned with Go naming practices) and remove duplicate camelCase variants. Changes: - Environment file cleanup: - Remove: baseUrl, ebookid, fakebookid, libraryId, mediaItemId, isVisible, refreshToken - Standardize: fakebookid → fake_book_id, isVisible → is_visible, refreshToken → refresh_token - All variables now use consistent snake_case format - Update all Bruno requests to use standardized variables: - ebooks: {{ebookid}} → {{ebook_id}} - library: {{libraryId}} → {{library_id}} - media-items: {{mediaItemId}} → {{media_item_id}} - visibility: {{isVisible}} → {{is_visible}} - auth: {{refreshToken}} → {{refresh_token}} Benefits: - Single source of truth for each variable - Consistent with Go naming conventions - No ambiguity about which variable name to use - Cleaner, more maintainable codebase --- bruno/ebooks/Create-Update Ebook Rating.bru | 2 +- bruno/ebooks/Delete Ebook Rating.bru | 2 +- bruno/ebooks/Get Ebook Rating.bru | 2 +- bruno/ebooks/Get Ebook Ratings.bru | 2 +- bruno/ebooks/Get Ebook.bru | 2 +- bruno/environments/Bookmann.bru | 13 ++++--------- bruno/library/Add Library Folder.bru | 2 +- bruno/library/Get Library Folders.bru | 2 +- bruno/library/Set Library Visibility.bru | 4 ++-- bruno/media-items/Create Media Rating.bru | 2 +- bruno/media-items/Get Media Item.bru | 2 +- bruno/media-items/List Media Items.bru | 2 +- bruno/progress/Get Reading Progress.bru | 2 +- bruno/progress/Update Reading Progress.bru | 2 +- bruno/user/auth/Logout User.bru | 14 +++++++------- bruno/user/auth/Refresh Token.bru | 14 +++++++------- 16 files changed, 32 insertions(+), 37 deletions(-) diff --git a/bruno/ebooks/Create-Update Ebook Rating.bru b/bruno/ebooks/Create-Update Ebook Rating.bru index 051496a..ec55b62 100644 --- a/bruno/ebooks/Create-Update Ebook Rating.bru +++ b/bruno/ebooks/Create-Update Ebook Rating.bru @@ -5,7 +5,7 @@ meta { } post { - url: {{base_url}}/api/ebooks/{{ebookid}}/rating + url: {{base_url}}/api/ebooks/{{ebook_id}}/rating body: json auth: inherit } diff --git a/bruno/ebooks/Delete Ebook Rating.bru b/bruno/ebooks/Delete Ebook Rating.bru index 578a832..8ba58c2 100644 --- a/bruno/ebooks/Delete Ebook Rating.bru +++ b/bruno/ebooks/Delete Ebook Rating.bru @@ -5,7 +5,7 @@ meta { } delete { - url: {{base_url}}/api/ebooks/{{ebookid}}/rating + url: {{base_url}}/api/ebooks/{{ebook_id}}/rating body: none auth: inherit } diff --git a/bruno/ebooks/Get Ebook Rating.bru b/bruno/ebooks/Get Ebook Rating.bru index 09a9d14..bd49c7d 100644 --- a/bruno/ebooks/Get Ebook Rating.bru +++ b/bruno/ebooks/Get Ebook Rating.bru @@ -5,7 +5,7 @@ meta { } get { - url: {{base_url}}/api/ebooks/{{ebookid}}/rating + url: {{base_url}}/api/ebooks/{{ebook_id}}/rating body: none auth: inherit } diff --git a/bruno/ebooks/Get Ebook Ratings.bru b/bruno/ebooks/Get Ebook Ratings.bru index d4a0c56..b0ae7fe 100644 --- a/bruno/ebooks/Get Ebook Ratings.bru +++ b/bruno/ebooks/Get Ebook Ratings.bru @@ -5,7 +5,7 @@ meta { } get { - url: {{base_url}}/api/ebooks/{{ebookid}}/ratings + url: {{base_url}}/api/ebooks/{{ebook_id}}/ratings body: none auth: inherit } diff --git a/bruno/ebooks/Get Ebook.bru b/bruno/ebooks/Get Ebook.bru index 3e9275e..c92eb87 100644 --- a/bruno/ebooks/Get Ebook.bru +++ b/bruno/ebooks/Get Ebook.bru @@ -5,7 +5,7 @@ meta { } get { - url: {{base_url}}/api/ebooks/{{ebookid}} + url: {{base_url}}/api/ebooks/{{ebook_id}} body: none auth: inherit } diff --git a/bruno/environments/Bookmann.bru b/bruno/environments/Bookmann.bru index 431a438..483612b 100644 --- a/bruno/environments/Bookmann.bru +++ b/bruno/environments/Bookmann.bru @@ -1,22 +1,17 @@ vars { base_url: http://localhost:8765 - baseUrl: http://localhost:8765 - ebookid: 02a535a4-19f8-43fa-b81b-89a226d19dd9 - fakebookid: 123e4567-e89b-12d3-a456-426614174000 - user_id: c51118f0-31fc-4c32-827d-517d6599bf21 ebook_id: 02a535a4-19f8-43fa-b81b-89a226d19dd9 + fake_book_id: 123e4567-e89b-12d3-a456-426614174000 + user_id: c51118f0-31fc-4c32-827d-517d6599bf21 media_item_id: 550e8400-e29b-41d4-a716-446655440000 highlight_id: 660f9501-f29b-51d4-b716-446655440001 note_id: 7710a602-g29b-61d4-c716-446655440002 - libraryId: 8821b703-h29b-71d4-d716-446655440003 library_id: 8821b703-h29b-71d4-d716-446655440003 - mediaItemId: 9932c704-i29b-81d4-e716-446655440004 - media_item_id: 9932c704-i29b-81d4-e716-446655440004 job_id: 550e8400-e29b-41d4-a716-446655440000 rating: 5 - isVisible: true + is_visible: true } vars:secret [ token - refreshToken + refresh_token ] diff --git a/bruno/library/Add Library Folder.bru b/bruno/library/Add Library Folder.bru index f4790b0..4e7d642 100644 --- a/bruno/library/Add Library Folder.bru +++ b/bruno/library/Add Library Folder.bru @@ -5,7 +5,7 @@ meta { } post { - url: {{base_url}}/api/libraries/{{libraryId}}/folders + url: {{base_url}}/api/libraries/{{library_id}}/folders auth: inherit body: json } diff --git a/bruno/library/Get Library Folders.bru b/bruno/library/Get Library Folders.bru index 9f35044..82d893a 100644 --- a/bruno/library/Get Library Folders.bru +++ b/bruno/library/Get Library Folders.bru @@ -5,7 +5,7 @@ meta { } get { - url: {{base_url}}/api/libraries/{{libraryId}}/folders + url: {{base_url}}/api/libraries/{{library_id}}/folders auth: inherit } diff --git a/bruno/library/Set Library Visibility.bru b/bruno/library/Set Library Visibility.bru index a3b4daf..972e7f0 100644 --- a/bruno/library/Set Library Visibility.bru +++ b/bruno/library/Set Library Visibility.bru @@ -16,8 +16,8 @@ headers { body:json { { - "library_id": "{{libraryId}}", - "is_visible": {{isVisible}} + "library_id": "{{library_id}}", + "is_visible": {{is_visible}} } } diff --git a/bruno/media-items/Create Media Rating.bru b/bruno/media-items/Create Media Rating.bru index 0b31e7e..44ddd20 100644 --- a/bruno/media-items/Create Media Rating.bru +++ b/bruno/media-items/Create Media Rating.bru @@ -5,7 +5,7 @@ meta { } post { - url: {{base_url}}/api/media-items/{{mediaItemId}}/rating + url: {{base_url}}/api/media-items/{{media_item_id}}/rating auth: inherit body: json } diff --git a/bruno/media-items/Get Media Item.bru b/bruno/media-items/Get Media Item.bru index 66c8b50..d71f054 100644 --- a/bruno/media-items/Get Media Item.bru +++ b/bruno/media-items/Get Media Item.bru @@ -5,7 +5,7 @@ meta { } get { - url: {{base_url}}/api/media-items/{{mediaItemId}} + url: {{base_url}}/api/media-items/{{media_item_id}} auth: inherit } diff --git a/bruno/media-items/List Media Items.bru b/bruno/media-items/List Media Items.bru index 3de3fc9..93ec6e0 100644 --- a/bruno/media-items/List Media Items.bru +++ b/bruno/media-items/List Media Items.bru @@ -5,7 +5,7 @@ meta { } get { - url: {{base_url}}/api/media-items?library_id={{libraryId}}&limit=20&offset=0 + url: {{base_url}}/api/media-items?library_id={{library_id}}&limit=20&offset=0 auth: inherit } diff --git a/bruno/progress/Get Reading Progress.bru b/bruno/progress/Get Reading Progress.bru index f07f28a..f629a57 100644 --- a/bruno/progress/Get Reading Progress.bru +++ b/bruno/progress/Get Reading Progress.bru @@ -5,7 +5,7 @@ meta { } get { - url: {{base_url}}/api/ebooks/{{ebookid}}/progress + url: {{base_url}}/api/ebooks/{{ebook_id}}/progress body: none auth: inherit } diff --git a/bruno/progress/Update Reading Progress.bru b/bruno/progress/Update Reading Progress.bru index 3091d4d..142233a 100644 --- a/bruno/progress/Update Reading Progress.bru +++ b/bruno/progress/Update Reading Progress.bru @@ -5,7 +5,7 @@ meta { } put { - url: {{base_url}}/api/ebooks/{{ebookid}}/progress + url: {{base_url}}/api/ebooks/{{ebook_id}}/progress body: json auth: inherit } diff --git a/bruno/user/auth/Logout User.bru b/bruno/user/auth/Logout User.bru index f5276f0..d330f0c 100644 --- a/bruno/user/auth/Logout User.bru +++ b/bruno/user/auth/Logout User.bru @@ -16,12 +16,12 @@ "body": { "type": "json", "json": { - "refresh_token": "{{refreshToken}}" + "refresh_token": "{{refresh_token}}" } }, "url": { - "raw": "{{baseUrl}}/api/auth/logout", - "host": ["{{baseUrl}}"], + "raw": "{{base_url}}/api/auth/logout", + "host": ["{{base_url}}"], "path": ["api", "auth", "logout"] }, "description": "Logs out the user by revoking their refresh token. If no refresh token is provided, the request succeeds but no token is revoked." @@ -39,8 +39,8 @@ } }, "url": { - "raw": "{{baseUrl}}/api/auth/logout", - "host": ["{{baseUrl}}"], + "raw": "{{base_url}}/api/auth/logout", + "host": ["{{base_url}}"], "path": ["api", "auth", "logout"] } }, @@ -65,8 +65,8 @@ "json": {} }, "url": { - "raw": "{{baseUrl}}/api/auth/logout", - "host": ["{{baseUrl}}"], + "raw": "{{base_url}}/api/auth/logout", + "host": ["{{base_url}}"], "path": ["api", "auth", "logout"] } }, diff --git a/bruno/user/auth/Refresh Token.bru b/bruno/user/auth/Refresh Token.bru index 479bbfd..138fca5 100644 --- a/bruno/user/auth/Refresh Token.bru +++ b/bruno/user/auth/Refresh Token.bru @@ -16,12 +16,12 @@ "body": { "type": "json", "json": { - "refresh_token": "{{refreshToken}}" + "refresh_token": "{{refresh_token}}" } }, "url": { - "raw": "{{baseUrl}}/api/auth/refresh", - "host": ["{{baseUrl}}"], + "raw": "{{base_url}}/api/auth/refresh", + "host": ["{{base_url}}"], "path": ["api", "auth", "refresh"] }, "description": "Refreshes an access token using a valid refresh token. Returns a new access token with 1-hour expiration." @@ -39,8 +39,8 @@ } }, "url": { - "raw": "{{baseUrl}}/api/auth/refresh", - "host": ["{{baseUrl}}"], + "raw": "{{base_url}}/api/auth/refresh", + "host": ["{{base_url}}"], "path": ["api", "auth", "refresh"] } }, @@ -67,8 +67,8 @@ } }, "url": { - "raw": "{{baseUrl}}/api/auth/refresh", - "host": ["{{baseUrl}}"], + "raw": "{{base_url}}/api/auth/refresh", + "host": ["{{base_url}}"], "path": ["api", "auth", "refresh"] } },